Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Hook function in main  (Visto 261 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline vcore30 Posteado: December 06, 2022, 08:51:17 AM | Modificado: December 06, 2022, 08:54:07 AM by vcore30

  • 0 puntos por ventas
  • *
  • Rank: Destacado
  • Posts: 90
  • Gracias recibida: 703
  • ru
English.

How to call a function to get the correct a1 which is written to v40?? My a1 is bool



Sanish.

¿Cómo llamar a una función para obtener el a1 correcto que está escrito en v40? mi a1 es bool


Code: [Select]
//code decompiled IDA


// function calls
// sub_7DB230(v8[4], a2, a3, a4, 1);
// sub_7DB230(v5[6], a2, a3, a4, 1);
// sub_7DB230(v5[v6 + 6], a2, a3, a4, 0);  //Expanded Inventory
// sub_7DB230(*(_DWORD *)(v5 + 16), a2, a3, a4, 1);
// sub_7DB230(v5[4], a2, a3, a4, 1);
// sub_7DB230(v5[4], a2, a3, a4, 1);
// sub_7DB230(*(_DWORD *)(a1 + 544), a2, a3, a4, 1);
// sub_7DB230(*(_DWORD *)(v5 + 540), a2, a3, a4, 1);
// sub_7DB230(v8[94], a2, a3, a4, 1);
// sub_7DB230(v8[95], a2, a3, a4, 1);



//void __thiscall SEASON3B::CNewUIInventoryCtrl::Render(SEASON3B::CNewUIInventoryCtrl *this, bool a2)   original webzen name function
void __userpurge sub_7DB230(int a1@<ecx>, FARPROC (__stdcall *a2)(HMODULE hModule, LPCSTR lpProcName)@<ebx>, int a3@<edi>, _DWORD *a4@<esi>, char a5)
{
float v19; // ST0C_4
float v20; // ST08_4
int v40; // [esp+78h] [ebp-B0h]
///............


v40 = a1;
 
    v19 = (double)(*(_DWORD *)(v40 + 44) - 3);
    v20 = (double)(*(_DWORD *)(v40 + 40) + *(_DWORD *)(v40 + 48) - 9);
    sub_790B50(a2, a3, a4, 31341, v20, v19, 14.0, 14.0)
}




//code main.dll

void CNewUIInventoryCtrl(int a1, int a2, int a3, int a4, int a5)
{
gConsole.AddMessage(4, "a1:%d a2:%d a3:%d a4:%d a5:%d", a1, a2, a3, a4, a5);

float v18; // ST08_4
float v19; // ST0C_4
int v40; // [esp+78h] [ebp-B0h]

v40 = a1;


//if you uncomment the client crashes
//gConsole.AddMessage(4, "%d", *(_DWORD *)(v40 + 44);



//if you uncomment the client crashes
//v19 = (double)(*(_DWORD *)(v40 + 44) - 3);
//v20 = (double)(*(_DWORD *)(v40 + 40) + *(_DWORD *)(v40 + 48) - 9);
//pRenderImage(31341, v20, v19, 14.0, 14.0);
}


void Test::Load()
{
//SetCompleteHook(ASM::JMP, 0x007DB230, &CNewUIInventoryCtrl);

SetCompleteHook(ASM::CALL, 0x007F0424, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x0082C704, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x00835144, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x0083C551, &CNewUIInventoryCtrl);  //Expanded Inventory
SetCompleteHook(ASM::CALL, 0x0084249A, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x0084705C, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x0084F9FC, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x008575EE, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x008578B4, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x008642C4, &CNewUIInventoryCtrl);
SetCompleteHook(ASM::CALL, 0x008642E0, &CNewUIInventoryCtrl);
}


//Log Output

//Open Inventory
a1:1 a2:452501864 a3:1631476 a4:8478302 a5:452501864

//Open Expanded Inventory
a1:0 a2:452501864 a3:1 a4:1631404 a5:8214474


Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
4 Replies
928 Views
Last post September 10, 2019, 05:05:27 PM
by 11naracus
9 Replies
1085 Views
Last post August 08, 2020, 01:02:06 PM
by -Rastaa.TSM☢
9 Replies
2487 Views
Last post August 08, 2021, 06:26:05 PM
by onlinezajzaj
1 Replies
343 Views
Last post April 28, 2022, 10:45:32 PM
by repiolaa
0 Replies
117 Views
Last post February 03, 2024, 04:28:06 PM
by dizzys