Code: Select all
{======================
Author : aanpsx
Date : 2021-06-10
Game : StateOfDecay2-Win64-Shipping.exe
Version : 1.0.0.0
======================}
define(bytes_Spread1,db F3 0F 11 83 FC 00 00 00)
define(bytes_Spread2,db F3 0F 11 87 FC 00 00 00)
define(fmax,(float)999999999)
define(fmin,(float)0)
define(imax,#999999999)
define(psx,align 10 CC)
define(mov1,mov byte ptr)
define(mov2,mov word ptr)
define(mov4,mov dword ptr)
define(cmp1,cmp byte ptr)
define(cmp2,cmp word ptr)
define(cmp4,cmp dword ptr)
define(bit,byte ptr)
define(8b,dq 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)
//---------- 0 8101820283038404850586068707880889098a0a8b0b8c0c8d0c8e0e8f0f8000810
//================================================================================
[ENABLE]
{$lua}
if syntaxcheck then return end
-----------------------
memrec.Color=0x0080FF00
-------------- A.B.G.R
{$asm}
aobscanmodule(PSX_Spread1,$process,F3 ** ** ** ** ** ** ** 48 8B ** ** F3 ** ** ** ** ** ** ** 0F 2F)//F3 0F 11 83 FC 00 00 00 48)//StateOfDecay2-Win64-Shipping.exe+580F0B
alloc(newmem_Spread1,$1000,PSX_Spread1)
label(code_Spread1,_Spread1)
registersymbol(PSX_Spread1,code_Spread1,_Spread1)
newmem_Spread1:
mov [_Spread1],rbx //main pointer
mov [_Spread1+8],rax
mov [_Spread1+10],rbx
mov [_Spread1+18],rcx
mov [_Spread1+20],rdx
mov [_Spread1+28],rdi
mov [_Spread1+30],rsi
mov [_Spread1+38],r8
mov [_Spread1+40],r9
mov [_Spread1+48],r10
mov [_Spread1+50],r11
mov [_Spread1+58],r12
mov [_Spread1+60],r13
mov [_Spread1+68],r14
mov [_Spread1+70],r15
//================== inject here
mov [rbx+FC],0
jmp return_Spread1
exit_Spread1:
//==================
//mov rax,[_Spread1+8]
//mov rbx,[_Spread1+10]
//mov rcx,[_Spread1+18]
//mov rdx,[_Spread1+20]
//mov rdi,[_Spread1+28]
//mov rsi,[_Spread1+30]
//mov r8,[_Spread1+38]
//mov r9,[_Spread1+40]
//mov r10,[_Spread1+48]
//mov r11,[_Spread1+50]
//mov r12,[_Spread1+58]
//mov r13,[_Spread1+60]
//mov r14,[_Spread1+68]
//mov r15,[_Spread1+70]
//==================
code_Spread1:
readmem(PSX_Spread1,8)
//movss [rbx+000000FC],xmm0
jmp return_Spread1
psx
_Spread1:
8b
PSX_Spread1:
jmp newmem_Spread1
nop 3
return_Spread1:
//
aobscanmodule(PSX_Spread2,$process,F3 ** ** ** ** ** ** ** 0F 28 ** ** ** 48 83 ** ** 5F C3 48 89)//F3 0F 11 87 FC 00 00 00)//StateOfDecay2-Win64-Shipping.exe+59D82D
alloc(newmem_Spread2,$1000,PSX_Spread2)
label(code_Spread2,_Spread2)
registersymbol(PSX_Spread2,code_Spread2,_Spread2)
newmem_Spread2:
mov [_Spread2],rdi //main pointer
mov [_Spread2+8],rax
mov [_Spread2+10],rbx
mov [_Spread2+18],rcx
mov [_Spread2+20],rdx
mov [_Spread2+28],rdi
mov [_Spread2+30],rsi
mov [_Spread2+38],r8
mov [_Spread2+40],r9
mov [_Spread2+48],r10
mov [_Spread2+50],r11
mov [_Spread2+58],r12
mov [_Spread2+60],r13
mov [_Spread2+68],r14
mov [_Spread2+70],r15
//================== inject here
mov [rdi+FC],0
jmp return_Spread2
exit_Spread2:
//==================
//mov rax,[_Spread2+8]
//mov rbx,[_Spread2+10]
//mov rcx,[_Spread2+18]
//mov rdx,[_Spread2+20]
//mov rdi,[_Spread2+28]
//mov rsi,[_Spread2+30]
//mov r8,[_Spread2+38]
//mov r9,[_Spread2+40]
//mov r10,[_Spread2+48]
//mov r11,[_Spread2+50]
//mov r12,[_Spread2+58]
//mov r13,[_Spread2+60]
//mov r14,[_Spread2+68]
//mov r15,[_Spread2+70]
//==================
code_Spread2:
readmem(PSX_Spread2,8)
//movss [rdi+000000FC],xmm0
jmp return_Spread2
psx
_Spread2:
8b
PSX_Spread2:
jmp newmem_Spread2
nop 3
return_Spread2:
//
[DISABLE]
{$lua}
if syntaxcheck then return end
-----------------------
memrec.Color=0x00FF80FF
-------------- A.B.G.R
{$asm}
unregistersymbol(*)//unreg all
dealloc(*)//dealoc all
//unregistersymbol(PSX_Spread1,code_Spread1,_Spread1)
//dealloc(newmem_Spread1)
PSX_Spread1:
readmem(code_Spread1,8)
//movss [rbx+000000FC],xmm0
PSX_Spread2:
readmem(code_Spread2,8)
//movss [rdi+000000FC],xmm0
{
// ORIGINAL CODE - INJECTION POINT: StateOfDecay2-Win64-Shipping.exe+580F0B
StateOfDecay2-Win64-Shipping.exe+580E92: 48 85 FF - test rdi,rdi
StateOfDecay2-Win64-Shipping.exe+580E95: 0F 84 03 01 00 00 - je StateOfDecay2-Win64-Shipping.exe+580F9E
StateOfDecay2-Win64-Shipping.exe+580E9B: 84 D2 - test dl,dl
StateOfDecay2-Win64-Shipping.exe+580E9D: 74 31 - je StateOfDecay2-Win64-Shipping.exe+580ED0
StateOfDecay2-Win64-Shipping.exe+580E9F: 48 8B 47 28 - mov rax,[rdi+28]
StateOfDecay2-Win64-Shipping.exe+580EA3: F3 0F 10 80 94 01 00 00 - movss xmm0,[rax+00000194]
StateOfDecay2-Win64-Shipping.exe+580EAB: F3 0F 58 81 00 01 00 00 - addss xmm0,[rcx+00000100]
StateOfDecay2-Win64-Shipping.exe+580EB3: 0F 2F 05 72 D4 D8 02 - comiss xmm0,[StateOfDecay2-Win64-Shipping.exe+330E32C]
StateOfDecay2-Win64-Shipping.exe+580EBA: F3 0F 11 81 00 01 00 00 - movss [rcx+00000100],xmm0
StateOfDecay2-Win64-Shipping.exe+580EC2: 76 16 - jna StateOfDecay2-Win64-Shipping.exe+580EDA
StateOfDecay2-Win64-Shipping.exe+580EC4: C7 81 00 01 00 00 00 00 48 42 - mov [rcx+00000100],42480000
StateOfDecay2-Win64-Shipping.exe+580ECE: EB 0A - jmp StateOfDecay2-Win64-Shipping.exe+580EDA
StateOfDecay2-Win64-Shipping.exe+580ED0: C7 81 00 01 00 00 00 00 80 3F - mov [rcx+00000100],3F800000
StateOfDecay2-Win64-Shipping.exe+580EDA: 48 8B 47 28 - mov rax,[rdi+28]
StateOfDecay2-Win64-Shipping.exe+580EDE: F3 0F 10 89 00 01 00 00 - movss xmm1,[rcx+00000100]
StateOfDecay2-Win64-Shipping.exe+580EE6: F3 0F 10 80 8C 01 00 00 - movss xmm0,[rax+0000018C]
StateOfDecay2-Win64-Shipping.exe+580EEE: F3 0F 58 05 16 F1 D6 02 - addss xmm0,[StateOfDecay2-Win64-Shipping.exe+32F000C]
StateOfDecay2-Win64-Shipping.exe+580EF6: E8 03 50 5F 02 - call StateOfDecay2-Win64-Shipping.exe+2B75EFE
StateOfDecay2-Win64-Shipping.exe+580EFB: F3 0F 5C 05 09 F1 D6 02 - subss xmm0,[StateOfDecay2-Win64-Shipping.exe+32F000C]
StateOfDecay2-Win64-Shipping.exe+580F03: F3 0F 58 83 FC 00 00 00 - addss xmm0,[rbx+000000FC]
// ---------- INJECTING HERE ----------
StateOfDecay2-Win64-Shipping.exe+580F0B: F3 0F 11 83 FC 00 00 00 - movss [rbx+000000FC],xmm0
// ---------- DONE INJECTING ----------
StateOfDecay2-Win64-Shipping.exe+580F13: 48 8B 47 28 - mov rax,[rdi+28]
StateOfDecay2-Win64-Shipping.exe+580F17: F3 0F 10 88 84 01 00 00 - movss xmm1,[rax+00000184]
StateOfDecay2-Win64-Shipping.exe+580F1F: 0F 2F C1 - comiss xmm0,xmm1
StateOfDecay2-Win64-Shipping.exe+580F22: 76 08 - jna StateOfDecay2-Win64-Shipping.exe+580F2C
StateOfDecay2-Win64-Shipping.exe+580F24: F3 0F 11 8B FC 00 00 00 - movss [rbx+000000FC],xmm1
StateOfDecay2-Win64-Shipping.exe+580F2C: 8B 83 FC 00 00 00 - mov eax,[rbx+000000FC]
StateOfDecay2-Win64-Shipping.exe+580F32: 0F 57 C9 - xorps xmm1,xmm1
StateOfDecay2-Win64-Shipping.exe+580F35: 89 83 0C 01 00 00 - mov [rbx+0000010C],eax
StateOfDecay2-Win64-Shipping.exe+580F3B: C7 83 04 01 00 00 00 00 00 00 - mov [rbx+00000104],00000000
StateOfDecay2-Win64-Shipping.exe+580F45: 48 8B 47 28 - mov rax,[rdi+28]
StateOfDecay2-Win64-Shipping.exe+580F49: F3 0F 10 90 8C 01 00 00 - movss xmm2,[rax+0000018C]
StateOfDecay2-Win64-Shipping.exe+580F51: F3 0F 58 90 7C 01 00 00 - addss xmm2,[rax+0000017C]
StateOfDecay2-Win64-Shipping.exe+580F59: F3 0F 10 98 84 01 00 00 - movss xmm3,[rax+00000184]
StateOfDecay2-Win64-Shipping.exe+580F61: F3 0F 10 A0 9C 01 00 00 - movss xmm4,[rax+0000019C]
StateOfDecay2-Win64-Shipping.exe+580F69: F3 0F 10 80 A4 01 00 00 - movss xmm0,[rax+000001A4]
StateOfDecay2-Win64-Shipping.exe+580F71: F3 0F 5C DA - subss xmm3,xmm2
StateOfDecay2-Win64-Shipping.exe+580F75: 0F 2F D9 - comiss xmm3,xmm1
StateOfDecay2-Win64-Shipping.exe+580F78: 76 10 - jna StateOfDecay2-Win64-Shipping.exe+580F8A
StateOfDecay2-Win64-Shipping.exe+580F7A: F3 0F 10 8B FC 00 00 00 - movss xmm1,[rbx+000000FC]
StateOfDecay2-Win64-Shipping.exe+580F82: F3 0F 5C CA - subss xmm1,xmm2
}
{
// ORIGINAL CODE - INJECTION POINT: StateOfDecay2-Win64-Shipping.exe+59D82D
StateOfDecay2-Win64-Shipping.exe+59D7CC: 48 8B D0 - mov rdx,rax
StateOfDecay2-Win64-Shipping.exe+59D7CF: 48 8B CB - mov rcx,rbx
StateOfDecay2-Win64-Shipping.exe+59D7D2: 41 FF 90 B8 05 00 00 - call qword ptr [r8+000005B8]
StateOfDecay2-Win64-Shipping.exe+59D7D9: 48 8B C8 - mov rcx,rax
StateOfDecay2-Win64-Shipping.exe+59D7DC: E8 0F D3 FF FF - call StateOfDecay2-Win64-Shipping.exe+59AAF0
StateOfDecay2-Win64-Shipping.exe+59D7E1: 48 8B 5C 24 40 - mov rbx,[rsp+40]
StateOfDecay2-Win64-Shipping.exe+59D7E6: 84 C0 - test al,al
StateOfDecay2-Win64-Shipping.exe+59D7E8: 75 4B - jne StateOfDecay2-Win64-Shipping.exe+59D835
StateOfDecay2-Win64-Shipping.exe+59D7EA: F3 0F 10 9F 08 01 00 00 - movss xmm3,[rdi+00000108]
StateOfDecay2-Win64-Shipping.exe+59D7F2: 0F 57 C0 - xorps xmm0,xmm0
StateOfDecay2-Win64-Shipping.exe+59D7F5: 0F 2E D8 - ucomiss xmm3,xmm0
StateOfDecay2-Win64-Shipping.exe+59D7F8: 74 3B - je StateOfDecay2-Win64-Shipping.exe+59D835
StateOfDecay2-Win64-Shipping.exe+59D7FA: F3 0F 58 B7 04 01 00 00 - addss xmm6,[rdi+00000104]
StateOfDecay2-Win64-Shipping.exe+59D802: 48 8B 87 10 01 00 00 - mov rax,[rdi+00000110]
StateOfDecay2-Win64-Shipping.exe+59D809: F3 0F 10 8F 0C 01 00 00 - movss xmm1,[rdi+0000010C]
StateOfDecay2-Win64-Shipping.exe+59D811: F3 0F 11 B7 04 01 00 00 - movss [rdi+00000104],xmm6
StateOfDecay2-Win64-Shipping.exe+59D819: 0F 28 C6 - movaps xmm0,xmm6
StateOfDecay2-Win64-Shipping.exe+59D81C: 48 8B 48 28 - mov rcx,[rax+28]
StateOfDecay2-Win64-Shipping.exe+59D820: F3 0F 10 91 7C 01 00 00 - movss xmm2,[rcx+0000017C]
StateOfDecay2-Win64-Shipping.exe+59D828: E8 93 0C 00 00 - call StateOfDecay2-Win64-Shipping.exe+59E4C0
// ---------- INJECTING HERE ----------
StateOfDecay2-Win64-Shipping.exe+59D82D: F3 0F 11 87 FC 00 00 00 - movss [rdi+000000FC],xmm0
// ---------- DONE INJECTING ----------
StateOfDecay2-Win64-Shipping.exe+59D835: 0F 28 74 24 20 - movaps xmm6,[rsp+20]
StateOfDecay2-Win64-Shipping.exe+59D83A: 48 83 C4 30 - add rsp,30
StateOfDecay2-Win64-Shipping.exe+59D83E: 5F - pop rdi
StateOfDecay2-Win64-Shipping.exe+59D83F: C3 - ret
StateOfDecay2-Win64-Shipping.exe+59D840: 48 89 5C 24 08 - mov [rsp+08],rbx
StateOfDecay2-Win64-Shipping.exe+59D845: 48 89 74 24 10 - mov [rsp+10],rsi
StateOfDecay2-Win64-Shipping.exe+59D84A: 57 - push rdi
StateOfDecay2-Win64-Shipping.exe+59D84B: 48 83 EC 20 - sub rsp,20
StateOfDecay2-Win64-Shipping.exe+59D84F: 48 8B B1 00 01 00 00 - mov rsi,[rcx+00000100]
StateOfDecay2-Win64-Shipping.exe+59D856: 48 8B F9 - mov rdi,rcx
StateOfDecay2-Win64-Shipping.exe+59D859: 8B DA - mov ebx,edx
StateOfDecay2-Win64-Shipping.exe+59D85B: 48 8B 4E 30 - mov rcx,[rsi+30]
StateOfDecay2-Win64-Shipping.exe+59D85F: 48 85 C9 - test rcx,rcx
StateOfDecay2-Win64-Shipping.exe+59D862: 74 13 - je StateOfDecay2-Win64-Shipping.exe+59D877
StateOfDecay2-Win64-Shipping.exe+59D864: 48 83 B9 00 01 00 00 00 - cmp qword ptr [rcx+00000100],00
StateOfDecay2-Win64-Shipping.exe+59D86C: 75 09 - jne StateOfDecay2-Win64-Shipping.exe+59D877
StateOfDecay2-Win64-Shipping.exe+59D86E: 48 8B 01 - mov rax,[rcx]
StateOfDecay2-Win64-Shipping.exe+59D871: FF 90 D0 02 00 00 - call qword ptr [rax+000002D0]
StateOfDecay2-Win64-Shipping.exe+59D877: 8B D3 - mov edx,ebx
StateOfDecay2-Win64-Shipping.exe+59D879: 88 5E 5C - mov [rsi+5C],bl
}