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 


CE does wrong restoration of bytes when disabling lua script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
thirdfoot
Newbie cheater
Reputation: 0

Joined: 09 Feb 2019
Posts: 21

PostPosted: Sat May 02, 2020 6:09 pm    Post subject: CE does wrong restoration of bytes when disabling lua script Reply with quote

While I was making a hack for a single player UnityEngine based game and checking my C/C++ trainer changes in CE to make sure it does the right thing, I noticed CE does not... Consider the attached image, and take a look at the restored address address being put into rax. I don't know why the game code does this redundant operation, but that's beside the point. In the script where that operation is included, I simply comment it out since it's the same operation being used before mov [rax], eci which I'm modifying.

Thought it was worth mentioning, for me this was unexpected behavior.



weird-ce-byte-restoration.png
 Description:
 Filesize:  63.76 KB
 Viewed:  1200 Time(s)

weird-ce-byte-restoration.png


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Sat May 02, 2020 7:40 pm    Post subject: Reply with quote

It's pretty hard to tell you what's wrong with the script if you don't post the script.

If I had to guess, that assembly is the output of a JIT compiler and those values are pointers that will change the next time it's compiled - i.e. when the game is restarted. In which case you could solve that using readmem and reassemble.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun May 03, 2020 1:18 am    Post subject: Reply with quote

how do you store the original bytes?
readmem or reassemble?if you use a hardcoded byterow this will fail if the code loads at a different location

_________________
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
thirdfoot
Newbie cheater
Reputation: 0

Joined: 09 Feb 2019
Posts: 21

PostPosted: Sun May 03, 2020 3:31 am    Post subject: Reply with quote

My bad doing this when tired. I somehow brainfarted that CE would just deal with it automatically and forgot to pay attention to the [disable] section which of course only looked at the initial value when making the script, I very rarely need to change that so it skipped my mind a bit.

Behavior no longer unexpected at all.

And I'd like to add no criticism intended, just confusion.
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