Function at 0x140059ce8
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 [0x140090008]
xor rax, rsp
mov qword [rbp + 0x400], rax
xor r13d, r13d
mov r14, rcx
test rcx, rcx
je 0x140059d34
mov rax, qword [0x140091060]
mov qword [rcx], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x140091058], eax
je 0x140059d4c
mov eax, 0x10dd
jmp 0x14005a08d
cmp dword [0x14009105c], r13d
je 0x140059d5f
call fcn.140059b54
jmp 0x14005a087
mov rbx, qword [0x140091070]
mov r12d, r13d
jmp 0x140059dee
mov rdx, qword [rbx + 0x20]
cmp dword [rbx + 8], r13d
je 0x140059d90
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 0x18]
jmp 0x140059de4
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 0x140059de0
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 0x140059d6e
mov rdi, qword [0x140091068]
jmp 0x140059f00
mov rcx, qword [rdi + 8]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x60], 0x100001
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x140059efd
mov rbx, qword [0x140091070]
test rbx, rbx
je 0x140059efd
mov rcx, qword [rbp + 0x28]
cmp dword [rbx + 8], r13d
je 0x140059e8d
mov rdx, qword [rbx + 0x20]
cmp rcx, rdx
jb 0x140059ef1
lea rax, [rdx + 8]
cmp rcx, rax
jae 0x140059ef1
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 0x140059e81
inc r8d
inc rdx
cmp r8d, 8
jb 0x140059e64
mov cl, r13b
jmp 0x140059e84
and cl, 7
movzx eax, cl
add rax, qword [rbx + 0x18]
jmp 0x140059eda
cmp rcx, qword [rbx + 0x18]
jb 0x140059ef1
mov r9, qword [rbx + 0x20]
movzx eax, byte [r9 + 0x3e]
add rax, qword [rbx + 0x18]
cmp rcx, rax
jae 0x140059ef1
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 0x140059ed1
inc edx
inc rcx
cmp edx, 8
jb 0x140059eb4
mov eax, r13d
jmp 0x140059ed7
mov eax, r10d
shr eax, 3
add rax, r9
mov rcx, qword [rdi + 8]
lea rdx, [rsp + 0x30]
mov qword [rbp + 0x28], rax
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
mov rcx, qword [rbp + 0x28]
mov rbx, qword [rbx]
test rbx, rbx
jne 0x140059e36
mov rdi, qword [rdi]
test rdi, rdi
jne 0x140059e03
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, qword [0x140091070]
mov r15, rax
test rdi, rdi
je 0x140059fac
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 qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rdi + 0x20]
mov rcx, r15
mov rdx, qword [rdi + 0x18]
movzx r8d, byte [rax + 0x3e]
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [rdi + 8], r13d
je 0x140059f90
mov rsi, qword [rdi + 0x20]
test rsi, rsi
je 0x140059f90
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.140052590
mov rdi, rbx
test rbx, rbx
jne 0x140059f22
mov qword [0x140091070], r13
test r12d, r12d
je 0x14005a037
cmp dword [0x140091054], r13d
jne 0x14005a037
mov rcx, qword [0x140091040]
lea rbx, [0x140091040]
jmp 0x14005a032
cmp dword [rcx], 0x52727464
jne 0x14005a0bd
lea r8, [rcx + 0x10000]
mov edx, r13d
lea rax, [rcx + 0xa8]
cmp qword [rax], r13
je 0x14005a005
cmp qword [rax], rcx
jb 0x14005a0bd
cmp qword [rax], r8
jae 0x14005a0bd
inc edx
add rax, 0x60
cmp edx, 0x2a9
jb 0x140059fee
mov rax, qword [rcx + 8]
xor edx, edx
mov r8d, 0x8000
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [0x140091048], r13
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140059fd1
call fcn.14005957c
mov rdi, qword [0x140091068]
test rdi, rdi
je 0x14005a06a
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rbx, qword [rdi]
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rcx, rdi
call fcn.140052590
mov rdi, rbx
test rbx, rbx
jne 0x14005a048
mov qword [0x140091068], r13
mov dword [0x140091058], r13d
test r14, r14
je 0x14005a087
mov rax, qword [0x140091060]
mov qword [r14], rax
mov eax, dword [0x14009105c]
mov rcx, qword [rbp + 0x400]
xor rcx, rsp
call fcn.140052570
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 0x14005a02f