Hello UC,
currently I try to call a function from the "samp.dll" Library - the Lib is loaded in gta_sa.exe.
IDA shows me the following Address for the function "AddChatMessage":
The pseudocode gives me the following function header:
Here is an asm example how the function gets called:
And here is how I try it:
But the client is crashing on the functioncall.
Do you see the problem?
currently I try to call a function from the "samp.dll" Library - the Lib is loaded in gta_sa.exe.
IDA shows me the following Address for the function "AddChatMessage":
Code:
.text:03C49990 ; int __cdecl AddChatMessage(int, int, char)Code:
int __cdecl AddChatMessage(int a1, int a2, char a3)Code:
.text:03C483EC mov ecx, dword_3DE2A24
.text:03C483F2 push offset unk_3DCC818 ; char
.text:03C483F7 push offset aAudioStreamS ; "Audio stream: %s"
.text:03C483FC push ecx ; int
.text:03C483FD call AddChatMessage
.text:03C48402 add esp, 0ChCode:
typedef int (__cdecl* addchatmessage_t) (int a1, int a2, const char* a3);
addchatmessage_t pAddChatMessage;
DWORD dwSAMP = (DWORD) GetModuleHandleA("samp.dll");
DWORD dwFunc = dwSAMP + 0x79990;
char* message = "Test";
pAddChatMessage(0, 0, message);Do you see the problem?
Aucun commentaire:
Enregistrer un commentaire