glecas wrote: ↑Tue Jan 30, 2018 2:22 am
...
Ok so I never proved it but I think that in hitting the combatant while knocked out had it jumping part way in the hooks jump, but after moving things a bit this seems to work, but hitting them now causes them to wake up.
Code: Select all
{
Process : mgsvtpp.exe - (x64)
Module : mgsvtpp.exe
Game Title : Metal Gear Solid 5 Phantom Pain
Game Version : 1.0.12.0
CE Version : 6.7
Script Version : 0.0.1
Date : 01/29/18
Author : ShyTwig16
Name : CombatantConsciousnessDecHook
Combatant Consciousness Dec Hook
}
{$STRICT}
define(address, mgsvtpp.exe+43EB241)
define(bytes, 66 39 C8 66 0F 42 C8 66 29 C8)
////
//// ------------------------------ ENABLE ------------------------------
[ENABLE]
aobScanModule(aobCombatantConsciousnessDecHook, mgsvtpp.exe, 0FB7xxxx66xxxx66xxxxxx66xxxx66xxxxxx0FB7xxxx66xxxx74xx66xxxx75xx66xxxxxxxxEBxx66xxxxxx72xx44xxxxxx0FB7xxxx66xxxxxx74xx0FB6xxxx)
define(injCombatantConsciousnessDecHook, aobCombatantConsciousnessDecHook+4)
assert(injCombatantConsciousnessDecHook, bytes)
registerSymbol(injCombatantConsciousnessDecHook)
alloc(memCombatantConsciousnessDecHook, 0x400, injCombatantConsciousnessDecHook)
label(flgCombatantConsciousnessDecHook)
registerSymbol(flgCombatantConsciousnessDecHook)
// 00:Stun Only
// 01:One Hit Kills
label(ptrCombatantConsciousnessDecHook)
registerSymbol(ptrCombatantConsciousnessDecHook)
label(n_code)
label(o_code)
label(exit)
label(return)
memCombatantConsciousnessDecHook:
flgCombatantConsciousnessDecHook:
db 00
align 4
ptrCombatantConsciousnessDecHook:
dq 0
align 10 CC
n_code:
mov [ptrCombatantConsciousnessDecHook],rbx
mov cx,[rbx+20]
mov ax,0
cmp byte ptr [flgCombatantConsciousnessDecHook],01
jne o_code
mov word ptr [rbx+1A],0
o_code:
// cmp ax,cx
// cmovb cx,ax
// sub ax,cx
exit:
jmp return
////
//// ---------- Injection Point ----------
injCombatantConsciousnessDecHook:
jmp n_code
nop
nop
nop
nop
nop
return:
////
//// ------------------------------ DISABLE ------------------------------
[DISABLE]
////
//// ---------- Injection Point ----------
injCombatantConsciousnessDecHook:
db bytes
unregisterSymbol(injCombatantConsciousnessDecHook)
unregisterSymbol(flgCombatantConsciousnessDecHook)
unregisterSymbol(ptrCombatantConsciousnessDecHook)
dealloc(memCombatantConsciousnessDecHook)
{
//// Injection Point: mgsvtpp.exe+43EB241 - 00000001443EB241
//// AOB address: 00000001443EB23D - mgsvtpp.exe+43EB23D
//// Process: mgsvtpp.exe - 0000000140000000
//// Module: mgsvtpp.exe - 0000000140000000
//// Module Size: 0000000008434000
mgsvtpp.exe+43EB1EF: 0F2F C8 - comiss xmm1,xmm0
mgsvtpp.exe+43EB1F2: 77 40 - ja 1443EB234
mgsvtpp.exe+43EB1F4: 80 C9 02 - or cl,02
mgsvtpp.exe+43EB1F7: 88 8E BC000000 - mov [rsi+000000BC],cl
mgsvtpp.exe+43EB1FD: E8 7EA36FFF - call 143AE5580
mgsvtpp.exe+43EB202: 48 8D 54 24 68 - lea rdx,[rsp+68]
mgsvtpp.exe+43EB207: 48 8B 88 98000000 - mov rcx,[rax+00000098]
mgsvtpp.exe+43EB20E: 41 B8 64000000 - mov r8d,00000064
mgsvtpp.exe+43EB214: 48 8B 49 50 - mov rcx,[rcx+50]
mgsvtpp.exe+43EB218: 48 8B 01 - mov rax,[rcx]
mgsvtpp.exe+43EB21B: FF 90 18010000 - call qword ptr [rax+00000118]
mgsvtpp.exe+43EB221: EB 11 - jmp 1443EB234
mgsvtpp.exe+43EB223: D1 25 353C0D54 - shl [1984BEE5E],1
mgsvtpp.exe+43EB229: E0 D1 - loopne 1443EB1FC
mgsvtpp.exe+43EB22B: E7 61 - out 61,eax
mgsvtpp.exe+43EB22D: 80 A6 BC000000 FD - and byte ptr [rsi+000000BC],-03
mgsvtpp.exe+43EB234: 0FB7 4B 24 - movzx ecx,word ptr [rbx+24]
mgsvtpp.exe+43EB238: 66 85 C9 - test cx,cx
mgsvtpp.exe+43EB23B: 74 12 - je 1443EB24F
mgsvtpp.exe+43EB23D: 0FB7 43 20 - movzx eax,word ptr [rbx+20] <<<--- AOB Starts Here
//// INJECTING START ----------------------------------------------------------
mgsvtpp.exe+43EB241: 66 39 C8 - cmp ax,cx
mgsvtpp.exe+43EB244: 66 0F42 C8 - cmovb cx,ax
mgsvtpp.exe+43EB248: 66 29 C8 - sub ax,cx
//// INJECTING END ----------------------------------------------------------
mgsvtpp.exe+43EB24B: 66 89 43 20 - mov [rbx+20],ax
mgsvtpp.exe+43EB24F: 0FB7 43 20 - movzx eax,word ptr [rbx+20]
mgsvtpp.exe+43EB253: 66 39 C5 - cmp bp,ax
mgsvtpp.exe+43EB256: 74 16 - je 1443EB26E
mgsvtpp.exe+43EB258: 66 85 C0 - test ax,ax
mgsvtpp.exe+43EB25B: 75 07 - jne 1443EB264
mgsvtpp.exe+43EB25D: 66 44 89 7B 10 - mov [rbx+10],r15w
mgsvtpp.exe+43EB262: EB 06 - jmp 1443EB26A
mgsvtpp.exe+43EB264: 66 3B 43 22 - cmp ax,[rbx+22]
mgsvtpp.exe+43EB268: 72 04 - jb 1443EB26E
mgsvtpp.exe+43EB26A: 44 89 7B 04 - mov [rbx+04],r15d
mgsvtpp.exe+43EB26E: 0FB7 43 14 - movzx eax,word ptr [rbx+14]
mgsvtpp.exe+43EB272: 66 41 85 C5 - test r13w,ax
mgsvtpp.exe+43EB276: 74 7D - je 1443EB2F5
mgsvtpp.exe+43EB278: 0FB6 43 3C - movzx eax,byte ptr [rbx+3C]
mgsvtpp.exe+43EB27C: 4C 8B 56 30 - mov r10,[rsi+30]
mgsvtpp.exe+43EB280: 4C 8D 0C 40 - lea r9,[rax+rax*2]
mgsvtpp.exe+43EB284: 3C 20 - cmp al,20
//// Template: I2CEA_AOBFullInjection
//// Generated with: I2 Cheat Engine Auto Assembler Script Template Generator
//// Code Happy, Code Freely, Be Awesome.
}
And for the detailed explanation here is a bonus Tape Unlocker, it's not the most robust thing but it seems to work, this will unlock all cassette tapes, I only have one game that I have completed after using this so use at your own risk but, I know, I gotta have my tapes. But know that I just slam a byte value of 3 in to every byte between +0x8 and +0x200 of the base.
EDIT:
And this saves with the game.
Code: Select all
{
Process : mgsvtpp.exe - (x64)
Module : mgsvtpp.exe
Game Title : Metal Gear Solid 5 Phantom Pain
Game Version : 1.0.12.0
CE Version : 6.7
Script Version : 0.0.1
Date : 01/21/18
Author : ShyTwig16
Name : CassetteTapeUnlockerHook
Cassette Tape Unlocker Hook
}
{$STRICT}
define(address, mgsvtpp.exe+3E0164B)
define(bytes, 48 8B 82 40 07 00 00)
////
//// ------------------------------ ENABLE ------------------------------
[ENABLE]
aobScanModule(aobCassetteTapeUnlockerHook, mgsvtpp.exe, 8Dxxxxxxxxxx66xxxx74xx48xxxxxxxxxxxx48xxxxxxxxxxxx0FB7xx48xxxxxxxxxxxx0FB6xxxxD0xx80xxxx75xx0FB7xxFFxx39xx72xxEBxx44xxxx73xx48xxxxxx49xxxxxxxxFFxx31xx41xxxx48xxxxxx45xxxx73xx8BxxxxxxE9xxxxxxxxB6xx79xx48xxxxxxxx48xxxxxxxx89xx48xxxxxxxx48xxxxxx41xx41xx41xx41xxxxxx)
define(injCassetteTapeUnlockerHook, aobCassetteTapeUnlockerHook+1C)
assert(injCassetteTapeUnlockerHook, bytes)
registerSymbol(injCassetteTapeUnlockerHook)
alloc(memCassetteTapeUnlockerHook, 0x400, injCassetteTapeUnlockerHook)
label(ptrCassetteTapeUnlockerHook)
registerSymbol(ptrCassetteTapeUnlockerHook)
label(n_code)
label(l_code)
label(o_code)
label(exit)
label(return)
memCassetteTapeUnlockerHook:
ptrCassetteTapeUnlockerHook:
dq 0
n_code:
pushfq
mov [ptrCassetteTapeUnlockerHook],rdx
mov rax,[rdx+00000740]
push rbx
push rdx
mov rdx,rcx
mov rcx,200
l_code:
movzx rbx,byte ptr [rdx+rax]
shr bl,1
cmp bl,0
jg @f
mov byte ptr [rcx+rax],03
@@:
cmp ecx,8
jg @f
mov rcx,1
@@:
loop l_code
pop rdx
pop rbx
popfq
o_code:
// mov rax,[rdx+00000740]
exit:
jmp return
////
//// ---------- Injection Point ----------
injCassetteTapeUnlockerHook:
jmp n_code
nop
nop
return:
////
//// ------------------------------ DISABLE ------------------------------
[DISABLE]
////
//// ---------- Injection Point ----------
injCassetteTapeUnlockerHook:
db bytes
unregisterSymbol(injCassetteTapeUnlockerHook)
unregisterSymbol(ptrCassetteTapeUnlockerHook)
dealloc(memCassetteTapeUnlockerHook)
{
//// Injection Point: mgsvtpp.exe+3E0164B - 0000000143E0164B
//// AOB address: 0000000143E0162F - mgsvtpp.exe+3E0162F
//// Process: mgsvtpp.exe - 0000000140000000
//// Module: mgsvtpp.exe - 0000000140000000
//// Module Size: 0000000008434000
mgsvtpp.exe+3E015F7: 66 3B 0F - cmp cx,[rdi]
mgsvtpp.exe+3E015FA: 73 7E - jae 143E0167A
mgsvtpp.exe+3E015FC: 48 8B 8D D8000000 - mov rcx,[rbp+000000D8]
mgsvtpp.exe+3E01603: 48 8B 57 F0 - mov rdx,[rdi-10]
mgsvtpp.exe+3E01607: 41 89 D8 - mov r8d,ebx
mgsvtpp.exe+3E0160A: 48 8B 01 - mov rax,[rcx]
mgsvtpp.exe+3E0160D: FF 90 88010000 - call qword ptr [rax+00000188]
mgsvtpp.exe+3E01613: 0FB7 40 1C - movzx eax,word ptr [rax+1C]
mgsvtpp.exe+3E01617: 66 85 C0 - test ax,ax
mgsvtpp.exe+3E0161A: 78 41 - js 143E0165D
mgsvtpp.exe+3E0161C: B9 0FA2FFE6 - mov ecx,E6FFA20F [00000000]
mgsvtpp.exe+3E01621: 8D 89 A85E0019 - lea ecx,[rcx+19005EA8]
mgsvtpp.exe+3E01627: 66 01 C8 - add ax,cx
mgsvtpp.exe+3E0162A: B9 0F05C390 - mov ecx,90C3050F [00328083]
mgsvtpp.exe+3E0162F: 8D 89 F0FA3D6F - lea ecx,[rcx+6F3DFAF0] <<<--- AOB Starts Here
mgsvtpp.exe+3E01635: 66 39 C8 - cmp ax,cx
mgsvtpp.exe+3E01638: 74 23 - je 143E0165D
mgsvtpp.exe+3E0163A: 48 8B 8D B0000000 - mov rcx,[rbp+000000B0]
mgsvtpp.exe+3E01641: 48 8B 91 E80A0000 - mov rdx,[rcx+00000AE8]
mgsvtpp.exe+3E01648: 0FB7 C8 - movzx ecx,ax
//// INJECTING START ----------------------------------------------------------
mgsvtpp.exe+3E0164B: 48 8B 82 40070000 - mov rax,[rdx+00000740]
//// INJECTING END ----------------------------------------------------------
mgsvtpp.exe+3E01652: 0FB6 14 01 - movzx edx,byte ptr [rcx+rax]
mgsvtpp.exe+3E01656: D0 EA - shr dl,1
mgsvtpp.exe+3E01658: 80 E2 01 - and dl,01
mgsvtpp.exe+3E0165B: 75 0B - jne 143E01668
mgsvtpp.exe+3E0165D: 0FB7 07 - movzx eax,word ptr [rdi]
mgsvtpp.exe+3E01660: FF C3 - inc ebx
mgsvtpp.exe+3E01662: 39 C3 - cmp ebx,eax
mgsvtpp.exe+3E01664: 72 96 - jb 143E015FC
mgsvtpp.exe+3E01666: EB 10 - jmp 143E01678
mgsvtpp.exe+3E01668: 44 39 E6 - cmp esi,r12d
mgsvtpp.exe+3E0166B: 73 26 - jae 143E01693
mgsvtpp.exe+3E0166D: 48 8B 47 F0 - mov rax,[rdi-10]
mgsvtpp.exe+3E01671: 49 89 44 F5 00 - mov [r13+rsi*8+00],rax
mgsvtpp.exe+3E01676: FF C6 - inc esi
mgsvtpp.exe+3E01678: 31 C9 - xor ecx,ecx
mgsvtpp.exe+3E0167A: 41 FF C6 - inc r14d
mgsvtpp.exe+3E0167D: 48 83 C7 18 - add rdi,18
mgsvtpp.exe+3E01681: 45 39 FE - cmp r14d,r15d
mgsvtpp.exe+3E01684: 73 0D - jae 143E01693
mgsvtpp.exe+3E01686: 8B 5C 24 50 - mov ebx,[rsp+50]
//// Template: I2CEA_AOBFullInjectionWithValues
//// Generated with: I2 Cheat Engine Auto Assembler Script Template Generator
//// Code Happy, Code Freely, Be Awesome.
}