Function at 0x1800027d0
Capabilities:
Hook routines via microsoft detours

Disassembly:
sub rsp, 0x528
mov rax, qword [section._________2]
xor rax, rsp
mov qword [rsp + 0x500], rax
call qword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp dword [0x18001eb48], eax
je 0x180002814
mov eax, 0x10dd
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.180005bc0
add rsp, 0x528
ret
cmp dword [0x18001eb4c], 0
je 0x180002827
call fcn.180002640
jmp 0x180002c58
mov qword [rsp + 0x530], rbx
mov rbx, qword [0x18001eb18]
mov qword [rsp + 0x538], rbp
mov qword [rsp + 0x520], rdi
mov qword [rsp + 0x518], r14
mov qword [rsp + 0x510], r15
xor r15d, r15d
mov r14d, r15d
test rbx, rbx
je 0x180002916
cmp dword [rbx + 8], r15d
je 0x180002887
mov rdx, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x18]
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
call fcn.180006d70
mov rax, qword [rbx + 0x18]
jmp 0x180002903
mov rax, qword [rbx + 0x20]
mov word [rax + 0x58], 0x25ff
lea rcx, [rax + 0x58]
lea rdx, [rax + 0x50]
lea rax, [rcx + 6]
sub edx, eax
mov dword [rcx + 2], edx
mov r9, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x20]
add rcx, 0x58
mov byte [r9], 0xe9
lea rax, [r9 + 5]
inc r9
sub ecx, eax
mov dword [r9], ecx
lea rdx, [r9 + 4]
mov rax, qword [rbx + 0x20]
mov r8, qword [rax + 0x48]
sub r8, rdx
cmp rdx, qword [rax + 0x48]
cmova r8, r15
test r8, r8
je 0x1800028ff
mov rax, rdx
sub rax, r9
sub rax, 4
nop dword [rax]
nop dword [rax + rax]
inc rax
mov byte [rdx], 0xcc
lea rdx, [rdx + 1]
cmp rax, r8
jb 0x1800028f0
mov rax, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
mov rbx, qword [rbx]
test rbx, rbx
jne 0x180002865
mov rdi, qword [0x18001eb28]
test rdi, rdi
je 0x180002a52
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 0x180002a46
mov rbx, qword [0x18001eb18]
test rbx, rbx
je 0x180002a46
mov rcx, qword [rsp + 0x128]
nop dword [rax]
cmp dword [rbx + 8], r15d
je 0x1800029c6
mov r9, qword [rbx + 0x20]
cmp rcx, r9
jb 0x180002a3a
lea rax, [r9 + 8]
cmp rcx, rax
jae 0x180002a3a
movzx r8d, byte [rsp + 0x128]
mov edx, r15d
sub r8b, r9b
mov rax, r15
movzx ecx, byte [r9 + rax + 0x40]
shr cl, 3
cmp cl, r8b
je 0x1800029b5
inc edx
inc rax
cmp edx, 8
jb 0x180002992
xor al, al
movzx eax, al
add rax, qword [rbx + 0x18]
jmp 0x180002a1b
movzx eax, byte [rax + r9 + 0x40]
and al, 7
movzx eax, al
add rax, qword [rbx + 0x18]
jmp 0x180002a1b
mov rdx, qword [rbx + 0x18]
cmp rcx, rdx
jb 0x180002a3a
mov r9, qword [rbx + 0x20]
movzx eax, byte [r9 + 0x3e]
add rax, rdx
cmp rcx, rax
jae 0x180002a3a
movzx r8d, byte [rsp + 0x128]
mov edx, r15d
sub r8b, byte [rbx + 0x18]
mov rcx, r15
movzx eax, byte [r9 + rcx + 0x40]
and al, 7
cmp al, r8b
je 0x180002a0f
inc edx
inc rcx
cmp edx, 8
jb 0x1800029f3
mov eax, r15d
jmp 0x180002a18
movzx eax, byte [rcx + r9 + 0x40]
shr eax, 3
add rax, r9
mov rcx, qword [rdi + 8]
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x128], rax
call qword [sym.imp.kernel32.dll_SetThreadContext]
mov rcx, qword [rsp + 0x128]
mov rbx, qword [rbx]
test rbx, rbx
jne 0x180002960
mov rdi, qword [rdi]
test rdi, rdi
jne 0x180002926
call qword [sym.imp.kernel32.dll_GetCurrentProcess]
mov rdi, qword [0x18001eb18]
mov rbp, rax
test rdi, rdi
je 0x180002b05
mov qword [rsp + 0x540], rsi
mov rax, qword [rdi + 0x20]
lea r9, [rsp + 0x20]
mov r8d, dword [rdi + 0x28]
mov rcx, qword [rdi + 0x18]
movzx edx, byte [rax + 0x3e]
call qword [sym.imp.kernel32.dll_VirtualProtect]
mov rax, qword [rdi + 0x20]
mov rcx, rbp
mov rdx, qword [rdi + 0x18]
movzx r8d, byte [rax + 0x3e]
call qword [sym.imp.kernel32.dll_FlushInstructionCache]
cmp dword [rdi + 8], r15d
je 0x180002ae1
mov rsi, qword [rdi + 0x20]
test rsi, rsi
je 0x180002ae1
xor edx, edx
mov rbx, rsi
and rbx, 0xffffffffffff0000
mov rcx, rsi
lea r8d, [rdx + 0x60]
call fcn.180007600
mov rax, qword [rbx + 0x10]
mov r14d, 1
mov qword [rsi + 0x48], rax
mov qword [rbx + 0x10], rsi
mov qword [rdi + 0x20], r15
mov rbx, qword [rdi]
mov edx, 0x30
mov rcx, rdi
call fcn.180005c20
mov rdi, rbx
test rbx, rbx
jne 0x180002a73
mov rsi, qword [rsp + 0x540]
mov rbp, qword [rsp + 0x538]
test r14d, r14d
mov r14, qword [rsp + 0x518]
mov qword [0x18001eb18], r15
je 0x180002bac
cmp dword [0x18001eb24], r15d
jne 0x180002bac
mov rcx, qword [0x18001eb30]
lea rbx, [0x18001eb30]
test rcx, rcx
je 0x180002bac
cmp dword [rcx], 0x52727464
jne 0x180002ba0
lea r9, [rcx + 0x10000]
mov r8d, r15d
lea rdx, [rcx + 0xa8]
nop
mov rax, qword [rdx]
test rax, rax
je 0x180002b72
cmp rax, rcx
jb 0x180002ba0
cmp rax, r9
jae 0x180002ba0
inc r8d
add rdx, 0x60
cmp r8d, 0x2a9
jb 0x180002b60
mov rax, qword [rcx + 8]
xor edx, edx
mov r8d, 0x8000
mov qword [rbx], rax
call qword [sym.imp.kernel32.dll_VirtualFree]
mov qword [0x18001eb40], r15
jmp 0x180002ba4
lea rbx, [rcx + 8]
mov rcx, qword [rbx]
test rcx, rcx
jne 0x180002b45
call qword [sym.imp.kernel32.dll_GetCurrentProcess]
mov rbx, qword [0x18001eb30]
mov rdi, rax
test rbx, rbx
je 0x180002c04
nop dword [rax]
nop word [rax + rax]
lea r9, [rsp + 0x20]
mov edx, 0x10000
mov r8d, 0x20
mov rcx, rbx
call qword [sym.imp.kernel32.dll_VirtualProtect]
mov r8d, 0x10000
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.kernel32.dll_FlushInstructionCache]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x180002bd0
mov rdi, qword [0x18001eb28]
test rdi, rdi
je 0x180002c32
mov rcx, qword [rdi + 8]
call qword [sym.imp.kernel32.dll_ResumeThread]
mov rbx, qword [rdi]
mov edx, 0x10
mov rcx, rdi
call fcn.180005c20
mov rdi, rbx
test rbx, rbx
jne 0x180002c10
mov rdi, qword [rsp + 0x520]
mov rbx, qword [rsp + 0x530]
mov qword [0x18001eb28], r15
mov dword [0x18001eb48], r15d
mov r15, qword [rsp + 0x510]
mov eax, dword [0x18001eb4c]
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.180005bc0
add rsp, 0x528
ret