Function at 0x140058030
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, 0x168
movaps xmmword [rsp + 0x150], xmm6
mov rsi, rcx
mov rax, qword [0x14012f028]
xor rax, rsp
mov qword [rsp + 0x148], rax
test rdx, rdx
jle 0x1400587f9
mov rdi, rdx
movabs rcx, 0x7fffffffffffffff
movaps xmm6, xmmword [0x140114ca0]
movaps xmmword [rsp + 0x60], xmm6
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rsp + 0xa0], rax
movaps xmmword [rsp + 0x90], xmm6
movaps xmmword [rsp + 0x80], xmm6
movaps xmmword [rsp + 0x70], xmm6
mov byte [rsp + 0x60], 0
mov byte [rsp + 0xa0], 0
cmp byte [rsi + 8], 0
je 0x14005828e
movabs r15, 0x8637bd05af7
cmp rdi, rcx
je 0x1400581ea
mov rax, qword [0x14013e628]
lea rcx, [0x1400931e0]
cmp rax, rcx
jne 0x14005879d
mov qword [rsp + 0xf0], 0
lea rcx, [rsp + 0xf0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0xf0]
cmp rax, r15
jge 0x1400587cf
imul rax, rax, 0xf4240
cqo
idiv qword [0x1401473f8]
mov rbx, rax
lea rax, [rbx + rdi]
sar rax, 0x3f
movabs rcx, 0x8000000000000000
xor rcx, rax
add rbx, rdi
cmovo rbx, rcx
movabs rcx, 0x7fffffffffffffff
mov r12, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea r14, [rsp + 0xf0]
mov rbp, qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
movabs r13, 0x20c49ba5e353f7cf
cmp rdi, rcx
je 0x1400581e3
mov rax, rdi
shr rax, 3
mul r13
shr rdx, 4
imul rax, rdx, 0x3e8
cmp rax, rdi
adc rdx, 0
mov rax, rdx
shr rax, 0x20
jne 0x1400581e3
mov rcx, qword [rsi]
call r12
test eax, eax
jne 0x14005820c
mov dil, 1
cmp byte [rsi + 8], 0
je 0x1400581f2
cmp byte [rsp + 0xa0], 0
jne 0x140058200
mov rcx, qword [rsp + 0x148]
xor rcx, rsp
call fcn.140095f80
mov eax, edi
movaps xmm6, xmmword [rsp + 0x150]
add rsp, 0x168
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov edx, 0xffffffff
jmp 0x140058198
mov rbx, rcx
jmp 0x14005814e
test byte [0x14013d9f0], 0x19
je 0x1400581ab
jmp 0x14005884f
lea rcx, [rsp + 0x60]
call fcn.140058c10
jmp 0x1400581b5
mov rax, qword [0x14013e628]
lea rcx, [0x1400931e0]
cmp rax, rcx
jne 0x1400587b6
mov qword [rsp + 0xf0], 0
mov rcx, r14
call rbp
mov rax, qword [rsp + 0xf0]
cmp rax, r15
jge 0x140058935
imul rax, rax, 0xf4240
cqo
idiv qword [0x1401473f8]
xor ecx, ecx
cmp rbx, rax
setns cl
movabs rdx, 0x7fffffffffffffff
add rcx, rdx
mov rdi, rbx
sub rdi, rax
cmovo rdi, rcx
mov rcx, rdx
jg 0x14005816e
xor edi, edi
jmp 0x1400581ab
mov rcx, rbx
call fcn.140057b30
jmp 0x1400582ed
lea rdx, str.TimedWait
lea r8, str....._base_synchronizationwaitable_event.cc
lea rcx, [rsp + 0x40]
mov r9d, 0x24
call fcn.140072460
cmp byte [rsp + 0xa0], 0
jne 0x140058839
movabs r14, 0xfffffffc00000000
mov eax, dword [0x14013e9b0]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov rbx, qword [rax + 0x170]
mov rax, rbx
and rax, r14
cmp rax, qword [0x14012fdc8]
je 0x140058284
mov qword [rsp + 0x60], rbx
mov eax, dword [0x14013e9b0]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r15, [rax + 0x178]
mov rbx, qword [r15]
and r14, rbx
cmp r14, qword [0x14012fdc8]
je 0x14005882c
lea rax, [rsp + 0x60]
mov qword [rax + 8], rbx
mov qword [rax + 0x10], r15
mov rcx, qword [r15]
mov qword [r15], rax
mov qword [rax + 0x18], rcx
mov rax, qword [rax + 8]
test rax, rax
jne 0x1400583b1
xor ecx, ecx
mov byte [rsp + 0x80], cl
xor ecx, ecx
mov byte [rsp + 0x88], cl
mov byte [rsp + 0x98], cl
mov edx, dword [0x14013e9b0]
mov r8, qword gs:[0x58]
mov rdx, qword [r8 + rdx*8]
cmp byte [rdx + 0x190], cl
je 0x1400583b6
test rax, rax
jne 0x1400583e9
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140058391
cmp qword [rsp + 0x68], 0
jne 0x140058391
xor edx, edx
call fcn.1400917f0
test byte [0x14013d0e0], 0x19
jne 0x1400583f4
mov byte [rsp + 0xa0], 1
movabs rcx, 0x7fffffffffffffff
jmp 0x1400580c0
mov cl, byte [rax + 0x20]
jmp 0x140058341
mov eax, dword [0x14014928c]
mov ecx, dword [0x14013e9b0]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x140058754
cmp byte [0x140149288], 0
jne 0x140058378
jmp 0x14005874a
cmp byte [rax + 0x38], 0
je 0x140058378
jmp 0x1400589b4
lea rbx, [rsp + 0xd0]
movaps xmmword [rbx + 0x10], xmm6
movaps xmmword [rbx], xmm6
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov byte [rsp + 0x30], 0
lea r8, [0x14013d0e0]
lea r9, str.ScopedBlockingCallWithBaseSyncPrimitives
mov rcx, rbx
mov dl, 0x42
call fcn.140060ad0
mov rax, qword [rbx]
test rax, rax
je 0x14005866e
mov cl, byte [rsp + 0xe8]
mov rdx, qword [rsp + 0xd8]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rdx
xor eax, eax
mov qword [rsp + 0xc0], rax
mov byte [rsp + 0xc8], cl
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x100], rax
mov eax, dword [rsp + 0xb9]
mov dword [rsp + 0x101], eax
movzx eax, word [rsp + 0xbd]
mov word [rsp + 0x105], ax
mov al, byte [rsp + 0xbf]
mov byte [rsp + 0x107], al
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0x108], rax
mov al, byte [rsp + 0xc8]
mov byte [rsp + 0x110], al
mov rcx, qword [rsp + 0xf8]
mov edx, 0x21
call fcn.14007c020
mov r15, qword [rsp + 0x48]
test r15, r15
je 0x14005895c
mov rbx, rax
mov rcx, r15
call fcn.1400b04b0
mov r12, rax
movabs rax, 0x7fffffffffffffff
lea rbp, [rax - 8]
cmp r12, rbp
ja 0x14005891b
lea r14, [rsp + 0x130]
cmp r12, 0x16
ja 0x1400586a0
mov byte [rsp + 0x147], r12b
mov rcx, r14
lea r13, [rcx + r12]
cmp rcx, r15
ja 0x140058552
cmp r13, r15
ja 0x140058988
test r12, r12
je 0x140058562
mov rdx, r15
mov r8, r12
call fcn.140097a10
mov byte [r13], 0
movzx eax, byte [rsp + 0x147]
mov r9d, eax
and r9d, 0x7f
test al, al
cmovs r9, qword [rsp + 0x138]
cmovs r14, qword [rsp + 0x130]
mov rcx, rbx
mov edx, 2
mov r8, r14
call fcn.140059020
cmp byte [rsp + 0x147], 0
jns 0x1400585b1
mov rcx, qword [rsp + 0x130]
call fcn.140093dd0
mov r15, qword [rsp + 0x40]
test r15, r15
je 0x14005895c
mov rcx, r15
call fcn.1400b04b0
cmp rax, rbp
ja 0x140058928
mov r12, rax
lea r14, [rsp + 0x118]
cmp rax, 0x16
ja 0x1400586f5
mov byte [rsp + 0x12f], r12b
mov rcx, r14
lea r13, [rcx + r12]
cmp rcx, r15
ja 0x140058602
cmp r13, r15
ja 0x140058988
test r12, r12
je 0x140058612
mov rdx, r15
mov r8, r12
call fcn.140097a10
mov byte [r13], 0
movzx eax, byte [rsp + 0x12f]
mov r9d, eax
and r9d, 0x7f
test al, al
cmovs r9, qword [rsp + 0x120]
cmovs r14, qword [rsp + 0x118]
mov rcx, rbx
mov edx, 3
mov r8, r14
call fcn.140059020
cmp byte [rsp + 0x12f], 0
js 0x140058691
lea rcx, [rsp + 0xf0]
call fcn.140060ae0
lea rcx, [rsp + 0xa8]
call fcn.140060ae0
mov rcx, qword [rsp + 0xe0]
test rcx, rcx
je 0x14005839a
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140152008]
jmp 0x14005839a
mov rcx, qword [rsp + 0x118]
call fcn.140093dd0
jmp 0x140058654
mov rax, r12
and rax, 0xfffffffffffffff8
add rax, 8
mov r13, r12
or r13, 7
cmp r13, 0x17
cmove r13, rax
inc r13
mov rcx, r13
call fcn.140093d8c
mov rcx, rax
mov qword [rsp + 0x130], rax
movabs rax, 0x7fffffffffffffff
inc rax
or rax, r13
mov qword [rsp + 0x140], rax
mov qword [rsp + 0x138], r12
jmp 0x140058540
mov rax, r12
and rax, 0xfffffffffffffff8
add rax, 8
mov r13, r12
or r13, 7
cmp r13, 0x17
cmove r13, rax
inc r13
mov rcx, r13
call fcn.140093d8c
mov rcx, rax
mov qword [rsp + 0x118], rax
movabs rax, 0x7fffffffffffffff
inc rax
or rax, r13
mov qword [rsp + 0x128], rax
mov qword [rsp + 0x120], r12
jmp 0x1400585f0
mov rax, qword [rsp + 0x68]
jmp 0x140058373
lea rcx, [0x14014928c]
call fcn.140093f10
cmp dword [0x14014928c], 0xffffffff
jne 0x1400583db
mov rcx, qword [0x1401474c0]
test rcx, rcx
je 0x140058785
lea rdx, str.enable_background_thread_pool
call fcn.140087ed0
mov byte [0x140149288], 1
lea rcx, [0x14014928c]
call fcn.140093f78
jmp 0x1400583db
lea rbx, [rsp + 0xa8]
mov rcx, rbx
call qword [0x140152008]
mov rbx, qword [rbx]
jmp 0x140058128
lea rdi, [rsp + 0xf0]
mov rcx, rdi
call qword [0x140152008]
mov rax, qword [rdi]
jmp 0x140058255
mov rcx, qword [0x1401473f8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
mov rbx, rax
add rbx, r8
jmp 0x140058128
mov rcx, qword [rsp + 0x148]
xor rcx, rsp
call fcn.140095f80
mov rcx, rsi
movaps xmm6, xmmword [rsp + 0x150]
add rsp, 0x168
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp 0x1400527f0
mov rcx, rbx
call fcn.140057b30
jmp 0x14005831f
lea rbx, [rsp + 0x60]
mov rcx, rbx
call fcn.140058c10
mov byte [rbx + 0x40], 0
jmp 0x1400582ba
mov rbx, qword [0x140145990]
lea r14, [rsp + 0xd0]
movaps xmmword [r14 + 0x10], xmm6
movaps xmmword [r14], xmm6
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov byte [rsp + 0x30], 0
lea r8, [0x14013d9f0]
lea r9, str.WaitableEvent::Wait_Complete
mov rcx, r14
mov dl, 0x49
call fcn.140060ad0
mov rcx, qword [r14]
test rcx, rcx
je 0x1400588f8
xor rbx, rsi
mov al, byte [rsp + 0xe8]
mov rdx, qword [rsp + 0xd8]
lea rsi, [rsp + 0xa8]
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rdx
xor r14d, r14d
mov qword [rsi + 0x18], r14
mov byte [rsi + 0x20], al
mov edx, 0x30
mov r8, rbx
call fcn.14008d240
lea rcx, [rsp + 0xf0]
mov qword [rcx], r14
mov qword [rsi], r14
movups xmm0, xmmword [rsi + 8]
movups xmm1, xmmword [rsi + 0x11]
movups xmmword [rcx + 8], xmm0
movups xmmword [rcx + 0x11], xmm1
call fcn.140060ae0
mov rcx, rsi
call fcn.140060ae0
mov rcx, qword [rsp + 0xe0]
test rcx, rcx
je 0x1400581ab
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x140152008]
jmp 0x1400581ab
lea rcx, [rsp + 0x130]
call fcn.1400c7b30
lea rcx, [rsp + 0x118]
call fcn.1400c7b30
mov rcx, qword [0x1401473f8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140058255
lea rax, str.basic_string_const_char__detected_nullptr
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s_n
lea rdx, str....._third_partylibc_srcinclude_string
lea r9, str.__s___nullptr
mov r8d, 0x3a7
call fcn.1400c7b30
lea rax, str.char_traits::copy_overlapped_range
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s_n
lea rdx, str....._third_partylibc_srcinclude__stringchar_traits.h
lea r9, str.__s2_____s1____s2_____s1____n
mov r8d, 0xf3
call fcn.1400c7b30
mov rbx, qword [rax + 0x30]
mov qword [rax + 0x30], 0
test rbx, rbx
je 0x140058378
lock dec dword [rbx]
jne 0x140058378
mov rcx, rbx
call fcn.140009410
mov rcx, rbx
call fcn.140093dd0
jmp 0x140058378