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 


Finding unused areas of game memory for personal use

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

Joined: 31 Dec 2017
Posts: 6

PostPosted: Sat Jan 13, 2018 10:16 pm    Post subject: Finding unused areas of game memory for personal use Reply with quote

I am trying to make a script that does an AOB Injection and allocates new memory. However, I suspect that when I allocate a new place in memory, whenever I try to load in a new world, the game tries to use the same area of memory of which I am already using and crashes. Is there a way to determine a large area of unused game memory for which I can use for my own personal code injections and data storage?
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8516
Location: 127.0.0.1

PostPosted: Sat Jan 13, 2018 10:40 pm    Post subject: Reply with quote

You can look for "filler" memory that compilers generally use between functions and such depending on how big of an area you need.

Fillers are generally done with either int3 (0xCC) or nop (0x90) instructions. Just depends on the compiler and the settings used when the app was built.

Some may use other things such as 0x00 as filler space but I wouldn't recommend relying on that to be unused.

Search memory for large chunks of either of the above mentioned based on the size you need. You can scan the file itself for large spaces that can be used as static caves as well and just recalculate based on where the area is loaded into memory.

If absolutely needed, you can always just allocate space too instead of trying to reuse already created space.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
STN
I post too much
Reputation: 42

Joined: 09 Nov 2005
Posts: 2672

PostPosted: Sun Jan 14, 2018 5:31 am    Post subject: Reply with quote

Do it the oldskool way by finding code-caves. You can do it on the fly instead of using static addresses.

This is what i did for ACO ( CE couldn't allocate mem near where i was injecting creating far jumps which i didn't want).

aobscanmodule(freespacee,ACOrigins.exe,00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)

This bit is important or you will get nasty crashes - the area you find won't necessarily be writable so we make it

FULLACCESS(freespacee,1000)

You can increase the number of zeroes but chances are if you can find that much free space, it will have a lot more unoccupied space nearby (i constantly managed to find 1-2k+ bytes free area).

You can also search for CC/90s but i don't like that. Always had unpredictable results with that especially on other people's PCs.

You can also look at the end of data/resource sections, always huge amount of free space there.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
DerKO
How do I cheat?
Reputation: 0

Joined: 31 Dec 2017
Posts: 6

PostPosted: Sun Jan 14, 2018 5:56 pm    Post subject: Reply with quote

Thanks guys
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