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 


I want to convert this code to inject code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
TheyCallMeTim13
Wiki Contributor
Reputation: 51

Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Sun Oct 14, 2018 6:55 am    Post subject: Reply with quote

Try using the templates.
https://wiki.cheatengine.org/index.php?title=Tutorials:Auto_Assembler:Templates


And next time try and actually state what the "problem" is. Just saying problem really doesn't say much of anything.
Code:
aobscanmodule(KAsdsgdeu,Conquer.exe,89 45 FC 8B 46 5C)
 alloc(newmem,$1000)
 // globalalloc(speedhackjump,4) // What's this for, it's not used
 label(fix)
 label(code)
 label(return)

 newmem:
 push eax
 mov eax,[conquer.exe+940C2C]
 cmp [eax+BE],(int)131076
 //(float)1.836765975E-40
 pop eax
 jne fix
 push eax
 mov eax,[conquer.exe+940C2C]
 cmp [eax+1E4],#130
 //(float)1.821688004E-43
 pop eax
 jne fix
  mov eax,[conquer.exe+940C2C]
    test eax,eax
     jmp return
//////////////////////////////

fix:
push eax
mov eax,[conquer.exe+940C2C]
cmp [eax+BE],(int)4
//(float)1.836765975E-40
pop eax
jne code
 push eax
 mov eax,[conquer.exe+940C2C]
 mov [eax+BE],(int)131076
  //(float)1.836765975E-40
  pop eax
  jmp return

code:
mov [ebp-04],eax
  mov eax,[esi+5C]
    test eax,eax
      jmp return
      // return: //// You don't want to return here
      registersymbol(KAsdsgdeu)

KAsdsgdeu:
  jmp newmem
  nop // you need some NOPs to pad (anything > 5)
  return: // You return to just after the hook's jump

[DISABLE]
KAsdsgdeu:
  db 89 45 FC 8B 46 5C
  unregistersymbol(KAsdsgdeu)
  dealloc(newmem)

_________________
Back to top
View user's profile Send private message Visit poster's website
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