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 


Address + Offset in Debugger does not add up

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

Joined: 07 May 2022
Posts: 4

PostPosted: Sat May 07, 2022 4:11 pm    Post subject: Address + Offset in Debugger does not add up Reply with quote

Newbie question,

I attach the "Find out what accesses this address" debugger with a certain address (AE2E2108), and it finds an access in the line

mov eax,[rax+000000C]

. Now in the tab below, where it records the register values, RAX = 00001415.

I think I remember that it was mentioned somewhere that the values in the debugger are the values after executing the line.
But afaik mov wouldn't modify rax here, and eax is a register, so how did this line access AE2E2108?

other lines that popped up in the debugger were fine (address + offset do add up to (AE2E2108))
most of the other lines also had the offset 0xA8 instead, which might be the struct's offset, so this just seemed the odd one out with 0xC offset
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 155

Joined: 06 Jul 2014
Posts: 4770

PostPosted: Sat May 07, 2022 4:21 pm    Post subject: Reply with quote

eax and rax are two different names that refer to the same CPU register: eax is just the lower 32 bits of rax.

Writing to eax also automatically clears the upper 32 bits of rax (eliminates false dependencies). This is why the upper 32 bits of rax are 0 after the instruction was executed- ignoring the fact that it was also 0 before the instruction was executed.

If that instruction accessed the address AE2E2108 and the instruction is using the addressing mode "rax+C", then clearly rax was `AE2E2108 - C = AE2E20FC` before the instruction was executed.

The offset used by most instructions is probably the correct one. If several use A8 but only one uses C, it's probably A8.

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

Joined: 07 May 2022
Posts: 4

PostPosted: Sun May 08, 2022 2:32 am    Post subject: Reply with quote

oh wow, thanks, wouldn't have thought of both names referencing the same register. i remember the one being 32-bit and the other being 64-bit equivalent of the eax register, but it didn't cross my mind that a 64-bit processor probably wouldn't have 32-bit registers next and 64-bit registers (correct if i am wrong on that as well)
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