Function at 0x18005faf0
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x28]
mov rcx, qword [rsp + 0x60]
call fcn.18005fe60
mov qword [rsp + 0x38], 0
cmp qword [0x18009c098], 0
jne 0x18005fb38
cmp qword [0x18009c090], 0
je 0x18005fb38
mov rax, qword [0x18009c090]
mov qword [0x18009c098], rax
cmp qword [0x18009c098], 0
je 0x18005fbde
mov rax, qword [0x18009c098]
cmp qword [rax + 0x10], 0
je 0x18005fbde
mov rcx, qword [0x18009c098]
mov rax, qword [rsp + 0x28]
cmp qword [rcx + 0x10], rax
jb 0x18005fbde
mov rcx, qword [0x18009c098]
mov rax, qword [rsp + 0x30]
cmp qword [rcx + 0x10], rax
ja 0x18005fbde
mov rax, qword [0x18009c098]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x28]
cmp qword [rsp + 0x38], rax
jb 0x18005fba4
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x38], rax
jbe 0x18005fbab
xor eax, eax
jmp 0x18005fe40
mov rcx, qword [0x18009c098]
mov rax, qword [rsp + 0x38]
mov rax, qword [rax + 0x48]
mov qword [rcx + 0x10], rax
mov r8d, 0x60
mov edx, 0xcc
mov rcx, qword [rsp + 0x38]
call fcn.1800575a0
mov rax, qword [rsp + 0x38]
jmp 0x18005fe40
mov rax, qword [0x18009c090]
mov qword [0x18009c098], rax
jmp 0x18005fc00
mov rax, qword [0x18009c098]
mov rax, qword [rax + 8]
mov qword [0x18009c098], rax
cmp qword [0x18009c098], 0
je 0x18005fc4d
cmp qword [0x18009c098], 0
je 0x18005fc4b
mov rax, qword [0x18009c098]
cmp qword [rax + 0x10], 0
je 0x18005fc4b
mov rcx, qword [0x18009c098]
mov rax, qword [rsp + 0x28]
cmp qword [rcx + 0x10], rax
jb 0x18005fc4b
mov rcx, qword [0x18009c098]
mov rax, qword [rsp + 0x30]
cmp qword [rcx + 0x10], rax
ja 0x18005fc4b
jmp 0x18005fb7c
jmp 0x18005fbee
mov rcx, qword [rsp + 0x60]
call fcn.18005fe50
and eax, 0xffff
mov ecx, eax
mov rax, qword [rsp + 0x60]
sub rax, rcx
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x20], 0
cmp qword [rsp + 0x20], 0
jne 0x18005fca2
cmp qword [rsp + 0x60], 0x40000000
jbe 0x18005fca2
mov rdx, qword [rsp + 0x60]
sub rdx, 0x40000000
mov rcx, qword [rsp + 0x28]
call fcn.180060150
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x18005fcd6
movabs rax, 0xffffffff40000000
cmp qword [rsp + 0x60], rax
jae 0x18005fcd6
mov rcx, qword [rsp + 0x60]
add rcx, 0x40000000
mov rdx, qword [rsp + 0x30]
call fcn.18005fff0
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x18005fd04
cmp qword [rsp + 0x60], 0x40000000
jbe 0x18005fd04
mov rcx, qword [rsp + 0x60]
sub rcx, 0x40000000
mov rdx, qword [rsp + 0x60]
call fcn.18005fff0
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x18005fd38
movabs rax, 0xffffffff40000000
cmp qword [rsp + 0x60], rax
jae 0x18005fd38
mov rdx, qword [rsp + 0x60]
add rdx, 0x40000000
mov rcx, qword [rsp + 0x60]
call fcn.180060150
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x18005fd54
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x28]
call fcn.180060150
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x18005fd70
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x60]
call fcn.18005fff0
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x18005fe3e
mov rax, qword [rsp + 0x20]
mov qword [0x18009c098], rax
mov rax, qword [0x18009c098]
mov dword [rax], 0x52727464
mov rax, qword [0x18009c098]
mov qword [rax + 0x10], 0
mov rcx, qword [0x18009c098]
mov rax, qword [0x18009c090]
mov qword [rcx + 8], rax
mov rax, qword [0x18009c098]
mov qword [0x18009c090], rax
mov qword [rsp + 0x40], 0
mov rax, qword [0x18009c098]
add rax, 0x60
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x48], 0x2a8
jmp 0x18005fdf2
mov eax, dword [rsp + 0x48]
sub eax, 1
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 1
jle 0x18005fe29
movsxd rdx, dword [rsp + 0x48]
imul rdx, rdx, 0x60
mov rcx, qword [rsp + 0x38]
mov rax, qword [rsp + 0x40]
mov qword [rcx + rdx + 0x48], rax
movsxd rcx, dword [rsp + 0x48]
imul rcx, rcx, 0x60
mov rax, qword [rsp + 0x38]
add rax, rcx
mov qword [rsp + 0x40], rax
jmp 0x18005fde7
mov rcx, qword [0x18009c098]
mov rax, qword [rsp + 0x40]
mov qword [rcx + 0x10], rax
jmp 0x18005fb7c
xor eax, eax
add rsp, 0x58
ret