-
Member
Need some help for in game function calling
Hi, I am justing start building a bot from scratch, for classic
the bot open a handle to wow's process and use RPM for data fetching
after days of dealing with IDA and the post in OC. I can get almost everything i need for GameObject like is ghost, is casting, is mounting, health, position, etc.
then what I intend to do is to call some in game function to execute my actions.
by alloc -> write asm -> create remote thread, i can call functions i need correctly. like move, cast spell, run macro text
EXCEPT! wow just crash randomly after few minute. dealing with this for like 3 days with on lucky
so i really need some hits or example code to figure out which part of my implement is incorrect.
I was calling in game function in following steps:
1) suspend all thread of wow process to avoid multi-thread issues
2) set tainted globle memory to 0 for i may call some function that check this
3) write asm to code cave
sub rsp, 0x28
mov rax, call_address
mov rcx, param1
mov rdx, param2
mov r8, param3
mov r9, param4
call rax
add rsp, 0x28
ret
4) create remote thread and wait for single object
5) set tainted value back to previous value
6) resume all thread
7) sleep 20 ms for next loop
and here is the code: GitHub - hwlt/AirjMe
Thank all you guys for helping me!
-
Post Thanks / Like - 2 Thanks
chlycooper,
xbec (2 members gave Thanks to airjqqq for this useful post)
-
Contributor
A lot of these things need to be run in the main thread.
Im not expert but i think in the past things like HB would use EndScene to execute their asm calls.
LUA for sure needs to be done in the main thread.
Last edited by aeo; 01-09-2020 at 10:05 AM.