Function at 0x100464dd0
Capabilities:
Hook routines via microsoft detours

Disassembly:
sub rsp, 0x48
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1004ae178], eax
je 0x100464dec
mov eax, 0x10dd
add rsp, 0x48
ret
cmp dword [0x1004adf68], 0
je 0x100464e05
call fcn.100464c90
mov eax, dword [0x1004adf68]
add rsp, 0x48
ret
mov qword [rsp + 0x50], rbx
mov rbx, qword [0x1004ae5b0]
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
xor r15d, r15d
mov r14d, r15d
test rbx, rbx
je 0x100464ec5
mov rdx, qword [rbx + 0x20]
cmp dword [rbx + 8], r15d
je 0x100464e5d
movzx r8d, byte [rdx + 0x3e]
add rdx, 0x20
mov rcx, qword [rbx + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rbx + 0x10]
mov rax, qword [rbx + 0x18]
mov qword [rcx], rax
jmp 0x100464eb9
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, r15
test rcx, rcx
je 0x100464eb2
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 0x100464e34
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, qword [0x1004ae5b0]
mov rbp, rax
test rbx, rbx
je 0x100464f79
mov qword [rsp + 0x60], rsi
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, rbp
mov rdx, qword [rbx + 0x18]
movzx r8d, byte [rax + 0x3e]
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [rbx + 8], r15d
je 0x100464f51
mov rsi, qword [rbx + 0x20]
test rsi, rsi
je 0x100464f51
xor edx, edx
mov rdi, rsi
and rdi, 0xffffffffffff0000
mov rcx, rsi
lea r8d, [rdx + 0x60]
call sub.VCRUNTIME140.dll_memset
mov rax, qword [rdi + 0x10]
mov r14d, 1
mov qword [rsi + 0x48], rax
mov qword [rdi + 0x10], rsi
mov qword [rbx + 0x20], r15
mov rdi, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, rdi
test rdi, rdi
jne 0x100464ee3
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
test r14d, r14d
mov r14, qword [rsp + 0x38]
mov qword [0x1004ae5b0], r15
je 0x10046501a
cmp dword [0x1004aa044], r15d
jne 0x10046501a
mov rcx, qword [0x1004ae5a0]
lea rbx, [0x1004ae5a0]
test rcx, rcx
je 0x10046501a
cmp dword [rcx], 0x52727464
jne 0x10046500e
lea r8, [rcx + 0x10000]
mov edi, r15d
lea rdx, [rcx + 0xa8]
nop dword [rax]
mov rax, qword [rdx]
test rax, rax
je 0x100464fe2
cmp rax, rcx
jb 0x10046500e
cmp rax, r8
jae 0x10046500e
inc edi
add rdx, 0x60
cmp edi, 0x2a9
jb 0x100464fd0
mov rax, qword [rcx + 8]
xor edx, edx
mov r8d, 0x8000
mov qword [rbx], rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov qword [0x1004ae388], r15
jmp 0x100465012
lea rbx, [rcx + 8]
mov rcx, qword [rbx]
test rcx, rcx
jne 0x100464fb3
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, qword [0x1004ae5a0]
mov rbx, rax
test rdi, rdi
je 0x100465064
nop
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 0x100465030
mov rdi, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
mov eax, dword [0x1004adf68]
mov qword [0x1004ae5a8], r15
mov dword [0x1004ae178], r15d
mov r15, qword [rsp + 0x30]
add rsp, 0x48
ret