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 


No damage but can repair
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
tysman
Cheater
Reputation: 0

Joined: 06 Jan 2020
Posts: 28

PostPosted: Fri Oct 28, 2022 2:38 pm    Post subject: Reply with quote

Just like with mudrunner the code was working properly, what i had to do was cause i moved my script up 1 opcode i had to place my code below that opcode. Now wont take damage but can repair Smile

Code:

[ENABLE]

aobscanmodule(damage,SnowRunner.exe,41 8B 06 89 07 E8 FF F9) // should be unique
alloc(newmem,$100,"SnowRunner.exe"+B777E7)

label(code)
label(return)

newmem:
mov eax,[r14]
cmp eax,dword [rdi]
jae return
mov [rdi],eax
jmp return

code:
  mov eax,[r14]
  mov [rdi],eax
  jmp return

damage:
  jmp newmem
return:
registersymbol(damage)

[DISABLE]

damage:
  db 41 8B 06 89 07

unregistersymbol(damage)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "SnowRunner.exe"+B777E7

"SnowRunner.exe"+B777C3: 48 8D 4A 18           -  lea rcx,[rdx+18]
"SnowRunner.exe"+B777C7: E8 34 FE A1 00        -  call SnowRunner.exe+1597600
"SnowRunner.exe"+B777CC: 48 63 D8              -  movsxd  rbx,eax
"SnowRunner.exe"+B777CF: 48 03 DE              -  add rbx,rsi
"SnowRunner.exe"+B777D2: EB 03                 -  jmp SnowRunner.exe+B777D7
"SnowRunner.exe"+B777D4: 48 8B DF              -  mov rbx,rdi
"SnowRunner.exe"+B777D7: E8 E4 F8 A1 00        -  call SnowRunner.exe+15970C0
"SnowRunner.exe"+B777DC: 48 8D 43 08           -  lea rax,[rbx+08]
"SnowRunner.exe"+B777E0: 48 85 DB              -  test rbx,rbx
"SnowRunner.exe"+B777E3: 48 0F 45 F8           -  cmovne rdi,rax
// ---------- INJECTING HERE ----------
"SnowRunner.exe"+B777E7: 41 8B 06              -  mov eax,[r14]
"SnowRunner.exe"+B777EA: 89 07                 -  mov [rdi],eax
// ---------- DONE INJECTING  ----------
"SnowRunner.exe"+B777EC: E8 FF F9 A1 00        -  call SnowRunner.exe+15971F0
"SnowRunner.exe"+B777F1: 48 8B 5C 24 30        -  mov rbx,[rsp+30]
"SnowRunner.exe"+B777F6: 48 8B 74 24 38        -  mov rsi,[rsp+38]
"SnowRunner.exe"+B777FB: 48 8B 7C 24 40        -  mov rdi,[rsp+40]
"SnowRunner.exe"+B77800: 83 38 00              -  cmp dword ptr [rax],00
"SnowRunner.exe"+B77803: 0F 95 C0              -  setne al
"SnowRunner.exe"+B77806: 48 83 C4 20           -  add rsp,20
"SnowRunner.exe"+B7780A: 41 5E                 -  pop r14
"SnowRunner.exe"+B7780C: C3                    -  ret
"SnowRunner.exe"+B7780D: CC                    -  int 3
}
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 Discussions All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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