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 


Dealing with static addresses in dynamic code in CSM 2015

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

Joined: 30 Sep 2012
Posts: 42

PostPosted: Fri May 01, 2015 3:33 am    Post subject: Dealing with static addresses in dynamic code in CSM 2015 Reply with quote

Hey guys. Smile So I'm messing around with Car Mechanic Simulator 2015, doing a code injection to give my guy 5 xp for every 1 xp the game would otherwise give. The code is dynamic so I have to trigger each method the game uses to grant xp before it can be found with aob scan. There are three. One for removing a part, one for assembling a part, and one for completing work on a car.

Not surprisingly the addresses in the code change each time the game is run. What is surprising is that they are written as static addresses in the game code, something like 0107445D, and not something like [EAX + 00000090]. So I can write an injection that works, but the next time I run the game the it will write to the wrong address, although the aob will find the correct code thanks to wildcards. I know the number I need is always x bytes away from the injection point, so I'm wondering if there is a way to grab it and make it a variable in my code.

Thanks. Smile
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Fri May 01, 2015 6:24 am    Post subject: Reply with quote

Enable CE's Mono features, then use decorated names instead of addresses. CE will force Mono to JIT the parts that haven't yet been compiled, so you can enable your cheats right away.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
Telecide
Cheater
Reputation: 0

Joined: 30 Sep 2012
Posts: 42

PostPosted: Fri May 01, 2015 10:27 am    Post subject: Reply with quote

Thanks! Forgive my noobishness, but I'm not sure how to do that. I click on "activate mono features" from the "mono" menu, but nothing seems to happen. Do I have to attach to a mono.exe file after I attach to the game executable? Also I don't know what JIT stands for, but from context it looks to mean "activate"?
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 893

PostPosted: Fri May 01, 2015 4:23 pm    Post subject: Reply with quote

Telecide wrote:
Thanks! Forgive my noobishness, but I'm not sure how to do that. I click on "activate mono features" from the "mono" menu, but nothing seems to happen.

You may have to check the show module addresses option, but CE should now show decorated namespace/class/function names in the memory viewer. Also, the Mono features should be present in the data dissector.

_________________
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