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 


Addresses Format in Tables?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Codcat
Advanced Cheater
Reputation: 0

Joined: 21 Aug 2007
Posts: 62

PostPosted: Fri Jun 08, 2012 3:45 am    Post subject: Addresses Format in Tables? Reply with quote

Forgive me for my lack of terminology but I’ve noticed in tables you can enter an address a couple of different ways, eg. "executable.exe+727468" or just the straight address "00B27600".

Can someone please explain the pros and cons to both? When hacking my disassembled exe's are shown with the normal address so it’s easier to use that but the new version of cheat engines disassembler uses the "executable.exe+727468" method to display the addresses.

Thanks Smile
Back to top
View user's profile Send private message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Fri Jun 08, 2012 8:50 am    Post subject: Reply with quote

game.exe+offset it's recomanded

as it uses base address + offset that always bring to that specific location

XXXXXXXX address it works anyways but in 0.1% of cases it does not work

XXXXXXXX is the address of a memory location

address 0
- exe 1
- exe 2 address ...x
- exe 3

but what if my pc uses

address 0
- exe 3
- exe 1 address ...x
- exe 2

as you can see writing ...x does not always mean exe 2
but exe 2 will always be exe2
that's whay it is recomanded to use game.exe+offset
cheers

_________________
... Fresco
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Jun 08, 2012 12:03 pm    Post subject: Reply with quote

also, ctrl+m in the disassembler switches back to hexadecimal address only
_________________
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
RHCP
How do I cheat?
Reputation: 0

Joined: 14 Jun 2012
Posts: 1

PostPosted: Fri Jun 15, 2012 2:40 pm    Post subject: Reply with quote

Fresco wrote:
game.exe+offset it's recomanded

as it uses base address + offset that always bring to that specific location

XXXXXXXX address it works anyways but in 0.1% of cases it does not work

XXXXXXXX is the address of a memory location

address 0
- exe 1
- exe 2 address ...x
- exe 3

but what if my pc uses

address 0
- exe 3
- exe 1 address ...x
- exe 2

as you can see writing ...x does not always mean exe 2
but exe 2 will always be exe2
that's whay it is recomanded to use game.exe+offset
cheers




I have no background in computer science, and I only write the odd script in AHK for fun - so my understanding of memory allocation is non-existent or at the very least, highly flawed.
As such, i would really appreciate if someone could further clarify the above quote, as i too have been wondering about this. I've written a script for a game and the (virtual) address doesn't seem to change for me, but what if i give the script to my friends? Using AHK, there doesn't seem to be a way to find the base address of the game i.e., I cant use game.exe+offset method to read/write to an address.

E.g.
game.exe+2C3E9E4
the game 'base address' is 0x800000
Therefore the memory address is 343 E9E4

It is my understanding that windows virtual memory address system ensures that each program/game sees the the entire memory address range (ignoring the system reserved addresses) as available to each program, hence two or more programs can use the same virtual memory address as given by cheat engine - hence why when you read or write to the given (virtual) memory address, you also have to specify the process as well, so the system can translate this virtual address (back to the physical address) using the page table.

I apologise for that explanation , but I just wanted to clarify why Im having a hard time understanding this.

So how can the memory location change if this offset, and the base address of the program are hard coded? And when does this .1% problem occur?


Thanks, RHCP.
Back to top
View user's profile Send private message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Sat Jun 16, 2012 12:13 pm    Post subject: Reply with quote

the 1% problem may occur when using different type of windows
xp or vista or 7 or whatever or when memory is full and it has to go somewhere else, not in the destination it was designed for.
you choose the exe because the memory is too big for you to scan all of it, because cheat engine needs to know what you want to scan, avoiding the scan of the entire ram, it's also a way to be sure that you're not affecting other processes.
cheat engine does not display in the debugger the full ram, but just the part that was given for your game
also it may not be all allocated, that's why you'll have to allocate when you make an assembler script.

ram
game1 ram0
game2 ram1
game3 ram2

cheat engine does not display ram1 till ram2, instead it shows you that ram 1 is ram0 and ram2 is ram1
so when you go to ram0 in cheat engine it's like going real ram1

and let's say that in windows xp
address 0 that was given by windows to your game
windows xp says that in address x the game should start
windows 7 says that in address y the game should start
but x and y are not the same,
while x+whatever is the same as writing y+whatever
do you understand now ?

the allocation problem:
the memory needs a format.
you know, you can store "5" as a 4 byte or as a double
but 4 byte occupies only 4 bytes of memory only and double occupies 8 bytes, and all that bytes just to say 5
when you right click your main hdd it says NTFS, right ? when you insert a usb memory stick it says FAT32. storing 10 in ntfs it's not the same as storing 10 in fat32 or whatever
let's suppose that "10":
int ntfs it's 010101000
and in fat32 000110011
see ? it's not the same!
the same with ram it can be non allocated or allocated, because rams file system is binary, assembly.
the point is that non allocated memory it's just non allocated, unused, it's not zero nor anything else it's "?" as cheat engine displays non allocated memory, it's not zero because it's memory, and memory can hold nothing, while hard drives cannot hold nothing, they theoretically can, but when you use special programs that look into them, they show records that can be recovered.

and now your answer
the game could dynamically alloc it's space in the memory that windows gave to it.

that means:
ram game start
address zero
address x
game
end game
address y
game ram ends

other sessions of the game could be

ram game start
address zero
address x
address y
game
end game
game ram ends

as you can see the game could be held in addy x or y, but the data is the same.
that's why game+x it's recomanded.

you'll find address incompatibility when you change windows versions, rarely on the same windows version.

hope that you're good now Smile

_________________
... Fresco
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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