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

Disassembly:
sub rsp, 0x28
mov rcx, qword [rcx]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete al
add rsp, 0x28
ret
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x178
movaps xmmword [rsp + 0x160], xmm6
mov rdi, rcx
mov rax, qword [0x140131028]
xor rax, rsp
mov qword [rsp + 0x158], rax
test rdx, rdx
jle 0x14005b617
mov rbx, rdx
movaps xmm6, xmmword [0x140115d80]
movaps xmmword [rsp + 0x100], xmm6
movaps xmmword [rsp + 0x110], xmm6
movaps xmmword [rsp + 0x120], xmm6
movaps xmmword [rsp + 0x130], xmm6
movaps xmmword [rsp + 0x140], xmm6
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0x150], rax
mov byte [rsp + 0x100], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0x108], xmm0
movups xmmword [rsp + 0x118], xmm0
movups xmmword [rsp + 0x128], xmm0
movups xmmword [rsp + 0x138], xmm0
mov qword [rsp + 0x148], 0
cmp byte [rdi + 8], 0
je 0x14005b192
movabs r12, 0x7fffffffffffffff
movabs r13, 0x8637bd05af7
cmp rbx, r12
je 0x14005b163
mov rax, qword [0x1401405c8]
lea rcx, [0x140094050]
cmp rax, rcx
jne 0x14005b5d7
mov qword [rsp + 0xa8], 0
lea rcx, [rsp + 0xa8]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0xa8]
cmp rax, r13
jge 0x14005b5ed
imul rax, rax, 0xf4240
cqo
idiv qword [0x140149418]
mov r14, rax
lea rax, [r14 + rbx]
sar rax, 0x3f
movabs rcx, 0x8000000000000000
xor rcx, rax
add r14, rbx
cmovo r14, rcx
mov rbp, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r15, [rsp + 0xa8]
movabs rsi, 0x20c49ba5e353f7cf
cmp rbx, r12
je 0x14005b15c
mov rax, rbx
shr rax, 3
mul rsi
shr rdx, 4
imul rax, rdx, 0x3e8
cmp rax, rbx
adc rdx, 0
mov rax, rdx
shr rax, 0x20
jne 0x14005b15c
mov rcx, qword [rdi]
call rbp
test eax, eax
jne 0x14005b2f2
mov bl, 1
cmp byte [rdi + 8], 0
je 0x14005b16b
cmp byte [rsp + 0x100], 0
jne 0x14005b179
mov rcx, qword [rsp + 0x158]
xor rcx, rsp
call fcn.140096c60
mov eax, ebx
movaps xmm6, xmmword [rsp + 0x160]
add rsp, 0x178
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov edx, 0xffffffff
jmp 0x14005b10f
mov r14, r12
jmp 0x14005b0cc
test byte [0x14013f980], 0x19
je 0x14005b124
jmp 0x14005b657
lea rcx, [rsp + 0x108]
call fcn.14005bd20
jmp 0x14005b12e
mov rcx, r14
call fcn.14005ae30
jmp 0x14005b1e3
movabs rsi, 0xfffffffc00000000
lea rdx, str.TimedWait
lea r8, str....._base_synchronizationwaitable_event.cc
lea rcx, [rsp + 0x38]
mov r9d, 0x24
call fcn.140078ba0
mov eax, dword [0x140140950]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov r14, qword [rax + 0x170]
mov rax, r14
and rax, rsi
cmp rax, qword [0x140131e48]
je 0x14005b188
mov qword [rsp + 0x108], r14
mov eax, dword [0x140140950]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r15, [rax + 0x178]
mov r14, qword [r15]
and rsi, r14
cmp rsi, qword [0x140131e48]
je 0x14005b64a
mov qword [rsp + 0x110], r14
mov qword [rsp + 0x118], r15
mov rax, qword [r15]
lea rcx, [rsp + 0x108]
mov qword [r15], rcx
mov qword [rsp + 0x120], rax
mov rax, qword [rsp + 0x110]
test rax, rax
jne 0x14005b2ba
xor ecx, ecx
mov byte [rsp + 0x128], cl
mov byte [rsp + 0x130], 0
mov ecx, dword [0x140140950]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp byte [rcx + 0x190], 0
je 0x14005b2bf
test rax, rax
jne 0x14005b361
mov rcx, qword [rsp + 0x108]
test rcx, rcx
je 0x14005b2a0
cmp qword [rsp + 0x110], 0
jne 0x14005b2a0
xor edx, edx
call fcn.14006a480
test byte [0x14013f080], 0x19
jne 0x14005b370
mov byte [rsp + 0x100], 1
jmp 0x14005b03e
mov cl, byte [rax + 0x20]
jmp 0x14005b24d
mov eax, dword [0x14014b2cc]
mov ecx, dword [0x140140950]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x14005b54e
cmp byte [0x14014b2c8], 0
jne 0x14005b281
jmp 0x14005b541
mov rax, qword [0x1401405c8]
lea rcx, [0x140094050]
cmp rax, rcx
jne 0x14005b597
mov qword [rsp + 0xa8], 0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0xa8]
cmp rax, r13
jge 0x14005b5b0
imul rax, rax, 0xf4240
cqo
idiv qword [0x140149418]
xor ecx, ecx
cmp r14, rax
setns cl
add rcx, r12
mov rbx, r14
sub rbx, rax
cmovo rbx, rcx
jg 0x14005b0e5
xor ebx, ebx
jmp 0x14005b124
cmp byte [rax + 0x28], 0
je 0x14005b281
jmp 0x14005b71f
lea r14, [rsp + 0x80]
movaps xmmword [r14 + 0x10], xmm6
movaps xmmword [r14], xmm6
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov byte [rsp + 0x30], 0
lea r8, [0x14013f080]
lea r9, str.ScopedBlockingCallWithBaseSyncPrimitives
mov rcx, r14
mov dl, 0x42
call fcn.1400626c0
mov rax, qword [r14]
test rax, rax
je 0x14005b50f
mov cl, byte [rsp + 0x98]
mov rdx, qword [rsp + 0x88]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdx
xor eax, eax
mov qword [rsp + 0x70], rax
mov byte [rsp + 0x78], cl
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xb8], rax
mov eax, dword [rsp + 0x69]
mov dword [rsp + 0xb9], eax
movzx eax, word [rsp + 0x6d]
mov word [rsp + 0xbd], ax
mov al, byte [rsp + 0x6f]
mov byte [rsp + 0xbf], al
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0xc0], rax
mov al, byte [rsp + 0x78]
mov byte [rsp + 0xc8], al
mov rcx, qword [rsp + 0xb0]
mov edx, 0x21
call fcn.14006d500
mov r14, rax
mov rdx, qword [rsp + 0x40]
lea r15, [rsp + 0xe8]
mov rcx, r15
call fcn.1400c8790
movzx r9d, byte [r15 + 0x17]
test r9b, r9b
js 0x14005b472
and r9d, 0x7f
jmp 0x14005b482
mov r9, qword [rsp + 0xf0]
mov r15, qword [rsp + 0xe8]
mov rcx, r14
mov edx, 2
mov r8, r15
call fcn.14006d900
cmp byte [rsp + 0xff], 0
jns 0x14005b4a9
mov rcx, qword [rsp + 0xe8]
call fcn.140094ae4
mov rdx, qword [rsp + 0x38]
lea r15, [rsp + 0xd0]
mov rcx, r15
call fcn.1400c8790
movzx r9d, byte [r15 + 0x17]
test r9b, r9b
js 0x14005b4ce
and r9d, 0x7f
jmp 0x14005b4de
mov r9, qword [rsp + 0xd8]
mov r15, qword [rsp + 0xd0]
mov rcx, r14
mov edx, 3
mov r8, r15
call fcn.14006d900
cmp byte [rsp + 0xe7], 0
js 0x14005b532
lea rcx, [rsp + 0xa8]
call fcn.1400626d0
lea rcx, [rsp + 0x58]
call fcn.1400626d0
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x14005b2ad
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140154008]
jmp 0x14005b2ad
mov rcx, qword [rsp + 0xd0]
call fcn.140094ae4
jmp 0x14005b4f8
mov rax, qword [rsp + 0x110]
jmp 0x14005b278
lea rcx, [0x14014b2cc]
call fcn.140094c5c
cmp dword [0x14014b2cc], 0xffffffff
jne 0x14005b2e4
mov rcx, qword [0x1401494f0]
test rcx, rcx
je 0x14005b57f
lea rdx, str.enable_background_thread_pool
call fcn.14008b930
mov byte [0x14014b2c8], 1
lea rcx, [0x14014b2cc]
call fcn.140094bfc
jmp 0x14005b2e4
lea rbx, [rsp + 0xa8]
mov rcx, rbx
call qword [0x140154008]
mov rax, qword [rbx]
jmp 0x14005b33f
mov rcx, qword [0x140149418]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x14005b33f
lea r14, [rsp + 0x58]
mov rcx, r14
call qword [0x140154008]
mov r14, qword [r14]
jmp 0x14005b0b0
mov rcx, qword [0x140149418]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
mov r14, rax
add r14, r8
jmp 0x14005b0b0
mov rcx, qword [rsp + 0x158]
xor rcx, rsp
call fcn.140096c60
mov rcx, rdi
movaps xmm6, xmmword [rsp + 0x160]
add rsp, 0x178
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x140054170
mov rcx, r14
call fcn.14005ae30
jmp 0x14005b218
mov r14, qword [0x140147900]
lea r15, [rsp + 0x80]
movaps xmmword [r15 + 0x10], xmm6
movaps xmmword [r15], xmm6
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov byte [rsp + 0x30], 0
lea r8, [0x14013f980]
lea r9, str.WaitableEvent::Wait_Complete
mov rcx, r15
mov dl, 0x49
call fcn.1400626c0
mov rcx, qword [r15]
test rcx, rcx
je 0x14005b6fc
xor r14, rdi
mov al, byte [rsp + 0x98]
mov rdx, qword [rsp + 0x88]
lea rdi, [rsp + 0x58]
mov qword [rdi + 8], rcx
mov qword [rdi + 0x10], rdx
xor esi, esi
mov qword [rdi + 0x18], rsi
mov byte [rdi + 0x20], al
mov edx, 0x30
mov r8, r14
call fcn.14008ff80
lea rcx, [rsp + 0xa8]
mov qword [rcx], rsi
mov qword [rdi], rsi
movups xmm0, xmmword [rdi + 8]
movups xmm1, xmmword [rdi + 0x11]
movups xmmword [rcx + 8], xmm0
movups xmmword [rcx + 0x11], xmm1
call fcn.1400626d0
mov rcx, rdi
call fcn.1400626d0
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x14005b124
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140154008]
jmp 0x14005b124
mov r14, qword [rax + 0x38]
mov qword [rax + 0x38], 0
test r14, r14
je 0x14005b281
lock dec dword [r14]
jne 0x14005b281
mov rcx, r14
call fcn.14000ca20
mov rcx, r14
call fcn.140094ae4
jmp 0x14005b281