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 


How to add Clear Code on Disable?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Sat Aug 12, 2017 3:17 am    Post subject: How to add Clear Code on Disable? Reply with quote

Usually in Cheat Table AA

[ENABLE]
SomePos:
Jump to Some Memory
db 90 90 90 ....

[DISABLE]
SomePos:
db Restore_bytes

Like this the Disable part just restore the original byte Code.or opcode they may be called.

What if I need to Call Some clear Code like
mov rcx, 0
call somefun

then db Restore_bytes

If I write like
mov rcx, 0
call somefun
db MouseCtrlTest_bytes

It won't work.

What should I do to make things like this work correctly?
Back to top
View user's profile Send private message
FreeER
Grandmaster Cheater Supreme
Reputation: 53

Joined: 09 Aug 2013
Posts: 1091

PostPosted: Sat Aug 12, 2017 7:49 am    Post subject: Reply with quote

You'd need to leave a code injection in place that checked a variable to see if it was enabled or not and do the proper thing in that case (use globalalloc instead of alloc and the disable section would simply set the checked var to it's disabled value), or allocate memory and put the code there (with a ret) and run it with createThread (free it if you want), or use lua, there's probably a few other methods you could use but those are the main 3 and what I think of off the top of my head

Personally I'd use lua, something like this should work

Code:
[DISABLE]
{$lua}
executeCode('somefun', 0) -- only allows 1 arg, x64 should use rcx for first iirc
return 'db MouseCtrlTest_bytes'
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