Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Need help disabling this script.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Fri Jun 06, 2014 4:37 am    Post subject: Need help disabling this script. Reply with quote

Code:
[enable]
alloc(mem,1024)
registersymbol(mem)
createthread(mem)
mem:
mov eax,[01005194]
lea eax,[eax+1]
mov [01005194],eax
push #1000
call sleep
jmp mem
[disable]
mem:
ret
unregistersymbol(mem)
dealloc(mem)

In this script,I need the 'ret' to execute before the dealloc command,because the ret will kill the thread,if I could make the 'dealloc(mem)' execute one second after the other part of the script,it would solve the problem,also,I did not use globalalloc because there is no 'globalfree' command like in MHS,and as I know,there is no lua command to kill target threads,is there?
Also,what is the heaplist?what kind of useful informations can I gather from it?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25856
Location: The netherlands

PostPosted: Fri Jun 06, 2014 5:22 am    Post subject: Reply with quote

globalalloc is specifically used for cases like this. You do NOT want to free it

Code:

[enable]
globalalloc(mem,1024)
registersymbol(mem)
createthread(mem)
mem:
mov eax,[01005194]
lea eax,[eax+1]
mov [01005194],eax
push #1000
call sleep
jmp mem
[disable]
mem:
ret


this way you can toggle it on and off without it allocating more memory each time (globalalloc reuses the memory block)

in 6.4 you can do:
Code:

[enable]
alloc(mem,1024)
registersymbol(mem)
createthread(mem)
mem:
mov eax,[01005194]
lea eax,[eax+1]
mov [01005194],eax
push #1000
call sleep
jmp mem
[disable]

{$lua}
writeBytes("mem", 0xc3) --write the ret, autoassemble() would be an option to
sleep(1000)
{$asm}

unregistersymbol(mem)
dealloc(mem)

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Fri Jun 06, 2014 5:42 am    Post subject: Reply with quote

Redone wrote:

lea eax,[eax+1]

Why would you do this instead of inc eax?

_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Fri Jun 06, 2014 6:44 am    Post subject: Reply with quote

@Dark Byte the 6.4 solution is the one I was looking for,I agree that using globalalloc is better than using alloc in this case,thanks.
justa_dude wrote:
Redone wrote:

lea eax,[eax+1]

Why would you do this instead of inc eax?


Oops!Thanks for reminding me,forgot about those simple integer instructions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites