View previous topic :: View next topic |
Author |
Message |
seoul How do I cheat? Reputation: 0
Joined: 19 Sep 2022 Posts: 3
|
Posted: Mon Sep 19, 2022 3:49 am Post subject: Newbie, How can I move registers in to a register? |
|
|
Hi, I'm trying to put the [r14+rax+40] into [myAddress] but I'm kind of confuse why it is not working. When I tried just only mov[myAddress],r14. It works normally and I can just add offsets to get the correct value later in the table.
However, the R14+RAX values did change sometime and I would like to put R14+RAX values directly to the [myAddress] So that I dont have to change offsets if the offsets arent working.
Code: |
newmem:
mov [myAddress],[r14+rax+40]
code:
mov r15d,[r14+rax+40]
jmp return
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Mon Sep 19, 2022 4:19 am Post subject: |
|
|
How big is the memory of myAddress?
I'm assuming 8 bytes here:
Code: |
newmem:
//we can use r15 as it's going to get overwritten anyhow (else look into push/pop)
lea r15,[r14+rax+40] //lea=Load Effective Address. r15 will get the result of the calculation of r14+rax+40
mov [myAddress],r15 //store the value of r15 (which holds the address r14+rax+40) into myAddress
code:
mov r15d,[r14+rax+40]
jmp return
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
seoul How do I cheat? Reputation: 0
Joined: 19 Sep 2022 Posts: 3
|
Posted: Mon Sep 19, 2022 6:31 am Post subject: |
|
|
Dark Byte wrote: | How big is the memory of myAddress?
I'm assuming 8 bytes here:
Code: |
newmem:
//we can use r15 as it's going to get overwritten anyhow (else look into push/pop)
lea r15,[r14+rax+40] //lea=Load Effective Address. r15 will get the result of the calculation of r14+rax+40
mov [myAddress],r15 //store the value of r15 (which holds the address r14+rax+40) into myAddress
code:
mov r15d,[r14+rax+40]
jmp return
|
|
Yes, the memory of myAddress is 8 bytes.
Thank you so much for a well explanation. I understand a lot better. It solved what im struggling with.
|
|
Back to top |
|
|
|