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 


How would I deal with mov/lea in this situation?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Wed Nov 27, 2019 10:31 am    Post subject: Reply with quote

What was the original code? If it's "lea esi,[edi+30]", then just use esi- it's not being used before that instruction.

What is asd1 and mymemory? It would be best if you just posted the full script.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4695

PostPosted: Thu Nov 28, 2019 10:29 am    Post subject: Reply with quote

Insecurely wrote:
I then use a move and grab the player which is in edi, and move into asd1 then lea mymemory,[asd1] but you can't use instructions that way even though eax and what not would work fine.
Why use asd1 at all? Just move edi into [mymemory].

Here's a full script:
Code:
// original code:
// lea edi,[esi+60]
// lea esi,[edi+30]

[ENABLE]
aobscan(playerbaseinject,8d 7e 60 8d 77 30)
alloc(newmem,$1000)

label(return)
label(mymemory)

registersymbol(playerbaseinject)
registersymbol(mymemory)

newmem:
  lea edi,[esi+60]
  mov [mymemory],edi
  lea esi,[edi+30]
  jmp return

newmem+800:
mymemory:
  dd 0

playerbaseinject:
  jmp newmem
  nop
return:

[DISABLE]
dealloc(newmem)

unregistersymbol(playerbaseinject)
unregistersymbol(mymemory)

playerbaseinject:
  db 8d 7e 60 8d 77 30
Then just use the symbol mymemory in your cheat table like a pointer with one offset.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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