View Full Version : Memory address ref.

Hoof Arted
August 10th, 2001, 17:16
Ok, I will try explain this in the best way I can. I am working on a target that has a complex serial generation routine. I have decieded that the best way to create a keygen is to inject code to MSGBOX it to me. The problem I have is that the BOX shows the correct serial when I am running the target in a debugger, olly or w32dasm, but when I run it natively, the box is empty.

I am making a reference to a memory address that does not seam to change, and always contains the serial. It is quite obvious that this is not the case or it would work without the debuggers. So, my question is this, why does the memory location have the serial when running under the debuggers and not when running on its own?

Any help would be great.


Hoof Arted
August 10th, 2001, 18:24
Ok, I have got it working but I would still like to know why the address changes when using a debugger.

All I did, to fix my problem, was use a PTR to the address so that it will use any address that the system assigns.



August 12th, 2001, 02:27
Hi there,

Perhaps is has something to do with dynamically allocated memory.
Maybe the debug session memory allocation routine returns different PTR to what the realtime routine does. Actually, you should never rely on the memory allocation routine returning the same position in memory everytime you run your programme.