如何挂钩__usercall,__ userpurge(__spoils)函数?

知道任何关于挂钩__usercall类型函数的东西吗? 我成功地挂了__thiscall__thiscall__cdecl但这对我来说已经足够了。

知道有人为__usercall挂钩,或者如何使用__stdcall__cdecl翻译挂钩这类函数?

我最初必须解决的function是:

 int __usercall func(int a, int b, int c, unsigned int d, signed int e); 

使用包装器将其转换为__stdcall

 int __stdcall func_hook_payload(int a, int b, int c, unsigned int d, signed int e); // Wrapper for // int __usercall func(int a, int b, int c, unsigned int d, signed int e); __declspec(naked) void func_hook() {__asm{ push ebp mov ebp, esp push dword ptr[ebp + 0x0C] // or just push e push dword ptr[ebp + 0x08] // d push dword ptr[ebp + 0x04] // c push ecx // b push eax // a call func_hook_payload leave ret // note: __usercall is cdecl-like }} 

当所有其他方法都失败时……使用调试器遍历它。

当你输入调用时,特别注意这些ESP,然后在函数返回之前再次注意这些。