Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Newbie, How can I move registers in to a register?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
seoul
How do I cheat?
Reputation: 0

Joined: 19 Sep 2022
Posts: 3

PostPosted: Mon Sep 19, 2022 3:49 am    Post subject: Newbie, How can I move registers in to a register? Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25287
Location: The netherlands

PostPosted: Mon Sep 19, 2022 4:19 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
seoul
How do I cheat?
Reputation: 0

Joined: 19 Sep 2022
Posts: 3

PostPosted: Mon Sep 19, 2022 6:31 am    Post subject: Reply with quote

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. Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites