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

Disassembly:
xor ecx, ecx
jmp 0x14016c290
push r12
sub rsp, 0x530
mov rax, qword [0x14029e8b8]
xor rax, rsp
mov qword [rsp + 0x500], rax
mov r12, rcx
test rcx, rcx
je 0x14016c2bd
mov rax, qword [0x1402bb710]
mov qword [rcx], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1402bb708], eax
je 0x14016c2d5
mov eax, 0x10dd
jmp 0x14016c7e5
cmp dword [0x1402bb70c], 0
mov qword [rsp + 0x548], rbx
mov qword [rsp + 0x550], rbp
mov qword [rsp + 0x528], rsi
mov qword [rsp + 0x520], rdi
je 0x14016c3d7
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1402bb708], eax
jne 0x14016c7bf
mov rbx, qword [0x1402bb720]
xor esi, esi
test rbx, rbx
je 0x14016c38b
mov rax, qword [rbx + 0x20]
lea r9, [rsp + 0x20]
mov r8d, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x18]
movzx edx, byte [rax + 0x3e]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [rbx + 8], esi
jne 0x14016c373
mov rbp, qword [rbx + 0x20]
test rbp, rbp
je 0x14016c373
xor edx, edx
mov rdi, rbp
and rdi, 0xffffffffffff0000
mov rcx, rbp
lea r8d, [rdx + 0x60]
call fcn.1401afc90
mov rax, qword [rdi + 0x10]
mov qword [rbp + 0x48], rax
mov qword [rdi + 0x10], rbp
mov qword [rbx + 0x20], rsi
mov rdi, qword [rbx]
mov edx, 0x30
mov rcx, rbx
call fcn.1401606e8
mov rbx, rdi
test rdi, rdi
jne 0x14016c322
mov qword [0x1402bb720], rsi
call fcn.14016baf0
mov rbx, qword [0x1402bb718]
test rbx, rbx
je 0x14016c3c5
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rdi, qword [rbx]
mov edx, ILClone
mov rcx, rbx
call fcn.1401606e8
mov rbx, rdi
test rdi, rdi
jne 0x14016c3a3
mov qword [0x1402bb718], rsi
mov dword [0x1402bb708], esi
jmp 0x14016c7bf
mov rbx, qword [0x1402bb720]
xor esi, esi
mov qword [rsp + 0x518], r14
mov qword [rsp + 0x510], r15
mov r15d, esi
test rbx, rbx
je 0x14016c490
nop dword [rax]
mov rdx, qword [rbx + 0x20]
cmp dword [rbx + 8], esi
je 0x14016c428
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
mov rcx, qword [rbx + 0x18]
call fcn.1401b00b0
mov rcx, qword [rbx + 0x10]
mov rax, qword [rbx + 0x18]
mov qword [rcx], rax
jmp 0x14016c484
mov word [rdx + 0x58], 0x25ff
lea rcx, [rdx + 0x58]
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 rdi, [rdx + 5]
lea rax, [rdx + 5]
sub ecx, eax
mov dword [rdx + 1], ecx
mov r8, qword [rbx + 0x20]
mov rcx, qword [r8 + 0x48]
sub rcx, rdi
cmp rdi, qword [r8 + 0x48]
cmova rcx, rsi
test rcx, rcx
je 0x14016c47d
mov eax, 0xcc
rep stosb byte [rdi], al
mov r8, qword [rbx + 0x20]
mov rax, qword [rbx + 0x10]
mov qword [rax], r8
mov rbx, qword [rbx]
test rbx, rbx
jne 0x14016c400
mov r14, qword [0x1402bb718]
test r14, r14
je 0x14016c5e4
mov rcx, qword [r14 + 8]
lea rdx, [rsp + 0x30]
mov dword [rsp + 0x60], 0x100001
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x14016c5d8
mov rbx, qword [0x1402bb720]
test rbx, rbx
je 0x14016c5d8
mov rcx, qword [rsp + 0x128]
cmp dword [rbx + 8], esi
je 0x14016c54b
mov r9, qword [rbx + 0x20]
cmp rcx, r9
jb 0x14016c5cc
lea rax, [r9 + 8]
cmp rcx, rax
jae 0x14016c5cc
movzx r10d, byte [rsp + 0x128]
lea rdi, [r9 + 0x40]
mov eax, esi
nop word [rax + rax]
movzx r8d, byte [rdi]
movzx edx, r10b
movzx ecx, r8b
sub dl, r9b
shr cl, 3
cmp cl, dl
je 0x14016c53d
inc eax
inc rdi
cmp eax, 8
jb 0x14016c510
xor r8b, r8b
movzx eax, r8b
add rax, qword [rbx + 0x18]
jmp 0x14016c5ad
and r8b, 7
movzx eax, r8b
add rax, qword [rbx + 0x18]
jmp 0x14016c5ad
mov r9, qword [rbx + 0x18]
cmp rcx, r9
jb 0x14016c5cc
mov r11, qword [rbx + 0x20]
movzx eax, byte [r11 + 0x3e]
add rax, r9
cmp rcx, rax
jae 0x14016c5cc
movzx r10d, byte [rsp + 0x128]
lea rdi, [r11 + 0x40]
mov edx, esi
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [rdi]
movzx ecx, r10b
movzx eax, r8b
sub cl, r9b
and al, 7
cmp al, cl
je 0x14016c5a3
inc edx
inc rdi
cmp edx, 8
jb 0x14016c580
mov eax, esi
jmp 0x14016c5aa
movzx eax, r8b
shr eax, 3
add rax, r11
mov rcx, qword [r14 + 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 0x14016c4d7
mov r14, qword [r14]
test r14, r14
jne 0x14016c4a0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, qword [0x1402bb720]
mov r14, rax
test rbx, rbx
je 0x14016c689
nop dword [rax]
mov rcx, qword [rbx + 0x20]
lea r9, [rsp + 0x20]
mov r8d, dword [rbx + 0x28]
movzx edx, byte [rcx + 0x3e]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rbx + 0x20]
mov rcx, r14
mov rdx, qword [rbx + 0x18]
movzx r8d, byte [rax + 0x3e]
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [rbx + 8], esi
je 0x14016c66d
mov rbp, qword [rbx + 0x20]
test rbp, rbp
je 0x14016c66d
xor edx, edx
mov rdi, rbp
and rdi, 0xffffffffffff0000
mov rcx, rbp
lea r8d, [rdx + 0x60]
call fcn.1401afc90
mov rax, qword [rdi + 0x10]
mov r15d, 1
mov qword [rbp + 0x48], rax
mov qword [rdi + 0x10], rbp
mov qword [rbx + 0x20], rsi
mov rdi, qword [rbx]
mov edx, 0x30
mov rcx, rbx
call fcn.1401606e8
mov rbx, rdi
test rdi, rdi
jne 0x14016c600
mov r14, qword [rsp + 0x518]
test r15d, r15d
mov r15, qword [rsp + 0x510]
mov qword [0x1402bb720], rsi
je 0x14016c722
cmp dword [0x1402bb704], esi
jne 0x14016c722
mov rcx, qword [0x1402bb6f0]
lea rbx, [0x1402bb6f0]
test rcx, rcx
je 0x14016c722
cmp dword [rcx], 0x52727464
jne 0x14016c716
lea r8, [rcx + 0x10000]
mov edi, esi
lea rdx, [rcx + 0xa8]
mov rax, qword [rdx]
test rax, rax
je 0x14016c6ea
cmp rax, rcx
jb 0x14016c716
cmp rax, r8
jae 0x14016c716
inc edi
add rdx, 0x60
cmp edi, 0x2a9
jb 0x14016c6d8
mov rax, qword [rcx + 8]
xor edx, edx
mov r8d, 0x8000
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [0x1402bb6f8], rsi
jmp 0x14016c71a
lea rbx, [rcx + 8]
mov rcx, qword [rbx]
test rcx, rcx
jne 0x14016c6c0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, qword [0x1402bb6f0]
mov rbx, rax
test rdi, rdi
je 0x14016c774
nop word [rax + rax]
lea r9, [rsp + 0x20]
mov edx, 0x10000
mov r8d, 0x20
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r8d, 0x10000
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov rdi, qword [rdi + 8]
test rdi, rdi
jne 0x14016c740
mov rbx, qword [0x1402bb718]
test rbx, rbx
je 0x14016c7a2
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rdi, qword [rbx]
mov edx, ILClone
mov rcx, rbx
call fcn.1401606e8
mov rbx, rdi
test rdi, rdi
jne 0x14016c780
mov qword [0x1402bb718], rsi
mov dword [0x1402bb708], esi
test r12, r12
je 0x14016c7bf
mov rax, qword [0x1402bb710]
mov qword [r12], rax
mov eax, dword [0x1402bb70c]
mov rdi, qword [rsp + 0x520]
mov rsi, qword [rsp + 0x528]
mov rbp, qword [rsp + 0x550]
mov rbx, qword [rsp + 0x548]
mov rcx, qword [rsp + 0x500]
xor rcx, rsp
call fcn.140160a40
add rsp, 0x530
pop r12
ret