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 


Cheat Engine Forum Index
PostGo back to topic
TheyCallMeTim13
Wiki Contributor
Reputation: 50
Joined: 24 Feb 2017
Posts: 976
Location: Pluto

PostPosted: Mon Apr 02, 2018 2:39 pm    Post subject:

Code:
[ENABLE]

aobscanmodule(SYNTH3,Atelier_Lydie_and_Suelle.exe,41 0F 11 85 B8 00 00 00 0F) // should be unique
alloc(newmem,$1000,"Atelier_Lydie_and_Suelle.exe"+E5B62)

label(code)
label(return)

label(intSYNTH3)  //// make a label for the value
registerSymbol(intSYNTH3)  //// register it as a user symbol so it can be accessed else where.

newmem:
   code:
      movups [r13+000000B8],xmm0
      push rax  ////  save/push the registry's value on the stack
      mov eax,[intSYNTH3]  //// set EAX (32 bits of RAX) to the value at the address of intSYNTH3
      mov [r13+000000b8],eax  //set saturn to value
      mov [r13+000000bc],eax  //set sun to value
      mov [r13+000000c0],eax  //set moon to value
      mov [r13+000000c4],eax  //add value to quantity
      pop rax  ////  restore/pop the registry's value from the stack
      jmp return
   align 10 CC //// Not required but makes the value easy to see in the memory viewer.
   intSYNTH3: ////  intSYNTH3 (type: 4 bytes) can be used as an address for a memory record on the cheat table.
      dd (int)20  //// "#20" works just fine I just like "(int)20" better my self.


SYNTH3:
   jmp newmem
   nop
   nop
   nop
return:
registersymbol(SYNTH3)

[DISABLE]

SYNTH3:
   db 41 0F 11 85 B8 00 00 00

unregistersymbol(SYNTH3)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "Atelier_Lydie_and_Suelle.exe"+E5B62

"Atelier_Lydie_and_Suelle.exe"+E5B2F: 41 FF C7                 -  inc r15d
"Atelier_Lydie_and_Suelle.exe"+E5B32: 48 83 C5 38              -  add rbp,38
"Atelier_Lydie_and_Suelle.exe"+E5B36: 44 3B F8                 -  cmp r15d,eax
"Atelier_Lydie_and_Suelle.exe"+E5B39: 7C 9C                    -  jl Atelier_Lydie_and_Suelle.exe+E5AD7
"Atelier_Lydie_and_Suelle.exe"+E5B3B: 48 8B AC 24 D0 00 00 00  -  mov rbp,[rsp+000000D0]
"Atelier_Lydie_and_Suelle.exe"+E5B43: 0F 28 44 24 20           -  movaps xmm0,[rsp+20]
"Atelier_Lydie_and_Suelle.exe"+E5B48: 41 0F 11 85 98 00 00 00  -  movups [r13+00000098],xmm0
"Atelier_Lydie_and_Suelle.exe"+E5B50: 0F 28 4C 24 30           -  movaps xmm1,[rsp+30]
"Atelier_Lydie_and_Suelle.exe"+E5B55: 41 0F 11 8D A8 00 00 00  -  movups [r13+000000A8],xmm1
"Atelier_Lydie_and_Suelle.exe"+E5B5D: 0F 28 44 24 40           -  movaps xmm0,[rsp+40]
// ---------- INJECTING HERE ----------
"Atelier_Lydie_and_Suelle.exe"+E5B62: 41 0F 11 85 B8 00 00 00  -  movups [r13+000000B8],xmm0
// ---------- DONE INJECTING  ----------
"Atelier_Lydie_and_Suelle.exe"+E5B6A: 0F 28 4C 24 50           -  movaps xmm1,[rsp+50]
"Atelier_Lydie_and_Suelle.exe"+E5B6F: 41 0F 11 8D C8 00 00 00  -  movups [r13+000000C8],xmm1
"Atelier_Lydie_and_Suelle.exe"+E5B77: 49 8B 06                 -  mov rax,[r14]
"Atelier_Lydie_and_Suelle.exe"+E5B7A: 48 8B 48 48              -  mov rcx,[rax+48]
"Atelier_Lydie_and_Suelle.exe"+E5B7E: E8 0D 6B FF FF           -  call Atelier_Lydie_and_Suelle.exe+DC690
"Atelier_Lydie_and_Suelle.exe"+E5B83: 33 D2                    -  xor edx,edx
"Atelier_Lydie_and_Suelle.exe"+E5B85: 48 8B C8                 -  mov rcx,rax
"Atelier_Lydie_and_Suelle.exe"+E5B88: E8 73 4F FF FF           -  call Atelier_Lydie_and_Suelle.exe+DAB00
"Atelier_Lydie_and_Suelle.exe"+E5B8D: 49 8B 06                 -  mov rax,[r14]
"Atelier_Lydie_and_Suelle.exe"+E5B90: 48 8B 48 48              -  mov rcx,[rax+48]
}

_________________
wiki.CheatEngine.org - Tutorials
OpenCheatTables.org
Back to top
View user's profile Send private message Visit poster's website
Post reviews:   Approve 1
Author Review
Valatros
Review: Approve
Post reference:
ReviewPosted: Mon Apr 02, 2018 9:40 pm

Helped a lot with both editing some injection code for me to accomplish what I want, and putting comments in so that I understand how it works and learned how to do it myself!
Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites