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 


Simple auto assemblers

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
SomeoneElse123
Newbie cheater
Reputation: 0

Joined: 30 Dec 2018
Posts: 11

PostPosted: Tue Jan 01, 2019 1:19 pm    Post subject: Simple auto assemblers Reply with quote

Hi, I'm trying to write two auto assemblers, but noone of them works. Can anyone help me please?

The first one is to copy a value from "add1" to "add2". I wrote something like that:

alloc(newmem,100)
push eax
mov eax,[add1]
mov [add2],eax
pop eax

The second assembler is to do a function manually (games does one function, but I want to do it manually when I want). Can you suggest me any script? I tried to call the function, but it didn't do anything
Back to top
View user's profile Send private message
jungletek
Advanced Cheater
Reputation: 0

Joined: 02 Oct 2011
Posts: 72

PostPosted: Thu Jan 03, 2019 11:58 am    Post subject: Reply with quote

Code:
alloc(newmem,100)
push eax
mov eax,[add1]
mov [add2],eax
pop eax


This isn't enough... is this all your script has, or are you just not copy-pasting the whole thing?

Basically you need to indicate where this code is supposed to be executed, so for example:

Code:
[ENABLE]
aobscanmodule(aobOHK,Yakuza0.exe,0F B7 42 14 41 01 C0)
alloc(ohkMem,$1000,aobOHK)
label(code)
label(return)

ohkMem:
  cmp rdx,[pPlayer]
  je short code
  mov word ptr [rdx+16],0
code:
  movzx eax,word ptr [rdx+14]
  add r8d,eax
  jmp return

aobOHK:
  jmp ohkMem
  nop
  nop
return:
registersymbol(aobOHK)

[DISABLE]
aobOHK:
  db 0F B7 42 14 41 01 C0

unregistersymbol(aobOHK)
dealloc(ohkMem)


This is a simple AOB "injection copy"-style script. It looks for the byte pattern in the AOB in the allocated memory of the game, at which point it replaces that code with what's in the script under the 'aobOHK' section (so it writes a jump to the allocated memory, 'ohkMem' in my case, 'newmem' in yours, and writes nop's to make up the rest of the size of the replaced instruction). Your script isn't specifying WHERE the code you want to execute should be placed, so unless you're calling it via another script or thread (for example) it won't be executed.
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