I am debugging an x86 DLL in windbg, in particular a function that supposedly has the following signature:
bool __cdecl func(LPVOID p1, LPVOID p2, wchar_t* p3, size_t p4, LPVOID p5)
The function is not exported. AFAIK __cdeclmust receive all arguments on the stack, and the caller must clear the stack.
But that is not what is happening. Windbg says the calling convention __cdecl, but the first 2 arguments are passed in ecxand edx, as a function __fastcall. Also, the function itself clears the stack, which (I think) should not be executed using the function __cdecl.
I try to use this function without success. I tried to make a detour function like __cdecland __fastcall, and both of them have caused a failure.
Any suggestions?
source
share