find and replace values loaded in memory

I am trying to write a program that will search memory for a hexadecimal string and replace it with the values hardcoded in my program. It’s a game cheat program that is executed after the game is started. I assume this will work similarly to a virus scanning program that scans memory for a character string. I’m somewhat new to C++, but have programmed in Assembly and Pascal. Your help would be greatly appreciated.Thanks,Phillip D. Howardps.I have searched your Q&A files and found nothing related.

You didn’t indicate which platform you are working on. In 32-bit Windows, other programs are protected from such behavior, and you generally cannot directly access memory owned by another process.

While this might be possible in DOS, it is generally considered bad form to read and write memory that your program does not own. If you want to go ahead with this technique, you will need to find some unique sequence of bytes specific to the program you want to modify and then search for that sequence in memory. There is no reliable method I can give you without studying the program myself. But, in general, it is very difficult to perform such tasks in a reliable manner.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: