Function at 0x140064c50
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
mov rax, qword [0x140114040]
xor rax, rsp
mov qword [rsp + 0xb0], rax
lea r15, [rcx + 8]
test rdx, rdx
jle 0x1400650c8
mov rdi, rdx
mov rsi, rcx
movaps xmm0, xmmword [0x1400f3bf0]
movaps xmmword [rsp + 0x50], xmm0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x90], rax
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
xor eax, eax
mov byte [rsp + 0x50], al
mov byte [rsp + 0x90], al
cmp byte [rcx + 0x10], al
je 0x140064e90
movabs r14, 0x7fffffffffffffff
movabs r12, 0x8637bd05af7
cmp rdi, r14
je 0x140064deb
mov rax, qword [0x140116510]
lea rcx, [0x140090620]
cmp rax, rcx
jne 0x1400650a5
lea rbx, [rsp + 0x30]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
mov rcx, qword [0x140125770]
cmp rax, r12
jge 0x1400650de
imul rax, rax, 0xf4240
cqo
idiv rcx
mov qword [rsp + 0xa8], rax
mov r13, qword [rsp + 0xa8]
lea rax, [rdi + r13]
sar rax, 0x3f
btc rax, 0x3f
add r13, rdi
cmovo r13, rax
mov rbp, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
movabs rbx, 0x20c49ba5e353f7cf
cmp rdi, r14
je 0x140064de4
mov rax, rdi
shr rax, 3
mul rbx
mov rax, rdx
shr rax, 4
imul rcx, rax, 0x3e8
cmp rcx, rdi
adc rax, 0
mov rcx, rax
shr rcx, 0x20
neg rcx
mov edx, 0
sbb edx, edx
or edx, eax
mov rcx, qword [r15]
call rbp
test eax, eax
jne 0x140064e1a
mov dil, 1
cmp byte [rsi + 0x10], 0
je 0x140064dff
cmp byte [rsp + 0x90], 0
jne 0x140064df3
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.1400941a0
mov eax, edi
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov edx, 0xffffffff
jmp 0x140064da2
mov r13, r14
jmp 0x140064d5a
lea rcx, [rsp + 0x50]
call fcn.14005a5b0
jmp 0x140064dbe
mov qword [rsp + 0xa0], 0x9b
mov al, byte [0x14012569b]
test al, al
je 0x140064db4
jmp 0x140065115
mov rax, qword [0x140116510]
lea rcx, [0x140090620]
cmp rax, rcx
jne 0x1400650b8
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x30]
mov rcx, qword [0x140125770]
cmp rax, r12
jge 0x140065158
imul rax, rax, 0xf4240
cqo
idiv rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
xor ecx, ecx
cmp r13, rax
setns cl
add rcx, r14
mov rdi, r13
sub rdi, rax
cmovo rdi, rcx
jg 0x140064d6b
jmp 0x140065055
lea rdx, str.TimedWait
lea r8, str....._base_synchronizationwaitable_event.cc
lea rbx, [rsp + 0x30]
mov rcx, rbx
mov r9d, 0x24
call fcn.140057f70
cmp byte [rsp + 0x90], 0
jne 0x1400650fe
mov eax, dword [0x140122718]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov r14, qword [rax + 0x168]
mov rax, qword [0x1401165a0]
and rax, r14
cmp rax, qword [0x140116588]
jne 0x140064ef4
mov rcx, r14
call fcn.140056440
mov qword [rsp + 0x50], r14
mov eax, dword [0x140122718]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r12, [rax + 0x170]
mov r14, qword [r12]
mov rax, qword [0x1401165a0]
and rax, r14
cmp rax, qword [0x140116588]
jne 0x140064f32
mov rcx, r14
call fcn.140056440
lea rax, [rsp + 0x50]
mov qword [rax + 8], r14
mov qword [rax + 0x10], r12
mov rcx, qword [r12]
mov qword [r12], rax
mov qword [rax + 0x18], rcx
mov rax, qword [rax + 8]
test rax, rax
je 0x140064fbc
mov al, byte [rax + 0x20]
mov byte [rsp + 0x70], al
xor eax, eax
mov byte [rsp + 0x78], al
mov byte [rsp + 0x88], al
mov ecx, dword [0x140122718]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp byte [rcx + 0x180], al
je 0x140064fc0
mov rax, qword [rsp + 0x58]
test rax, rax
je 0x140064fea
cmp byte [rax + 0x38], 0
je 0x140064fea
mov r14, qword [rax + 0x30]
mov qword [rax + 0x30], 0
test r14, r14
je 0x140064fea
lock dec dword [r14]
jne 0x140064fea
mov rcx, r14
call fcn.14000a020
mov rcx, r14
call fcn.140092084
jmp 0x140064fea
xor eax, eax
jmp 0x140064f57
mov eax, dword [0x14012bc24]
mov ecx, dword [0x140122718]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14006505c
cmp byte [0x14012bc20], 0
je 0x140064f83
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140065003
cmp qword [rsp + 0x58], 0
jne 0x140065003
xor edx, edx
call fcn.14005b010
mov qword [rsp + 0x98], 0xa
mov al, byte [0x14012560a]
test al, al
jne 0x140065026
mov byte [rsp + 0x90], 1
jmp 0x140064cce
movzx ecx, al
lea r9, [rsp + 0xa8]
mov qword [r9], rbx
lea rax, str.ScopedBlockingCallWithBaseSyncPrimitives
lea r8, [rsp + 0xa0]
mov qword [r8], rax
lea rdx, [rsp + 0x98]
call fcn.14000ef20
jmp 0x140065019
xor edi, edi
jmp 0x140064db4
lea rcx, [0x14012bc24]
call fcn.140092134
cmp dword [0x14012bc24], 0xffffffff
jne 0x140064fe1
mov rcx, qword [0x140125838]
test rcx, rcx
je 0x14006508d
lea rdx, str.enable_background_thread_pool
call fcn.14000a0d0
mov byte [0x14012bc20], 1
lea rcx, [0x14012bc24]
call fcn.1400920c8
jmp 0x140064fe1
lea rcx, [rsp + 0xa8]
call qword [str.P:_f_]
jmp 0x140064d3e
lea rcx, [rsp + 0x30]
call qword [str.P:_f_]
jmp 0x140064e6b
mov rcx, qword [r15]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete dil
jmp 0x140064dbe
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140064d36
lea r14, [rsp + 0x50]
mov rcx, r14
call fcn.14005a5b0
mov byte [r14 + 0x40], 0
jmp 0x140064ebf
movzx ecx, al
xor r15, qword [0x140123bb8]
mov qword [rsp + 0x30], r15
lea rax, str.WaitableEvent::Wait_Complete
lea r8, [rsp + 0xa8]
mov qword [r8], rax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0xa0]
mov r9d, 3
call fcn.14006aec0
jmp 0x140064db4
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140064e66