Saving an address in C ++ - the hacker code of the game?

I have this code that edits the addresses in the game to get unlimited ammunition and what isn’t, and I found out that the addresses are different for each computer, sometimes every time you restart the game, since I can even handle this work if they change.

+4
source share
6 answers

If you get the address you are looking for, then search this address in memory to find the address of the pointer to this data, and then search this address in memory so that you can find the address of the pointer to it, etc., you can end up finding an address that doesn't change. Then at runtime, you can use this as a starting point and dereference it to find the location you want. Of course, it all depends on how the data is presented internally. It can get very complicated.

+7
source

Signature signature for the contents of the entry on the heap. Perhaps using the editing distance from specific known content.

No harm, I reply, since you should have asked, you probably have no cuts to take it off.

+8
source

The best way is to look for patterns in memory and work using offsets. It will not be easy, because this is what game developers want to stop.

Thus, they will not have a good text string with the inscription "Ammo stores 27 bytes before the beginning of this line."

If they do complex things, for example, moving them every time the game starts (and I would be because I am insidious), you need to parse their code to find out how they determine memory.

Then you do the same. I know it sounds simple, and it does. But based on your past questions, I'm not sure if "H4cKL0rD" is a good nickname :-), at least in this case.

If you are not comfortable working with disassemblers, hexadecimal editors, etc., there will almost certainly be a program that does this for you.

+2
source

You are either about to give up or become very good with a disassembler.

+1
source

If you just want to do this job and don’t care about encoding it yourself, you can use a program specially designed for this task, for example T-Search .

+1
source

I would say preload some kind of custom memory allocator and try to find what size malloc () you are looking for.

Since the data that you are trying to hack is likely to be stored in a structure with other parameters, knowing that the size of the structure will allow you to take special actions when you see the selection of this size.

typedef struct { int ammo; int damage; int fire_distance; } Sniper_AWP_T; void *my_custom_malloc( int size ){ void *ret = malloc(size); if( size == sizeof( Sniper_AWP_T ) ){ hack_address = ret; } return ret; } // later on hack_address->ammo = 999; 
0
source

All Articles