Function at 0x140016f70
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 [0x1400922d0]
xor rax, rsp
mov qword [rbp + 0x400], rax
xor r13d, r13d
mov r14, rcx
test rcx, rcx
je 0x140016fbc
mov rax, qword [0x140093730]
mov qword [rcx], rax
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [0x140093728], eax
je 0x140016fd3
mov eax, 0x10dd
jmp 0x14001730d
cmp dword [0x14009372c], r13d
je 0x140016fe6
call fcn.14005e770
jmp 0x140017307
mov rbx, qword [0x140093740]
mov r12d, r13d
jmp 0x140017075
mov rdx, qword [rbx + 0x20]
cmp dword [rbx + 8], r13d
je 0x140017017
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 0x18]
jmp 0x14001706b
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 0x140017067
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 0x140016ff5
mov rdi, qword [0x140093738]
jmp 0x140017185
mov rcx, qword [rdi + 8]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x60], 0x100001
call sub.KERNEL32.dll_GetThreadContext
test eax, eax
je 0x140017182
mov rbx, qword [0x140093740]
test rbx, rbx
je 0x140017182
mov rcx, qword [rbp + 0x28]
cmp dword [rbx + 8], r13d
je 0x140017113
mov rdx, qword [rbx + 0x20]
cmp rcx, rdx
jb 0x140017176
lea rax, [rdx + 8]
cmp rcx, rax
jae 0x140017176
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 0x140017107
inc r8d
inc rdx
cmp r8d, 8
jb 0x1400170ea
mov cl, r13b
jmp 0x14001710a
and cl, 7
movzx eax, cl
add rax, qword [rbx + 0x18]
jmp 0x140017160
cmp rcx, qword [rbx + 0x18]
jb 0x140017176
mov r9, qword [rbx + 0x20]
movzx eax, byte [r9 + 0x3e]
add rax, qword [rbx + 0x18]
cmp rcx, rax
jae 0x140017176
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 0x140017157
inc edx
inc rcx
cmp edx, 8
jb 0x14001713a
mov eax, r13d
jmp 0x14001715d
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 0x1400170bc
mov rdi, qword [rdi]
test rdi, rdi
jne 0x14001708a
call sub.KERNEL32.dll_GetCurrentProcess
mov rdi, qword [0x140093740]
mov r15, rax
test rdi, rdi
je 0x14001722e
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 0x140017212
mov rsi, qword [rdi + 0x20]
test rsi, rsi
je 0x140017212
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.140002ef0
mov rdi, rbx
test rbx, rbx
jne 0x1400171a6
mov qword [0x140093740], r13
test r12d, r12d
je 0x1400172b8
cmp dword [0x140094b94], r13d
jne 0x1400172b8
mov rcx, qword [0x140093718]
lea rbx, [0x140093718]
jmp 0x1400172b3
cmp dword [rcx], 0x52727464
jne 0x14001733d
lea r8, [rcx + 0x10000]
mov edx, r13d
lea rax, [rcx + 0xa8]
cmp qword [rax], r13
je 0x140017287
cmp qword [rax], rcx
jb 0x14001733d
cmp qword [rax], r8
jae 0x14001733d
inc edx
add rax, 0x60
cmp edx, 0x2a9
jb 0x140017270
mov rax, qword [rcx + 8]
xor edx, edx
mov r8d, 0x8000
mov qword [rbx], rax
call sub.KERNEL32.dll_VirtualFree
mov qword [0x140093720], r13
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140017253
call fcn.140017350
mov rdi, qword [0x140093738]
test rdi, rdi
je 0x1400172ea
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.140002ef0
mov rdi, rbx
test rbx, rbx
jne 0x1400172c9
mov qword [0x140093738], r13
mov dword [0x140093728], r13d
test r14, r14
je 0x140017307
mov rax, qword [0x140093730]
mov qword [r14], rax
mov eax, dword [0x14009372c]
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 0x1400172b0