Function at 0x1401f6470
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, 0xc8
movaps xmmword [rsp + 0xb0], xmm6
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x140327038]
xor rax, rsp
mov qword [rsp + 0xa8], rax
movabs rcx, 0xaaaaaaaaaaaaaaaa
movabs r14, 0x7fffffffffffffff
mov dword [rsp + 0x9c], 4
mov rbx, qword [rdx]
cmp rbx, r14
je 0x1401f6581
mov rax, qword [rsi + 8]
mov r15, rcx
mov qword [rsp + 0xa0], rcx
test rax, rax
je 0x1401f67e6
xor ecx, ecx
cmp rbx, rax
setns cl
add rcx, r14
sub rbx, rax
cmovo rbx, rcx
lea rax, [r14 + rbx]
add rax, 2
cmp rax, 2
jb 0x1401f6539
mov rax, rbx
movabs rcx, 0x20c49ba5e353f7cf
imul rcx
mov rax, rdx
shr rax, 0x3f
sar rdx, 7
add rdx, rax
imul rax, rdx, 0x3e8
xor ecx, ecx
cmp rbx, rax
setg cl
add rcx, rdx
mov rbx, rcx
xor eax, eax
test rbx, rbx
setns al
neg eax
mov rcx, rbx
shr rcx, 0x20
cmovne ebx, eax
mov dword [rsp + 0x98], ebx
test ebx, ebx
je 0x1401f67ba
movaps xmm6, xmmword [0x1402e6d80]
lea rbx, [rsp + 0x60]
mov rax, qword [rdi + 0x10]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x14017aab5.0]
jmp 0x1401f6634
mov r15, rcx
mov dword [rsp + 0x98], 0xffffffff
jmp 0x1401f655c
mov rcx, qword [0x14033afc8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
xor ecx, ecx
cmp r12, rax
setns cl
add rcx, r14
sub r12, rax
cmovo r12, rcx
lea rax, [r14 + r12]
add rax, 2
cmp rax, 2
jb 0x1401f6606
mov rax, r12
movabs rcx, 0x20c49ba5e353f7cf
imul rcx
mov rax, rdx
shr rax, 0x3f
sar rdx, 7
add rdx, rax
imul rax, rdx, 0x3e8
xor ecx, ecx
cmp r12, rax
setg cl
add rcx, rdx
mov r12, rcx
xor eax, eax
test r12, r12
setns al
neg eax
mov rcx, r12
shr rcx, 0x20
cmovne r12d, eax
mov dword [rsp + 0x98], r12d
test r12d, r12d
je 0x1401f67ba
test ebp, ebp
je 0x1401f6568
lea rcx, [rsp + 0x98]
call fcn.1400b5b70
lea rcx, [rsp + 0x9c]
call fcn.1400b5b70
mov eax, dword [rsp + 0x9c]
mov r9d, dword [rdi + 0x90]
mov r8d, dword [rsp + 0x98]
mov dword [rsp + 0x20], eax
xor ecx, ecx
xor edx, edx
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
mov ebp, eax
test eax, eax
je 0x1401f66ee
mov r12, qword [rsi]
cmp r12, r14
je 0x1401f66de
mov qword [rsp + 0xa0], r15
mov rax, qword [fcn.1400c65b0]
lea rcx, [0x140038c30]
cmp rax, rcx
jne 0x1401f6981
mov qword [rsp + 0x60], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x1401f6591
imul rax, rax, 0xf4240
cqo
idiv qword [0x14033afc8]
jmp 0x1401f65b3
mov dword [rsp + 0x98], 0xffffffff
jmp 0x1401f662c
mov rax, qword [rdi + 0x10]
mov r12, qword [rax]
mov rax, qword [r12]
mov rax, qword [rax + 0x28]
mov rcx, r12
call qword [case.0x14017aab5.0]
mov rax, qword [r12]
mov rax, qword [rax + 0x20]
mov rcx, r12
call qword [case.0x14017aab5.0]
mov r13d, eax
test byte [0x140329f10], 0x19
jne 0x1401f699b
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
bt eax, 0x16
jb 0x1401f67a1
movaps xmmword [rsp + 0x80], xmm6
movaps xmmword [rsp + 0x70], xmm6
movaps xmmword [rsp + 0x60], xmm6
test byte [0x140329f10], 0x19
jne 0x1401f6862
mov dword [rsp + 0x20], 0
mov rcx, rbx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x1401f67a1
mov dword [rsp + 0x9c], 0
test r12, r12
je 0x1401f6678
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
mov rcx, r12
mov edx, r13d
call qword [case.0x14017aab5.0]
jmp 0x1401f6678
test r12, r12
je 0x1401f67ba
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
mov rcx, r12
mov edx, r13d
call qword [case.0x14017aab5.0]
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.14013d520
movaps xmm6, xmmword [rsp + 0xb0]
add rsp, 0xc8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [fcn.1400c65b0]
lea rcx, [0x140038c30]
cmp rax, rcx
jne 0x1401f6a9e
lea r12, [rsp + 0x60]
mov qword [r12], 0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [r12]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x1401f683b
imul rax, rax, 0xf4240
cqo
idiv qword [0x14033afc8]
jmp 0x1401f64e6
mov rcx, qword [0x14033afc8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401f64e6
mov rax, qword [0x14032a8e8]
lea rcx, [0x140038c30]
cmp rax, rcx
jne 0x1401f6ac8
lea rcx, [rsp + 0xa0]
mov qword [rcx], 0
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rax, [rsp + 0xa0]
mov rax, qword [rax]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x1401f68cc
mov rcx, qword [0x14033afc8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401f68dc
imul rax, rax, 0xf4240
cqo
idiv qword [0x14033afc8]
mov qword [rsp + 0xa0], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ecx, ecx
mov dword [rsp + 0x48], ecx
lea rcx, [rsp + 0xa0]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x40], 0
lea rdx, [0x140329f10]
lea r8, str.MessagePumpForUI::WaitForWork_PeekMessage
mov cl, 0x58
xor r9d, r9d
call fcn.140189ab0
mov qword [rsp + 0x58], rax
xor eax, eax
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x60]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
cmp byte [0x140329f10], 0
je 0x1401f6770
lea rcx, [0x140329f10]
lea rdx, str.MessagePumpForUI::WaitForWork_PeekMessage
mov r8, qword [rsp + 0x58]
mov dword [rsp + 0x58], eax
call fcn.14018add0
cmp dword [rsp + 0x58], 0
je 0x1401f6774
jmp 0x1401f67a1
lea r13, [rsp + 0xa0]
mov rcx, r13
call qword [case.0x14017aab5.0]
mov rax, qword [r13]
jmp 0x1401f65b3
mov rax, qword [0x14032a8e8]
lea rcx, [0x140038c30]
cmp rax, rcx
jne 0x1401f6ab8
lea rcx, [rsp + 0x60]
mov qword [rcx], 0
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rax, [rsp + 0x60]
mov rax, qword [rax]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x1401f69ff
mov rcx, qword [0x14033afc8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401f6a0f
imul rax, rax, 0xf4240
cqo
idiv qword [0x14033afc8]
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x140329f10]
lea r8, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov cl, 0x58
xor r9d, r9d
call fcn.140189ab0
mov qword [rsp + 0x58], rax
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
cmp byte [0x140329f10], 0
je 0x1401f6732
lea rcx, [0x140329f10]
lea rdx, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov r8, qword [rsp + 0x58]
mov dword [rsp + 0x58], eax
call fcn.14018add0
bt dword [rsp + 0x58], 0x16
jae 0x1401f6738
jmp 0x1401f67a1
lea r12, [rsp + 0xa0]
mov rcx, r12
call qword [case.0x14017aab5.0]
mov rax, qword [r12]
jmp 0x1401f64e6
lea rcx, [rsp + 0x60]
call qword [case.0x14017aab5.0]
jmp 0x1401f6a14
lea rcx, [rsp + 0xa0]
call qword [case.0x14017aab5.0]
jmp 0x1401f68e4