How to add WAIT function? Is this possible at all?
Posted: Thu Mar 01, 2018 12:35 pm
Hello,
I made a script and I have one problem. When I activate it, its ok, its working perfectly - but now I don't know how to write a code to deactivate it.
This is my script:
Like we can see that the main function which I am hacking is cmp dword ptr [edi+14],02. I am injecting value in edi+14. On this moment is everything good. But when I want to disable this function, I must first: inject a function: mov [edi+14],1 and then change this function to original: cmp dword ptr [edi+14],02 - this is the only way to disable it. I can do it manually but injecting once a nr 1 code, then nr 2 code, but I want all of this operation made by one script. Like you can see in my script, I was trying to write manually injection but i don't know any WAIT function so my script when disabled is writing ONLY original function: cmp dword ptr [edi+14],02 which is not disabling the script at all! Is in CHEAT ENGINE function WAIT or something like that? Then when I deactivate the script, first will inject one code, then wait and inject another code?
I am waiting for your advices.
Thank you.
I made a script and I have one problem. When I activate it, its ok, its working perfectly - but now I don't know how to write a code to deactivate it.
This is my script:
Code: Select all
[ENABLE]
aobscanmodule(no_hud_and_no_icons,Asphalt8.exe,FF 50 0C 83 7F 14 02 75 25 83 BF C8 05 00 00 01) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
cmp [edi+14],C
jb nohudnoicons
code:
cmp dword ptr [edi+14],02
jne Asphalt8.exe+2C8F51
jmp return
nohudnoicons:
push edi
mov [edi+14],2
pop edi
jmp code
no_hud_and_no_icons+3:
jmp newmem
nop
return:
registersymbol(no_hud_and_no_icons)
[DISABLE]
"Asphalt8.exe"+2C8F26:
mov [edi+14],1
no_hud_and_no_icons:
db FF 50 0C 83 7F 14 02 75 25 83 BF C8 05 00 00 01
unregistersymbol(no_hud_and_no_icons)
dealloc(newmem)
I am waiting for your advices.
Thank you.