Page 1 of 1

I wan't to solve a Big problem with too many adresses:

Posted: Fri Aug 13, 2021 5:14 pm
by SilverRabbit90
There are games (many actually), where when I try to create a script the game crashes, or blocks some other element such as the game camera or whatever.
For example I search the value for infinite ammo, find them do 'Find out what writes to this adress' and i find the following opcodes write to 'xxxxxxxx' and right click on the instruction and
I do 'Show this adress in the disassembler', once in the Memory Viewer I do the last step before generating a script or: right click on the address just found and do 'Find out what adresses this intruction accesses' and now the prompt to see the instructions contained in the Opcode, the instructions that are shown can be even more than 100 or 1000 and when a shot is fired they can even exceed 10000. I understand why if I try to make infinite ammunition the game crashes, because the instructions containing in the Opcode are too many and practically changing the ammunition changes many other values ​​that should not be changed.
I tried x32dbg / x64dbg and other anticheat methods, I also tried something similar to Step 9 of the cheat engine tutorial but there are too many addresses and it doesn't open the value comparator.

Does anyone know what needs to be done in these cases? The games that have this type of complication are really many, I would like to create more tables but I can't because of this problem.
Videos to follow are also good. Thanks ^^

Re: I wan't to solve a Big problem with too many adresses:

Posted: Fri Aug 13, 2021 9:05 pm
by SenaBlue
Have you used Cheat Engine's "Tracer" to get out of that function?

Re: I wan't to solve a Big problem with too many adresses:

Posted: Fri Aug 13, 2021 9:16 pm
by Marc
That depends, here is my opinion on that matter. Usually, having a code which accesses so many addresses is a bad sign. But you have to investigate further, where the pain originates from.

If the code-addresses are from a vcrun140.dll (you'd see that in the address), see viewtopic.php?t=10394

if you can find any reference to a lua-dll, it is likely that the game-logic is written in lua. So it executes it text-scipt and what you find with the debugger is the binary code of the interpreter-engine of lua. That means: if for example you fiddle around with a subtraction, every single subtraction in the whole game is screwed. The solution in this case is to find a handle to the lua interpreter and inject own commands, but I had never gotten quite the concept of it. ([Link])

And you should try the videos from Cheat The Game: [Link] and for [Link]-

I'm eager to read different / more experienced opinions.

have fun,
Marc

Re: I wan't to solve a Big problem with too many adresses:

Posted: Fri Aug 13, 2021 10:03 pm
by Kitsos
As you mention using "shared instructions" (Instructions that access multiple addresses (either read\write)) can often lead to game crashes, or even corrupt data.
So the better solution for me would be to actually search for an instruction that doesn't end up with many addresses (or one that isn't triggered often).

If that seems impossible, I would try to work my way up, to what called it (break and trace) and see if there is a comparison that differentiates the data.
Usually the data is "structured" (I like to imagine it as a Class so the values would be near. And sometimes its an array of that Class).
Treat it as the large version of step9.

Dissect Data Structure, and Data Structure Comparison (In Memory--> Tools) could save you time.

Also here is a video with a similar scenario from [Link]

Re: I wan't to solve a Big problem with too many adresses:

Posted: Sat Aug 14, 2021 5:23 pm
by SilverRabbit90
Finally I did it thanks a lot to everyone ^^. A bit long process but still I prefer to make pointers.