0

I'm trying to define an address so that I can edit its memory later, however I can't figure out a way to access it.

The base address is "program.exe"+00D23440 and has an offset of +30

Normally you would just take the address and add its offset, but there's a string involved here.

What can I do?

2

Modules have a base address where space is allocated for it.
For example in 32 bit this can be 0x00400000.
So "program.exe" is just a placeholder for BASE_ADDRESS+OFFSET
You need to know or find out the base address of your program.
you can do this manually or dynamically
for an example of a dynamic solution see here
https://stackoverflow.com/questions/11564148/how-to-get-the-starting-base-address-of-a-process-in-c
In some situations, the base address can change.
This is why a dynamic solution is be preferred.

  • His 'base address' is 00D23440 though, and I'd expect the DLL-load base address to be 4K aligned at the very least. So I suspect he means something else. – Rup May 31 '17 at 6:05
  • Possibly, it would be useful if OP would post more information on what he is trying to achieve or methods that he's tried. I can see that he needs to find the address that the executable is loaded at (instead of "program.exe"), and he has another offset besides 0x00D23440, which is '+30'. Are they talking about a pointer? e.g. [BASE_ADDRESS+RVA]+offset – Samson Jun 14 '17 at 5:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.