Function at 0x14001650c
Capabilities:
Hook routines via microsoft detours
Resume thread

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x438]
sub rsp, 0x510
mov rax, qword [0x14008d310]
xor rax, rsp
mov qword [rbp + 0x400], rax
xor r13d, r13d
mov r14, rcx
test rcx, rcx
je 0x140016558
mov rax, qword [0x14008e740]
mov qword [rcx], rax
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x14008e738], eax
je 0x14001656f
mov eax, 0x10dd
jmp 0x1400168a9
cmp dword [0x14008e73c], r13d
je 0x140016582
call fcn.14005bd40
jmp 0x1400168a3
mov rbx, qword [0x14008e750]
mov r12d, r13d
jmp 0x140016611
mov rdx, qword [rbx + 0x20]
cmp dword [rbx + 8], r13d
je 0x1400165b3
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 0x18]
jmp 0x140016607
lea rcx, [rdx + 0x58]
mov word [rcx], 0x25ff
lea rax, [rcx + 6]
sub edx, eax
add edx, 0x50
mov dword [rcx + 2], edx
mov rdx, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x20]
add rcx, 0x58
mov byte [rdx], 0xe9
lea rax, [rdx + 5]
sub ecx, eax
mov dword [rdx + 1], ecx
lea rcx, [rdx + 5]
mov rax, qword [rbx + 0x20]
mov r8, qword [rax + 0x48]
sub r8, rcx
cmp rcx, qword [rax + 0x48]
cmova r8, r13
test r8, r8
je 0x140016603
mov dl, 0xcc
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140016591
mov rdi, qword [0x14008e748]
jmp 0x140016721
mov rcx, qword [rdi + 8]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x60], 0x100001
call sub.KERNEL32.dll_GetThreadContext
test eax, eax
je 0x14001671e
mov rbx, qword [0x14008e750]
test rbx, rbx
je 0x14001671e
mov rcx, qword [rbp + 0x28]
cmp dword [rbx + 8], r13d
je 0x1400166af
mov rdx, qword [rbx + 0x20]
cmp rcx, rdx
jb 0x140016712
lea rax, [rdx + 8]
cmp rcx, rax
jae 0x140016712
mov r9b, byte [rbp + 0x28]
mov r8d, r13d
sub r9b, dl
add rdx, 0x40
mov cl, byte [rdx]
mov al, cl
shr al, 3
cmp al, r9b
je 0x1400166a3
inc r8d
inc rdx
cmp r8d, 8
jb 0x140016686
mov cl, r13b
jmp 0x1400166a6
and cl, 7
movzx eax, cl
add rax, qword [rbx + 0x18]
jmp 0x1400166fc
cmp rcx, qword [rbx + 0x18]
jb 0x140016712
mov r9, qword [rbx + 0x20]
movzx eax, byte [r9 + 0x3e]
add rax, qword [rbx + 0x18]
cmp rcx, rax
jae 0x140016712
mov r8b, byte [rbp + 0x28]
lea rcx, [r9 + 0x40]
sub r8b, byte [rbx + 0x18]
mov edx, r13d
movzx r10d, byte [rcx]
mov al, r10b
and al, 7
cmp al, r8b
je 0x1400166f3
inc edx
inc rcx
cmp edx, 8
jb 0x1400166d6
mov eax, r13d
jmp 0x1400166f9
mov eax, r10d
shr eax, 3
add rax, r9
mov rcx, qword [rdi + 8]
lea rdx, [rsp + 0x30]
mov qword [rbp + 0x28], rax
call sub.KERNEL32.dll_SetThreadContext
mov rcx, qword [rbp + 0x28]
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140016658
mov rdi, qword [rdi]
test rdi, rdi
jne 0x140016626
call sub.KERNEL32.dll_GetCurrentProcess
mov rdi, qword [0x14008e750]
mov r15, rax
test rdi, rdi
je 0x1400167ca
mov rcx, qword [rdi + 0x20]
lea r9, [rsp + 0x20]
mov r8d, dword [rdi + 0x28]
movzx edx, byte [rcx + 0x3e]
mov rcx, qword [rdi + 0x18]
call sub.KERNEL32.dll_VirtualProtect
mov rax, qword [rdi + 0x20]
mov rcx, r15
mov rdx, qword [rdi + 0x18]
movzx r8d, byte [rax + 0x3e]
call sub.KERNEL32.dll_FlushInstructionCache
cmp dword [rdi + 8], r13d
je 0x1400167ae
mov rsi, qword [rdi + 0x20]
test rsi, rsi
je 0x1400167ae
xor edx, edx
mov rbx, rsi
and rbx, 0xffffffffffff0000
mov rcx, rsi
lea r8d, [rdx + 0x60]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rbx + 0x10]
mov r12d, 1
mov qword [rsi + 0x48], rax
mov qword [rbx + 0x10], rsi
mov qword [rdi + 0x20], r13
mov rbx, qword [rdi]
mov edx, 0x30
mov rcx, rdi
call fcn.140002da0
mov rdi, rbx
test rbx, rbx
jne 0x140016742
mov qword [0x14008e750], r13
test r12d, r12d
je 0x140016854
cmp dword [0x14008fb94], r13d
jne 0x140016854
mov rcx, qword [0x14008e728]
lea rbx, [0x14008e728]
jmp 0x14001684f
cmp dword [rcx], 0x52727464
jne 0x1400168d9
lea r8, [rcx + 0x10000]
mov edx, r13d
lea rax, [rcx + 0xa8]
cmp qword [rax], r13
je 0x140016823
cmp qword [rax], rcx
jb 0x1400168d9
cmp qword [rax], r8
jae 0x1400168d9
inc edx
add rax, 0x60
cmp edx, 0x2a9
jb 0x14001680c
mov rax, qword [rcx + 8]
xor edx, edx
mov r8d, 0x8000
mov qword [rbx], rax
call sub.KERNEL32.dll_VirtualFree
mov qword [0x14008e730], r13
mov rcx, qword [rbx]
test rcx, rcx
jne 0x1400167ef
call fcn.1400168f0
mov rdi, qword [0x14008e748]
test rdi, rdi
je 0x140016886
mov rcx, qword [rdi + 8]
call sub.KERNEL32.dll_ResumeThread
mov rbx, qword [rdi]
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rcx, rdi
call fcn.140002da0
mov rdi, rbx
test rbx, rbx
jne 0x140016865
mov qword [0x14008e748], r13
mov dword [0x14008e738], r13d
test r14, r14
je 0x1400168a3
mov rax, qword [0x14008e740]
mov qword [r14], rax
mov eax, dword [0x14008e73c]
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.140001020
lea r11, [rsp + 0x510]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rbx, [rcx + 8]
jmp 0x14001684c