View previous topic :: View next topic |
Author |
Message |
Noobrzor Advanced Cheater
Reputation: 0
Joined: 19 May 2014 Posts: 74
|
Posted: Thu Sep 17, 2015 6:53 am Post subject: Allocating memory in a specific region |
|
|
Greetings
I am fooling around with x64 game, and as I used the template for code injection I found out this:
alloc(newmem,512,"gamedll_x64_rwdi.dll"+5E2119)
My research, aka finding Dark Byte's post, says it's because the jmp newmem can't jump such a long distance, and the third parameter in alloc is the region the memory will be allocated to.
But how does that work? I mean allocating memory adds in bytes at the end of the program, or so I figure, simply making it bigger, but since it's in an additional area there is no risk of any conflicts. But in a region, it means the memory is allocated somewhere in between bytes which correspond to opcodes, or how?
I mean, adding just one byte somewhere inside a functional procedure shifts the reading matrix of the entire game so it's a guaranteed instacrash. How is allocating memory in this manner, to a specific region, different?
Cheers! |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Sep 17, 2015 7:18 am Post subject: |
|
|
it doesn't allocate at that exact spot. ,it just picks an unallocated block of memory nearby the given address, and allocates the memory there (no shifting required) _________________
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 |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
|
Back to top |
|
 |
Noobrzor Advanced Cheater
Reputation: 0
Joined: 19 May 2014 Posts: 74
|
Posted: Thu Sep 17, 2015 4:18 pm Post subject: |
|
|
I thank you for answers. |
|
Back to top |
|
 |
|