Code: Select all
{ Game : FarCry®5
Version:
Date : 2018-03-30
Author : budabum
This script does blah blah blah
}
[ENABLE]
aobscanmodule(InfAmmoBet,FC_m64.dll,75 0D 8B 57 4C 39 D3 0F 42 D3 29 57 4C 89 D3)
alloc(infammomem,$1000,InfAmmoBet)
registersymbol(InfAmmoBet)
label(code)
label(return)
infammomem:
code:
reassemble(InfAmmoBet) //jne 7FFAB333A14B
mov edx,[rdi+4C]
cmp ebx,edx
cmovb edx,ebx
//filtered injection
cmp r12d, B3F8DE3E //Pistols
jz short @f
cmp r12d, DB72B88A //Rifle
jz short @f
cmp r12d, DB4CB05F //Grenades
jz short @f
cmp r12d, 83021337 //Molotov
jz short @f
cmp r12d, EC1A4BAB //Explosive Arrow
jz short @f
cmp r12d, EC18BEA6 //Flame Arrow
jz short @f
cmp r12d, B3F9885B //Arrow
jz short @f
cmp r12d, B3F944C4 //Shotgun Shell
jz short @f
cmp r12d, 1B93266E //Shotgun Flame Shell
jz short @f
cmp r12d, DB707C3F //Shotgun Slug
jz short @f
cmp r12d, DB75CA49 //Sniper .50 Cal
jz short @f
cmp r12d, DB75EF64 //Sniper .50 Cal Piercing
jz short @f
cmp r12d, DB6FDC2C //Pistol Piercing
jz short @f
cmp r12d, B3F8942E //Remote Explosive
jz short @f
cmp r12d, B3F9C0EB //Proximity Explosive
jz short @f
cmp r12d, 8302EC24 //Throwing Knife
jz short @f
cmp r12d, 83037F62 //Bait
jz short @f
cmp r12d, 9AE00408 //Dynamite
jz short @f
cmp r12d, 5BD2B432 //Pipe Bomb
jz short @f
cmp r12d, B3FA4191 //Grenade Launcherr
jz short @f
cmp r12d, B3F97273 //SMG Ammo
jz short @f
cmp r12d, DB701FDD //SMG Piercing
jz short @f
cmp r12d, DB72E621 //Rifle Piercing
jz short @f
cmp r12d, B3F959AC //LMG Ammo
jz short @f
cmp r12d, DB745A94 //LMG Piercing
jz short @f
cmp r12d, 7A75CFE2 //Rocket Cluster Ammo
jz short @f
cmp r12d, DB78B52A //Rocket Flame Cluster Ammo
jz short @f
cmp r12d, B3F9A6CB //Rocket Launcher Ammo
jz short @f
cmp r12d, B3FA1F5A //Flame Thrower Ammo
jz short @f
sub [rdi+4C],edx
@@:
mov ebx,edx
jmp return
InfAmmoBet:
jmp far infammomem //14 bytes jump
db 90
return:
[DISABLE]
InfAmmoBet:
db 75 0D 8B 57 4C 39 D3 0F 42 D3 29 57 4C 89 D3
unregistersymbol(InfAmmoBet)
dealloc(infammomem)
{
// ORIGINAL CODE - INJECTION POINT: "FC_m64.dll"+AFDA13C
"FC_m64.dll"+AFDA118: 0F 1F 84 00 00 00 00 00 - nop [rax+rax+00000000]
"FC_m64.dll"+AFDA120: 48 89 5C 24 08 - mov [rsp+08],rbx
"FC_m64.dll"+AFDA125: 57 - push rdi
"FC_m64.dll"+AFDA126: 48 83 EC 20 - sub rsp,20
"FC_m64.dll"+AFDA12A: 48 8B 41 40 - mov rax,[rcx+40]
"FC_m64.dll"+AFDA12E: 48 89 CF - mov rdi,rcx
"FC_m64.dll"+AFDA131: 48 83 C1 40 - add rcx,40
"FC_m64.dll"+AFDA135: 89 D3 - mov ebx,edx
"FC_m64.dll"+AFDA137: FF 50 18 - call qword ptr [rax+18]
"FC_m64.dll"+AFDA13A: 84 C0 - test al,al
// ---------- INJECTING HERE ----------
"FC_m64.dll"+AFDA13C: 75 0D - jne FC_m64.dll+AFDA14B
"FC_m64.dll"+AFDA13E: 8B 57 4C - mov edx,[rdi+4C]
"FC_m64.dll"+AFDA141: 39 D3 - cmp ebx,edx
"FC_m64.dll"+AFDA143: 0F 42 D3 - cmovb edx,ebx
"FC_m64.dll"+AFDA146: 29 57 4C - sub [rdi+4C],edx
"FC_m64.dll"+AFDA149: 89 D3 - mov ebx,edx
// ---------- DONE INJECTING ----------
"FC_m64.dll"+AFDA14B: 85 DB - test ebx,ebx
"FC_m64.dll"+AFDA14D: 74 15 - je FC_m64.dll+AFDA164
"FC_m64.dll"+AFDA14F: 44 8B 47 4C - mov r8d,[rdi+4C]
"FC_m64.dll"+AFDA153: 48 89 F9 - mov rcx,rdi
"FC_m64.dll"+AFDA156: 4C 8B 0F - mov r9,[rdi]
"FC_m64.dll"+AFDA159: 41 8D 14 18 - lea edx,[r8+rbx]
}