Can i find memory adress of moving or making actions in games

246 views Asked by At

So I was wondering can I find memory adress of moving, doing some stuff or memory that saves enemy position in program lie cheatengine or am I need reverse engeneering for that? and hypothetically can I go futher and make bot or even ai based on that?

1

There are 1 answers

0
AudioBubble On

Your question is quite vague but I will try to answer what I understood. It will be difficult to help without code and I don't have a dissasembler open right now and I write everything by memory right now so take my instruction references with a grain of salt. They, are after all a guideline and should you make this question more accurate and potentially provide some more information about the game and/or its code I could revise my answer.

You can certainly find your character's position using unknown initial float value scan and increased/decreased value whenever you move.

I suggest going up and down because it's more clear to figure out if you increase or decrease the float value responsible for your character's Y position than going front/back and/or sideways because you don't really know if you are increasing or decreasing your X/Z value and you might need more scans.

When you find the value you're looking for you can find out what accesses or writes to that address and then get one of the instructions and find out what addresses that particular instruction accesses.

You might have a shared instruction between you and the enemies or other entities. If that's the case you can then dissect the data structures using your address and the addresses of a couple enemies or other entities and create 2 separate groups. One for the player and one for the enemies and/or other entities or 3 separate groups. One for the player, one for the enemies and one for other entities and find uncommon values between groups. I suggest int values,bytes or hex values and not floats.

Then you auto-compile an AOB script, make a new variable (you need to allocate space) called something like playerBaseCoords and compare the uncommon values between the groups and then pass the base register to [playerBaseCoords] e.g. If the instruction had [rsi+180] you do mov [playerBaseCoords],rsi

After that you add a new address to your cheat table called playerBaseCoords and make it a pointer or give it the offset that the register had. In this case 180

By the way, most of the times, the other coordinate values are close by in memory so look up and down 4-8 bytes apart from the value you found for some other float values.

Regarding AI and Bots: I think you could probably do something like an aimbot but I have no idea how those things work.