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 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