 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Iniar How do I cheat?
Reputation: 0
Joined: 05 Dec 2023 Posts: 8
|
Posted: Tue Feb 03, 2026 7:57 am Post subject: Array of addresses from the instruction |
|
|
| Hello everyone. I have a question. I have an instruction in the game that works with three addresses simultaneously. That is, when I click the "Find addresses" button, I get three addresses that this instruction accesses. Could you tell me how I can store these three addresses in a variable so that I can access each of them individually in my auto-assembler script?
|
|
| Back to top |
|
 |
Csimbi I post too much
Reputation: 98
Joined: 14 Jul 2007 Posts: 3353
|
Posted: Tue Feb 03, 2026 1:06 pm Post subject: |
|
|
Add LUA code to:
1. Check if address exist in address list.
2. If not, add it.
3. Done.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 153
Joined: 06 Jul 2014 Posts: 4733
|
Posted: Tue Feb 03, 2026 3:22 pm Post subject: |
|
|
Make an AA script that copies each address into some memory you control. Search "injection copy". If the addresses you want are distinct, you should use some comparisons to distinguish between them: see step 9 of the CE tutorial. If they're not, you could store each in an array, but if the addresses ever change, it'll be hard to know when they should be removed or updated.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Iniar How do I cheat?
Reputation: 0
Joined: 05 Dec 2023 Posts: 8
|
Posted: Wed Feb 04, 2026 8:09 am Post subject: |
|
|
| Csimbi wrote: | Add LUA code to:
1. Check if address exist in address list.
2. If not, add it.
3. Done. |
Could you please give me some examples?
I understand this algorithm myself. I'm interested in the practical implementation of the code.
| ParkourPenguin wrote: | | Make an AA script that copies each address into some memory you control. Search "injection copy". If the addresses you want are distinct, you should use some comparisons to distinguish between them: see step 9 of the CE tutorial. If they're not, you could store each in an array, but if the addresses ever change, it'll be hard to know when they should be removed or updated. |
Could you please provide some examples? I've already gone through the tutorial a hundred times and gained enough knowledge. I don't need to filter the addresses; I need to store all three addresses that the instruction accesses into a variable so that I can then access each of them using an offset.
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 153
Joined: 06 Jul 2014 Posts: 4733
|
Posted: Wed Feb 04, 2026 1:44 pm Post subject: |
|
|
| Iniar wrote: | | I don't need to filter the addresses; I need to store all three addresses that the instruction accesses into a variable so that I can then access each of them using an offset. | Finding something to differentiate them would allow you to store each to their own unique slot. That's the safest way of doing this.
You haven't said whether or not the addresses that the instruction accesses change. If they don't, then use something like this code that stores the first 3 addresses it sees:
| Code: | [ENABLE]
...
alloc(newmem,2048)
alloc(stored_addresses,24)
label(s0 s1 s2 exit)
newmem:
// original code
add [rsi+48],eax
lea rax,[rcx*8]
cmp qword ptr [stored_addresses],0
je s0
cmp qword ptr [stored_addresses+8],0
je s1
cmp qword ptr [stored_addresses+10],0
je s2
exit:
jmp return
s0:
mov [stored_addresses],rsi
jmp exit
s1:
mov [stored_addresses+8],rsi
jmp exit
s2:
mov [stored_addresses+10],rsi
jmp exit
stored_addresses:
dq 0 0 0
INJECT:
jmp newmem
...
return:
...
registersymbol(stored_addresses)
[DISABLE]
...
dealloc(stored_addresses)
unregistersymbol(stored_addresses)
| Add a new address to the address list, check the "Pointer" checkbox, base address is stored_addresses / stored_addresses+8 / stored_addresses+10, only offset is 48 (in this example). When the game eventually runs the injected code, the memory records will populate.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
Iniar How do I cheat?
Reputation: 0
Joined: 05 Dec 2023 Posts: 8
|
Posted: Thu Feb 05, 2026 10:10 am Post subject: |
|
|
| ParkourPenguin wrote: | | Iniar wrote: | | I don't need to filter the addresses; I need to store all three addresses that the instruction accesses into a variable so that I can then access each of them using an offset. | Finding something to differentiate them would allow you to store each to their own unique slot. That's the safest way of doing this.
You haven't said whether or not the addresses that the instruction accesses change. If they don't, then use something like this code that stores the first 3 addresses it sees:
| Code: | [ENABLE]
...
alloc(newmem,2048)
alloc(stored_addresses,24)
label(s0 s1 s2 exit)
newmem:
// original code
add [rsi+48],eax
lea rax,[rcx*8]
cmp qword ptr [stored_addresses],0
je s0
cmp qword ptr [stored_addresses+8],0
je s1
cmp qword ptr [stored_addresses+10],0
je s2
exit:
jmp return
s0:
mov [stored_addresses],rsi
jmp exit
s1:
mov [stored_addresses+8],rsi
jmp exit
s2:
mov [stored_addresses+10],rsi
jmp exit
stored_addresses:
dq 0 0 0
INJECT:
jmp newmem
...
return:
...
registersymbol(stored_addresses)
[DISABLE]
...
dealloc(stored_addresses)
unregistersymbol(stored_addresses)
| Add a new address to the address list, check the "Pointer" checkbox, base address is stored_addresses / stored_addresses+8 / stored_addresses+10, only offset is 48 (in this example). When the game eventually runs the injected code, the memory records will populate. |
Good day. Thank you very much for the example. I understand the logic behind it. It checks if the memory is empty, and if it is, it writes the data to memory with offsets.
However, I tried to integrate it into my script code, and either the memory remains empty, or the game crashes. Could you please tell me how to insert your code into my script?
| Code: | [ENABLE]
aobscanmodule(INJECT,arx.exe,55 21 8C 62 D0 88 34 00) // should be unique
alloc(newmem,$1000,INJECT)
label(code)
label(return)
newmem:
code:
mov ecx,[rbx+r12+007388D0]
jmp return
INJECT:
jmp newmem
nop 3
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 55 21 8C 62 D0 88 34 00
unregistersymbol(INJECT)
dealloc(newmem) |
P.S.
Thank you again for the example. I figured it out and integrated it into my script. Everything worked out just as I wanted. Now I know how to add what I'm planning to add next. Thank you so much again.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|