Function at 0x140078ae0
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 rsi, rcx
mov rax, qword [0x1401f6040]
xor rax, rsp
mov qword [rsp + 0xb0], rax
test rdx, rdx
jle 0x140078d99
mov rdi, rdx
movaps xmm0, xmmword [0x1401c7000]
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 [rsi + 8], al
je 0x140078cbe
movabs r12, 0x7fffffffffffffff
movabs r13, 0x8637bd05af7
cmp rdi, r12
je 0x140078c75
mov rax, qword [0x1401f86c0]
lea rcx, [0x14007dcb0]
cmp rax, rcx
jne 0x140078dc6
lea rbx, [rsp + 0x30]
mov qword [rbx], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbx]
cmp rax, r13
jge 0x140078df4
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402085c8]
mov rbx, rax
lea rax, [rbx + rdi]
sar rax, 0x3f
btc rax, 0x3f
add rbx, rdi
cmovo rbx, rax
mov rbp, qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r14, qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
movabs r15, 0x20c49ba5e353f7cf
mov rcx, rdi
cmp rcx, r12
je 0x140078c6e
mov rax, rcx
shr rax, 3
mul r15
mov rax, rdx
shr rax, 4
imul rdx, rax, 0x3e8
cmp rdx, rcx
adc rax, 0
mov rcx, rax
shr rcx, 0x20
neg rcx
mov edx, 0
sbb edx, edx
or edx, eax
mov rcx, qword [rsi]
call rbp
test eax, eax
jne 0x140078d26
mov dil, 1
cmp byte [rsi + 8], 0
je 0x140078c7d
cmp byte [rsp + 0x90], 1
je 0x140078c98
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.1400d4e20
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 0x140078c28
mov rbx, r12
jmp 0x140078bd6
mov qword [rsp + 0xa0], 0x168
mov al, byte [0x1402082b8]
test al, al
je 0x140078c3e
jmp 0x140078ea3
mov qword [rsp + 0xa8], 0xb
mov al, byte [0x14020815b]
test al, al
jne 0x140078e35
lea rcx, [rsp + 0x50]
call fcn.140094d00
jmp 0x140078c48
lea rdx, str.TimedWait
lea r8, str....._base_synchronizationwaitable_event.cc
lea rbx, [rsp + 0x30]
mov rcx, rbx
mov r9d, 0x40
call fcn.1400916b0
cmp byte [rsp + 0x90], 1
je 0x140078e1e
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 1
call fcn.1400a94b0
mov qword [rsp + 0x98], 0xb
mov al, byte [0x14020815b]
test al, al
jne 0x140078e71
mov byte [rsp + 0x90], 1
jmp 0x140078b5a
cmp eax, 0x102
jne 0x140078e5c
mov rax, qword [0x1401f86c0]
lea rcx, [0x14007dcb0]
cmp rax, rcx
jne 0x140078ddf
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call r14
mov rax, qword [rsp + 0x30]
cmp rax, r13
jge 0x140078ee6
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402085c8]
xor edx, edx
cmp rbx, rax
setns dl
add rdx, r12
mov rcx, rbx
sub rcx, rax
cmovo rcx, rdx
jg 0x140078bf1
xor edi, edi
jmp 0x140078c3e
mov rcx, qword [rsi]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
test eax, eax
jne 0x140078db5
test esi, esi
sete dil
jmp 0x140078c48
cmp esi, 0x102
je 0x140078daa
mov ecx, esi
call fcn.14013f7c0
jmp 0x140078daa
lea rbx, [rsp + 0xa8]
mov rcx, rbx
call qword [0x1401e8220]
mov rbx, qword [rbx]
jmp 0x140078bc2
lea rcx, [rsp + 0x30]
call qword [0x1401e8220]
lea rax, [rsp + 0x30]
mov rax, qword [rax]
jmp 0x140078d77
mov rcx, qword [0x1402085c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
mov rbx, rax
add rbx, r8
jmp 0x140078bc2
lea r14, [rsp + 0x50]
mov rcx, r14
call fcn.140006ae0
mov byte [r14 + 0x40], 0
jmp 0x140078ced
movzx ecx, al
lea r8, [rsp + 0x30]
mov qword [r8], 0
lea rdx, [rsp + 0xa8]
mov r9d, 2
call fcn.140087840
jmp 0x140078cb2
cmp rdi, r12
jne 0x140078d31
mov ecx, eax
call fcn.14013f7c0
jmp 0x140078d31
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.140130fe0
jmp 0x140078d19
movzx ecx, al
xor rsi, qword [0x140206af0]
mov qword [rsp + 0x30], rsi
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.14013f840
jmp 0x140078c3e
mov rcx, qword [0x1402085c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x140078d77