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 


[AA] conditional code injecting, simple question

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
ciglipaf
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 6

PostPosted: Mon Aug 03, 2015 8:33 pm    Post subject: [AA] conditional code injecting, simple question Reply with quote

how can i do this?


Code:
game.dll+AA:     //when you come here
cmp [game.dll+10],1     //check if this value is "1"
jne do_not_change
   *inject this opcode to "game.dll"+CC,  but dont execute or jump here!
   --> nop
   --> nop


do_not_change:
   *inject this opcode to "game.dll"+CC,  but dont execute or jump here!
   mov eax,ecx     //this is orginal opcode
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Mon Aug 03, 2015 8:42 pm    Post subject: Reply with quote

Inject at +cc instead of +aa and put your conditional there instead.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
ciglipaf
How do I cheat?
Reputation: 0

Joined: 26 Jul 2015
Posts: 6

PostPosted: Tue Aug 04, 2015 6:39 am    Post subject: Reply with quote

ofc that is a better idea but only if i have one place to inject like in first example. actually there are tens of injection points, and they have to be injected or not injected based on some values. so i need to do this in a clearer way, more practical way.

think about this, what would you do?

Code:
if [game.dll+10] = 1
   if [game.dll+14] = 5
       inject "bla bla..." at "game.dll"+CC
       inject "bla bla..." at "game.dll"+DD
       inject "bla bla..." at "game.dll"+EE
       inject "bla bla..." at "game.dll"+FF
       ...
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Tue Aug 04, 2015 6:56 am    Post subject: Reply with quote

I told you what I'd do... I'd set a flag and check it at each of the subsequent injection points. It's a clearer, more practical way compared to rewriting substantial executable code each iteration.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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