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 


HELP: Scripts referencing changing addresses

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

Joined: 09 Jul 2013
Posts: 6

PostPosted: Fri Nov 14, 2014 11:43 pm    Post subject: HELP: Scripts referencing changing addresses Reply with quote

I'm trying to modify an old script of mine to be more robust. Someone tried to use it, and found that the addresses I reference in the scripts don't correspond to the same code/memory locations in his game. We have the same updated version of the game; and we're both using Win7 64-bit. I've been able to use this cheat table on both my Windows 7 and Windows Technical Preview partitions. I've even reloaded my computer once or twice since I last touched the cheat table. I'm not sure why his computer is mapping the game offsets differently.

The game is Jedi Outcast. In my scripts, I use offsets for the corresponding DLLs, such as: "jk2gamex86.dll"+F7107. I figured this would be a reliable way to find that address. But for this guy, these same offsets point to different areas of code/memory. To solve this, I've been modifying my scripts to use AOB scans to find the address. Things were going along smoothly until I hit some of my more in-depth scripts, which have instructions that reference addresses directly in game.

For example:
Code:
movzx eax,byte ptr [eax+jk2gamex86.dll+F7338]


I'm using the address of this instruction as my code cave entry point. And of course, to disable this code, I have to write this original instruction back in. But that offset wouldn't work if it's being mapped differently on another machine. My x86 knowledge is limited. I tried to use labels and offsets relative to my entry point, but the Auto Assembler won't accept them as valid assembly instructions.

How can I generalize my scripts to work with instructions and addresses like these?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Nov 15, 2014 6:19 am    Post subject: Reply with quote

That means he did not have the same version as you(he's either wrong or lying)

Anyhow, try an aobscan to find it and then use the reassemble(originaladrress) aa command i, the new memory block

_________________
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
J3RRY
How do I cheat?
Reputation: 0

Joined: 09 Jul 2013
Posts: 6

PostPosted: Sat Nov 15, 2014 12:34 pm    Post subject: Reply with quote

Hmm, I'll consider that possibility Confused

Does reassemble() restore the original code to that memory location? I mean, is CE saving the original bytes and simply putting them back? If so, that'd be perfect since I have no idea which addresses this guy is seeing.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Sat Nov 15, 2014 1:04 pm    Post subject: Reply with quote

Readmem(address,size) will read those bytes and put them at the place of readmem
Reassemble is like that but will adjust the bytes if they are dependant on the position of the instruction

_________________
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
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