Hello Friends,
I want to call a function in a Process i injected my dll to from which I got the Address with the FindPattern function.
this is function head:
(this is what ida spits out)
I tried assigning the address to a function pointer but does not work
It says i can't initiallize a function by DWORD.
then I tried calling function manually
but it crashes and says ESP not got saved correctly???
Could you help me? Thanks in advance :yikes:
I want to call a function in a Process i injected my dll to from which I got the Address with the FindPattern function.
this is function head:
PHP Code:
void __cdecl draw_text(const char *str, int left, int top, int r, int g, int b, int a, int cursor, int maxwidth)
I tried assigning the address to a function pointer but does not work
PHP Code:
void ( __cdecl *draw_text_t)(const char *str, int left, int top,int,int,int,int,int,int) = draw_text;
then I tried calling function manually
PHP Code:
void callDrawText(const char *str, int left, int top, DWORD drawText)
{
__asm
{
push 0xFFFFFFFF
push 0xFFFFFFFF
push 0xFF
push 0xFF
push 0xFF
push 0xFF
push top
push left
push str
call drawText
}//where drawText holds the address of function
}
Could you help me? Thanks in advance :yikes:
Aucun commentaire:
Enregistrer un commentaire