Function at 0x1400e4360
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 rdi, rcx
mov rax, qword [0x14029c028]
xor rax, rsp
mov qword [rsp + 0xa8], rax
movabs r15, 0x7fffffffffffffff
mov dword [rsp + 0x64], 4
mov rbx, qword [rdx]
movabs r14, 0xaaaaaaaaaaaaaaaa
movabs r13, 0x20c49ba5e353f7cf
cmp rbx, r15
mov qword [rsp + 0x58], rdx
je 0x1400e4442
mov rsi, rdx
mov rax, qword [rdx + 8]
mov qword [rsp + 0x68], r14
test rax, rax
je 0x1400e4a97
xor ecx, ecx
cmp rbx, rax
setns cl
add rcx, r15
sub rbx, rax
cmovo rbx, rcx
lea rax, [r15 + rbx]
add rax, 2
cmp rax, 2
jb 0x1400e4421
mov rax, rbx
imul r13
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 + 0x60], ebx
test ebx, ebx
jne 0x1400e444a
jmp 0x1400e47ff
mov dword [rsp + 0x60], 0xffffffff
mov eax, dword [0x1402ac5e0]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r15, [rax + 0x190]
lea rcx, [0x14017dbb0]
movaps xmm6, xmmword [0x14026dc70]
lea rbx, [rsp + 0x70]
lea rsi, [rsp + 0x60]
lea r13, [rsp + 0x64]
mov rbp, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
mov rax, qword [rdi + 0x10]
mov r12, qword [rax]
mov rax, qword [r12]
mov rax, qword [rax + 0x18]
cmp rax, rcx
jne 0x1400e4b03
cmp byte [r12 + 0x128], 0
jne 0x1400e4b1f
mov rax, qword [r12 + 0xf0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
mov qword [rsp + 0x80], r14
movaps xmmword [rsp + 0x70], xmm6
mov rax, qword [r12 - 0xc8]
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x88], rax
add r12, 0xffffffffffffff40
mov rcx, r12
mov rdx, rbx
call fcn.1400e4030
mov rcx, rsi
call fcn.1400ddc50
mov rcx, r13
call fcn.1400ddc50
mov eax, dword [rsp + 0x64]
mov r8d, dword [rsp + 0x60]
mov dword [rsp + 0x20], eax
xor ecx, ecx
xor edx, edx
mov r9d, 0x1cff
call rbp
mov ebp, eax
test eax, eax
jne 0x1400e482b
mov rax, qword [rdi + 0x10]
mov r12, qword [rax]
mov rax, qword [r12]
mov rax, qword [rax + 0x28]
lea rcx, [0x1400e7650]
cmp rax, rcx
jne 0x1400e4b11
mov qword [rsp + 0x80], r14
movaps xmmword [rsp + 0x70], xmm6
mov rax, qword [r12 - 0xc8]
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x88], rax
cmp byte [r12 + 0x128], 0
je 0x1400e460c
cmp byte [r12 + 0x130], 0
je 0x1400e460c
mov r13, qword [r15]
test r13, r13
je 0x1400e460c
mov rax, qword [r13 + 0x10]
test rax, rax
js 0x1400e4988
cmp dword [r13 + 0x24], 1
jne 0x1400e4bdb
mov rsi, rbx
cmp qword [r13 + 0x18], 0
jne 0x1400e4cfb
mov rbx, r14
movabs rax, 0xbfffffffffffffff
lock and qword [r13 + 0x10], rax
mov r14, qword [r12 + 0x138]
cmp qword [r13 + 0x18], 0
jne 0x1400e4cce
mov rax, qword [r13 + 0x10]
movabs rcx, 0x4000000000000000
and rax, rcx
movabs rcx, 0xffffffffffffff
and r14, rcx
or r14, rax
mov qword [r13 + 0x10], r14
dec dword [r13 + 0x24]
mov r14, rbx
mov rbx, rsi
mov qword [r12 + 0x138], 0
xor eax, eax
mov byte [r12 + 0x140], al
mov byte [r12 + 0x130], al
mov byte [r12 + 0x128], 1
mov rax, qword [r12 + 0xf0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
lea rcx, [r12 - 0xc0]
mov rdx, rbx
call fcn.1400e3b80
mov rax, qword [r12]
mov rax, qword [rax + 0x20]
lea rcx, [0x1400e6520]
cmp rax, rcx
jne 0x1400e4b3a
mov r13, qword [r12 - 0x10]
sub r13, qword [r12 - 0x18]
shr r13, 6
test byte [0x1402ab3a0], 0x19
jne 0x1400e4b4b
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
bt eax, 0x16
jb 0x1400e46df
movaps xmmword [rsp + 0x90], xmm6
movaps xmmword [rsp + 0x80], xmm6
movaps xmmword [rsp + 0x70], xmm6
test byte [0x1402ab3a0], 0x19
jne 0x1400e4c2e
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
je 0x1400e49aa
test r12, r12
je 0x1400e47ff
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
lea rcx, [0x1400e7840]
cmp rax, rcx
jne 0x1400e4999
mov qword [rsp + 0x80], r14
movaps xmmword [rsp + 0x70], xmm6
mov rax, qword [r12 - 0xc8]
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x88], rax
cmp byte [r12 + 0x128], 0
je 0x1400e47ac
cmp byte [r12 + 0x130], 0
je 0x1400e47ac
mov rsi, qword [r15]
test rsi, rsi
je 0x1400e47ac
mov rax, qword [rsi + 0x10]
test rax, rax
js 0x1400e494c
cmp dword [rsi + 0x24], 1
jne 0x1400e49d4
cmp qword [rsi + 0x18], 0
jne 0x1400e49fe
movabs rax, 0xbfffffffffffffff
lock and qword [rsi + 0x10], rax
mov rdi, qword [r12 + 0x138]
cmp qword [rsi + 0x18], 0
jne 0x1400e4a24
mov rax, qword [rsi + 0x10]
movabs rcx, 0x4000000000000000
and rax, rcx
movabs rcx, 0xffffffffffffff
and rdi, rcx
or rdi, rax
mov qword [rsi + 0x10], rdi
dec dword [rsi + 0x24]
mov qword [r12 + 0x138], 0
xor eax, eax
mov byte [r12 + 0x140], al
mov byte [r12 + 0x130], al
mov byte [r12 + 0x128], 1
mov rax, qword [r12 + 0xf0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
add r12, 0xffffffffffffff40
lea rdx, [rsp + 0x70]
mov rcx, r12
mov r8d, r13d
call fcn.1400e37e0
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1401879f0
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 [rsp + 0x58]
mov r12, qword [rax]
movabs rbx, 0x7fffffffffffffff
cmp r12, rbx
je 0x1400e491a
mov qword [rsp + 0x68], r14
mov rax, qword [fcn.14014f070]
lea rcx, [0x140183600]
cmp rax, rcx
movabs r13, 0x20c49ba5e353f7cf
jne 0x1400e495d
mov qword [rsp + 0x70], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x70]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x1400e4a70
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b7458]
xor ecx, ecx
cmp r12, rax
setns cl
add rcx, rbx
sub r12, rax
cmovo r12, rcx
lea rax, [rbx + r12]
add rax, 2
cmp rax, 2
jb 0x1400e48f1
mov rax, r12
imul r13
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
lea rbx, [rsp + 0x70]
xor eax, eax
test r12, r12
setns al
neg eax
mov rcx, r12
shr rcx, 0x20
cmovne r12d, eax
mov dword [rsp + 0x60], r12d
test r12d, r12d
jne 0x1400e4927
jmp 0x1400e47ff
mov dword [rsp + 0x60], 0xffffffff
lea rbx, [rsp + 0x70]
test ebp, ebp
lea rcx, [0x14017dbb0]
lea rsi, [rsp + 0x60]
lea r13, [rsp + 0x64]
mov rbp, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
je 0x1400e4488
jmp 0x1400e44f8
mov rcx, qword [0x1402b7790]
call fcn.1401c26a0
jmp 0x1400e474d
lea r13, [rsp + 0x68]
mov rcx, r13
call qword [0x1402ca008]
mov rax, qword [r13]
movabs r13, 0x20c49ba5e353f7cf
movabs rbx, 0x7fffffffffffffff
jmp 0x1400e48a8
mov rcx, qword [0x1402b7790]
call fcn.1401c26a0
jmp 0x1400e459f
mov rcx, r12
mov edx, r13d
call qword [0x1402ca008]
jmp 0x1400e47ff
mov dword [rsp + 0x64], 0
test r12, r12
je 0x1400e482b
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
mov rcx, r12
mov edx, r13d
call qword [0x1402ca008]
jmp 0x1400e482b
cmp byte [r12 + 0x140], 0
je 0x1400e4771
cmp qword [rsi + 0x18], 0
jne 0x1400e4a4a
movabs rax, 0x4000000000000000
lock or qword [rsi + 0x10], rax
jmp 0x1400e4771
lea rcx, [rsi + 0x18]
mov rdi, qword [rsi + 0x10]
call fcn.1401c26f0
movabs rcx, 0xff00000000000000
and rcx, rdi
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400e4762
lea rcx, [rsi + 0x18]
mov rbx, qword [rsi + 0x10]
call fcn.1401c26f0
movabs rcx, 0xff00000000000000
and rcx, rbx
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400e4784
lea rcx, [rsi + 0x18]
mov rdi, qword [rsi + 0x10]
call fcn.1401c26f0
movabs rcx, 0xff00000000000000
and rcx, rdi
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400e49ea
mov rcx, qword [0x1402b7458]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400e48a8
mov rax, qword [fcn.14014f070]
lea rcx, [0x140183600]
cmp rax, rcx
jne 0x1400e4aec
lea r12, [rsp + 0x70]
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 0x1400e4d27
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b7458]
jmp 0x1400e43d8
lea r12, [rsp + 0x68]
mov rcx, r12
call qword [0x1402ca008]
mov rax, qword [r12]
jmp 0x1400e43d8
mov rcx, r12
call qword [0x1402ca008]
jmp 0x1400e44f8
mov rcx, r12
call qword [0x1402ca008]
jmp 0x1400e4658
lea rcx, [r12 + 0x130]
call fcn.140164220
mov byte [r12 + 0x128], 0
jmp 0x1400e44af
mov rcx, r12
call qword [0x1402ca008]
mov r13d, eax
jmp 0x1400e467e
mov rcx, rbx
call fcn.14014f070
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rsi, rbx
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, [0x1402ab3a0]
lea r8, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov cl, 0x58
xor r9d, r9d
call fcn.14013bad0
mov rbx, rax
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov dword [rsp + 0x50], eax
cmp byte [0x1402ab3a0], 0
je 0x1400e4bc7
lea rcx, [0x1402ab3a0]
lea rdx, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov r8, rbx
call fcn.140153530
bt dword [rsp + 0x50], 0x16
mov rbx, rsi
jae 0x1400e469c
jmp 0x1400e46df
mov rsi, rbx
mov rbx, r14
cmp byte [r12 + 0x140], 0
je 0x1400e45ca
cmp qword [r13 + 0x18], 0
jne 0x1400e4c0b
movabs rax, 0x4000000000000000
lock or qword [r13 + 0x10], rax
jmp 0x1400e45ca
lea rcx, [r13 + 0x18]
mov r14, qword [r13 + 0x10]
call fcn.1401c26f0
movabs rcx, 0xff00000000000000
and rcx, r14
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400e4bf7
lea rsi, [rsp + 0x68]
mov rcx, rsi
call fcn.14014f070
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r14d, r14d
mov dword [rsp + 0x48], r14d
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x30], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x40], 0
lea rdx, [0x1402ab3a0]
lea r8, str.MessagePumpForUI::WaitForWork_PeekMessage
mov cl, 0x58
xor r9d, r9d
call fcn.14013bad0
mov rsi, rax
mov dword [rsp + 0x20], r14d
lea rcx, [rsp + 0x70]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
mov ebx, eax
cmp byte [0x1402ab3a0], 0
je 0x1400e4cb7
lea rcx, [0x1402ab3a0]
lea rdx, str.MessagePumpForUI::WaitForWork_PeekMessage
mov r8, rsi
call fcn.140153530
test ebx, ebx
movabs r14, 0xaaaaaaaaaaaaaaaa
jne 0x1400e46df
jmp 0x1400e49aa
lea rcx, [r13 + 0x18]
mov rax, qword [r13 + 0x10]
mov qword [rsp + 0x50], rax
call fcn.1401c26f0
movabs rcx, 0xff00000000000000
and rcx, qword [rsp + 0x50]
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400e45dd
lea rcx, [r13 + 0x18]
mov rbx, r14
mov r14, qword [r13 + 0x10]
call fcn.1401c26f0
movabs rcx, 0xff00000000000000
and rcx, r14
mov r14, rbx
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400e45b8
mov rcx, qword [0x1402b7458]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400e43d8