L. Spiro wrote:The Hex Editor will allow you to find this type of data.
Unused areas are often after all the code in the .text section and usually will also be in the other sections in the executable.
This works well as it is static.
My next question here would be how do I determine where the .TEXT section is? There are several areas that have text in them, do you mean that each and every one of them should do fine?
You also have the option of creating free areas with the script.
Use VirtualAllocEx() the same as you would in the Win32 API.
My help file does not, unfortunately, explain all the details because it is meant for people who already know how to use it.
But you can find the details in the MSDN library or see examples by searching Google for “VirtualAllocEx C++”.
This will allow you to make any size of free area and at any address you desire.
I assume this will be sufficient?
Ummm, not really... since I have NO IDEA how to use it.
I even searched around like you recommended and checked the MSDN site.. and I felt really lost after I did. I would have no clue how to use the info that I found. Luckily for me 95% of the stuff I'm doing can be done with simple if/then else and while do statements. Otherwise I'd be in a world of shit.
So what I did was I whipped out tsongie's code cave tool and used it to find some blank memory areas for me. I honestly don't need a TON of them. Basically what i needed the space for is a place to store some 1's and 0's.
Here's what I mostly use them for... let's say I want to lock a room so you can't get out till you kill all the monsters in it. This is easy enough to do if I want to do it EVERY time you walk in the room. But for most of them I only want the room to lock once in the game, and once you beat the enemies in the room I never want it to locck again. So I do somethin like this:
.checks horiz and vert pos on map (room #)
d00730b0 0015
d00730b4 0017
..if room counter <>16256 (indicates all enemies in room are dead)
d1097429 3f80
.and tag <>1
d10a96f0 0001
.changes vert pos on map, so that if you try to exit the room the destination is null, and thus you cannot go anywhere
800730b4 03db
.if horiz and pos on map = these numbers (will only equal this when room is "locked")
d00730b0 0015
d00730b4 03db
.and all enemies in room are dead
d0097429 3f80
.change my "tag" to 1
800a96f0 0001
.if room locked and counter=16256, unlocks room
d00730b0 0015
d00730b4 03db
d0097429 3f80
800730b4 0017
Now since my tag is set at 1, the room will NEVER lock again when the player walks in. If I didn't use a tag, it would make it lock each and every time the player walks in until all the monsters were killed. This is basically all I need them for.[/img]
Esco.... the name says it all. New Yorikan for life.