Oridjinn wrote: ↑Sun Aug 09, 2020 4:24 am
...
Code: Select all
HorizonZeroDawn.exe+B79170 - 48 85 C9 - test rcx,rcx
HorizonZeroDawn.exe+B79173 - 74 23 - je HorizonZeroDawn.exe+B79198
HorizonZeroDawn.exe+B79175 - 48 83 79 40 00 - cmp qword ptr [rcx+40],00 { 0 }
HorizonZeroDawn.exe+B7917A - 74 1C - je HorizonZeroDawn.exe+B79198
HorizonZeroDawn.exe+B7917C - 48 8B 41 20 - mov rax,[rcx+20]
HorizonZeroDawn.exe+B79180 - 48 85 C0 - test rax,rax
HorizonZeroDawn.exe+B79183 - 74 13 - je HorizonZeroDawn.exe+B79198
HorizonZeroDawn.exe+B79185 - C5FA1040 14 - vmovss xmm0,[rax+14]
HorizonZeroDawn.exe+B7918A - C5FA5C50 1C - vsubss xmm2,xmm0,[rax+1C]
HorizonZeroDawn.exe+B7918F - C5F057C9 - vxorps xmm1,xmm1,xmm1
HorizonZeroDawn.exe+B79193 - C5F25FC2 - vmaxss xmm0,xmm1,xmm2
HorizonZeroDawn.exe+B79197 - C3 - ret
HorizonZeroDawn.exe+B79198 - C5FA1005 D8 69EE00 - vmovss xmm0,[HorizonZeroDawn.exe+1A5FB78] { (-1.00) }
HorizonZeroDawn.exe+B791A0 - C3 - ret
At the location above you have in RCX the
CountdownTimer. [RCX+20] holds the
CountdownTimerSave, the one you're obtaining in your hook. This one, at 0x1C holds the tick (counter going up). In the Engine string references there is this:
Code: Select all
00007FF7B0E6334B | 48:8D05 FE5E0100 | LEA RAX,QWORD PTR DS:[7FF7B0E79250] | rax:EntryPoint
00007FF7B0E63352 | C74424 28 03000000 | MOV DWORD PTR SS:[RSP+28],3 |
00007FF7B0E6335A | 4C:8BCB | MOV R9,RBX | r9:EntryPoint
00007FF7B0E6335D | 48:894424 20 | MOV QWORD PTR SS:[RSP+20],RAX | rax:EntryPoint
00007FF7B0E63362 | 4C:8D05 AFE41B01 | LEA R8,QWORD PTR DS:[7FF7B2021818] | 00007FF7B2021818:"CountdownTimer_ExportedResetTimer"
If you go to the function @ "HorizonZeroDawn.exe+B6334B - 48 8D 05 FE5E0100 - lea rax,[HorizonZeroDawn.exe+B79250]", as in "HorizonZeroDawn.exe+B79250", you will see this:
Code: Select all
HorizonZeroDawn.exe+B79250 - 48 85 C9 - test rcx,rcx // CountdownTimer
HorizonZeroDawn.exe+B79253 - 74 17 - je HorizonZeroDawn.exe+B7926C
HorizonZeroDawn.exe+B79255 - 48 83 79 40 00 - cmp qword ptr [rcx+40],00 { 0 } // IsValid
HorizonZeroDawn.exe+B7925A - 74 10 - je HorizonZeroDawn.exe+B7926C
HorizonZeroDawn.exe+B7925C - 48 8B 41 20 - mov rax,[rcx+20] // CountdownTimerSave
HorizonZeroDawn.exe+B79260 - 48 85 C0 - test rax,rax
HorizonZeroDawn.exe+B79263 - 74 07 - je HorizonZeroDawn.exe+B7926C
HorizonZeroDawn.exe+B79265 - C7 40 1C 00000000 - mov [rax+1C],00000000 { 0 } // reset
HorizonZeroDawn.exe+B7926C - C3 - ret
So there you go. You can also script it like this in Lua:
Code: Select all
local timer = --timer address from hook @ "HorizonZeroDawn.exe+B79175"
local ResetTimer = getAddressSafe( process ) + 0xB79250 --HorizonZeroDawn.exe+B79250
executeCodeEx( 0, nil, ResetTimer, timer )
So I got this path:
Then there's also this:
Code: Select all
00007FF7B0E63486 | 48:8D05 435D0100 | LEA RAX,QWORD PTR DS:[7FF7B0E791D0] | rax:EntryPoint
00007FF7B0E6348D | C74424 28 03000000 | MOV DWORD PTR SS:[RSP+28],3 |
00007FF7B0E63495 | 4C:8BCB | MOV R9,RBX | r9:EntryPoint
00007FF7B0E63498 | 48:894424 20 | MOV QWORD PTR SS:[RSP+20],RAX | rax:EntryPoint
00007FF7B0E6349D | 4C:8D05 D4E11B01 | LEA R8,QWORD PTR DS:[7FF7B2021678] | 00007FF7B2021678:"CountdownTimer_ExportedPauseTimer"
Which leads to this function in CE:
Code: Select all
HorizonZeroDawn.exe+B791D0 - 48 85 C9 - test rcx,rcx
HorizonZeroDawn.exe+B791D3 - 74 70 - je HorizonZeroDawn.exe+B79245
HorizonZeroDawn.exe+B791D5 - 53 - push rbx
HorizonZeroDawn.exe+B791D6 - 48 83 EC 50 - sub rsp,50 { 80 }
HorizonZeroDawn.exe+B791DA - 48 83 79 40 00 - cmp qword ptr [rcx+40],00 { 0 }
HorizonZeroDawn.exe+B791DF - 48 8B D9 - mov rbx,rcx
HorizonZeroDawn.exe+B791E2 - 74 5C - je HorizonZeroDawn.exe+B79240
HorizonZeroDawn.exe+B791E4 - 48 8B 41 20 - mov rax,[rcx+20]
HorizonZeroDawn.exe+B791E8 - 48 85 C0 - test rax,rax
HorizonZeroDawn.exe+B791EB - 74 53 - je HorizonZeroDawn.exe+B79240
HorizonZeroDawn.exe+B791ED - C6 40 10 00 - mov byte ptr [rax+10],00 { 0 }
HorizonZeroDawn.exe+B791F1 - 48 83 79 40 00 - cmp qword ptr [rcx+40],00 { 0 }
HorizonZeroDawn.exe+B791F6 - 74 48 - je HorizonZeroDawn.exe+B79240
HorizonZeroDawn.exe+B791F8 - 48 8D 4C 24 20 - lea rcx,[rsp+20]
HorizonZeroDawn.exe+B791FD - E8 4EB61000 - call HorizonZeroDawn.exe+C84850
HorizonZeroDawn.exe+B79202 - 48 89 5C 24 40 - mov [rsp+40],rbx
HorizonZeroDawn.exe+B79207 - 48 8D 05 528C1A01 - lea rax,[HorizonZeroDawn.exe+1D21E60] { (7FF7B0E644F0) }
HorizonZeroDawn.exe+B7920E - 48 8B 5B 40 - mov rbx,[rbx+40]
HorizonZeroDawn.exe+B79212 - 48 89 44 24 20 - mov [rsp+20],rax
HorizonZeroDawn.exe+B79217 - 48 8B CB - mov rcx,rbx
HorizonZeroDawn.exe+B7921A - 48 8B 03 - mov rax,[rbx]
HorizonZeroDawn.exe+B7921D - FF 10 - call qword ptr [rax]
HorizonZeroDawn.exe+B7921F - 4C 8D 0D DA1AB601 - lea r9,[HorizonZeroDawn.exe+26DAD00] { (70837) }
HorizonZeroDawn.exe+B79226 - 48 8B D3 - mov rdx,rbx
HorizonZeroDawn.exe+B79229 - 48 8B C8 - mov rcx,rax
HorizonZeroDawn.exe+B7922C - 4C 8D 44 24 20 - lea r8,[rsp+20]
HorizonZeroDawn.exe+B79231 - E8 2A2D77FF - call HorizonZeroDawn.exe+2EBF60
HorizonZeroDawn.exe+B79236 - 48 8D 4C 24 20 - lea rcx,[rsp+20]
HorizonZeroDawn.exe+B7923B - E8 608476FF - call HorizonZeroDawn.exe+2E16A0
HorizonZeroDawn.exe+B79240 - 48 83 C4 50 - add rsp,50 { 80 }
HorizonZeroDawn.exe+B79244 - 5B - pop rbx
HorizonZeroDawn.exe+B79245 - C3 - ret
If you feed the same CountdownTimer pointer to it, you'll get it to
pause.
BR,
Sun