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 


Bug regarding memory viewer

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

Joined: 26 Apr 2020
Posts: 13

PostPosted: Wed Apr 29, 2020 7:57 am    Post subject: Bug regarding memory viewer Reply with quote

Greetings,

I've been playing around with a game to hack its camera and cheat engine has had some weird behavior all around; while trying to find "what writes to this address" it reports finding a jmp writing data, like in the picture:

https://imgur.com/a/tw0tqxQ

Working with ghidra (or any other debugger) it gives the correct code:

https://imgur.com/a/D1ktwkr

Manually inputting the proper address in cheat engine corrects the issue temporarily:

https://imgur.com/a/5gUTV7F


I'm sorry if this is the right place to report this kind of issue but i dodn't see a bug report area or anything.

Also, it seems weird that CE reports off by -1 byte what is writing to the address; if i recall correctly, CE changes the page protection and handles the exception to detect whenever the address is being written to, i can't think of any reason for it to grab the wrong EIP.

Oh and i cant post url's yet, thats why the messed up links to images, a moderator could make it look pretty Wink
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Wed Apr 29, 2020 10:24 am    Post subject: Reply with quote

calculating the previous opcode is not always correct.

anyhow, the left and right arrow keys can reallign the disassembler

_________________
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
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Wed Apr 29, 2020 10:40 am    Post subject: Reply with quote

Break-on-access / break-on-write breakpoints trigger after the instruction has executed. EIP/RIP is set to the instruction after the access/write, which means CE has to guess what the previous instruction is. That problem is actually pretty hard to solve correctly in ISAs with variable-length instructions, and in this very specific case, the bytes are laid out in such a way that CE happens to guess it wrong.

Posting more bytes around there (especially before the access) might help fix this.

crtzrms wrote:
CE changes the page protection and handles the exception to detect whenever the address is being written to
If you use page exceptions, yes, but that's a terrible way of doing it in general. Hardware breakpoints are used by default.
_________________
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
crtzrms
Newbie cheater
Reputation: 0

Joined: 26 Apr 2020
Posts: 13

PostPosted: Wed Apr 29, 2020 11:06 am    Post subject: Reply with quote

ParkourPenguin wrote:
Break-on-access / break-on-write breakpoints trigger after the instruction has executed. EIP/RIP is set to the instruction after the access/write, which means CE has to guess what the previous instruction is. That problem is actually pretty hard to solve correctly in ISAs with variable-length instructions, and in this very specific case, the bytes are laid out in such a way that CE happens to guess it wrong.

Posting more bytes around there (especially before the access) might help fix this.

crtzrms wrote:
CE changes the page protection and handles the exception to detect whenever the address is being written to
If you use page exceptions, yes, but that's a terrible way of doing it in general. Hardware breakpoints are used by default.


Oh, i didn't know that, makes much more sense.

Also good to know the arrow keys can fix the issue Smile
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