Nevitar How do I cheat?
Reputation: 0
Joined: 04 Aug 2021 Posts: 8
|
Posted: Fri Aug 06, 2021 11:27 am Post subject: |
|
|
| LeFiXER wrote: | aobscan will scan a module's memory for the matching bytes, which represent instructions in ASM but doesn't actually return an address. It gives you a location where you can manipulate the instructions directly.
A pointer is usually held in a register e.g. EAX/RAX, EDI/RDI (32-bit/64-bit), the game will mov the pointer (address which pointer to a value) data from one register to another, sometimes with an offset to denote how far behind, or further forward in memory the data should be moved to.
In the memory viewer window on the left side you have the addresses of the module's functions. The centre column is the bytes which represent the instructions in machine code form, the column to the right of the byte column
is the instructions in human-readable form (ASM).
Think of addresses as streets, and on those streets are houses (registers) and those houses have numbers (offsets).
When data is accessed it needs to know where to look. Armed with that analogy I'll do my best to explain.
in ASM the convention is like this:
| Quote: |
instruction destination,source
|
Examples of instructions are:
mov, jmp, jne, jz, je, cmp etc...
Examples of how data is moved in memory:
| Code: |
mov rax,[rdi] // move the information held in the house RDI to the house RAX
mov ebp,[rax-4] // move the value held in the house 4 numbers behind RAX to the house EBP
mov [rdi+8],rax // move the value held in the house RAX to the house 8 numbers in front of RDI
mov eax,ecx // move the house ECX to the house EAX
|
It's worth noting that these numbers are byte values. |
| TheyCallMeTim13 wrote: | | You'll need to find the instruction that accesses the real value. I'd look for the list/array base, so you'll need to do some back tracing. You'll likely find something like "[RAX+RCX*8+10]", where one registry is the list base and the other is the item index. Once you find the base just look for an instruction that runs constantly or at least when you look at inventory, so you'll get the new address whenever it changes. |
I missed your replies, thank you for the exhaustive explanation!
I will have to look into this a bit more.
I did try to find a base address or a pointer but failed to do so.
From what I can tell all the stored valued do not change together... like inventory moves around, but not necessarily in relation to how for example upgrades move around.
I have one pointer fixed, that some values move together with, found it with some help, but it doesn't work for all sections. I tried to expand on his example but only got compilation errors :P
Actually the need for this somewhat disappeared for now, although might be good to know how for future adventures.
However a new issue arrised, perhaps incorporating Mono.
One achievement seem bugged and will not trigger, curious about if it is possible to find out what is supposed to trigger and cause that?
|
|