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 


Base address in CE does not match EnumProcessModules

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

Joined: 11 Sep 2021
Posts: 6

PostPosted: Mon Sep 13, 2021 9:43 am    Post subject: Base address in CE does not match EnumProcessModules Reply with quote

Hey guys, I am slowly getting there Wink I have a little bit of code that enumerates all the modules of the process I am targeting. From that list, I can see the base address is "0xABA50000" which already strikes me as an odd address. The weird thing is, this address is THE SAME every time I launch the game. Also if I just make an entry in cheat engine of "game.exe" as a pointer, it gives me the true base address, which is more consistent with the address space I am expecting. In this case it looks like this "300905A4D". I will post a screenshot of my process enumeration. The code that is printing this is taken from the microsoft docs page labeled "enumerating-all-modules-for-a-process" for win32 docs (Sorry, can't post urls yet).

I was wondering if it might have something to do with ASLR, but since the address is the same every time I don't think so. I'm sure I am just missing a step or something, any help would be appreciated!



asdf.png
 Description:
 Filesize:  110.56 KB
 Viewed:  931 Time(s)

asdf.png


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

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Mon Sep 13, 2021 11:50 am    Post subject: Reply with quote

The arrow operator -> means "points to". The value stored at the address game.exe is 300905A4D. You can also see the first two bytes are the DOS header magic number 4D 5A - "MZ".

Don't use the pointer checkbox. Just put game.exe in the address field to see what address it is, or execute this Lua code:
Code:
print(('%08X'):format(getAddress'game.exe'))


All images (exe / dll files) will be loaded at an address that is some multiple of the windows allocation granularity (0x10000) - the last 4 bytes will always be 0. The address ABA50000 is fine for an image to be loaded at, while 300905A4D is impossible.

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

Joined: 11 Sep 2021
Posts: 6

PostPosted: Mon Sep 13, 2021 12:18 pm    Post subject: Reply with quote

Thank you Parkour, you helped me out yesterday as well. I actually figured this one out a little while after posting. The process is 64 bit, so I needed to be retrieving 8 bytes instead of 4! I was clipping off a good portion of the address. Accounting for that and all is finally working! Appreciate your hep Very Happy

Interesting note on the window allocation granularity, I'll look more into that as I'm curious now.
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