I am trying to convert this function from MSVC++ to MINGW (this is the original MSVC function)
VOID __declspec(naked) BNSTUB()
{
__asm
{
pushad;
call OnChatPacketReceived;
TEST EAX,EAX;
popad;
jnz oldCall;
MOV EAX,0;
MOV DWORD PTR DS:[EBX+0x6FF3EBA0],1
ret;
oldCall:
CALL eax;
MOV DWORD PTR DS:[EBX+0x6FF3EBA0],1
ret;
}
}
But I have problems with pushad and popad. they give me a "undeclared identifier"