Function at 0x1400e2b40
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 [0x14029b028]
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 0x1400e2c22
mov rsi, rdx
mov rax, qword [rdx + 8]
mov qword [rsp + 0x68], r14
test rax, rax
je 0x1400e3277
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 0x1400e2c01
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 0x1400e2c2a
jmp 0x1400e2fdf
mov dword [rsp + 0x60], 0xffffffff
mov eax, dword [0x1402ab5e0]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r15, [rax + 0x190]
lea rcx, [0x14017c270]
movaps xmm6, xmmword [0x14026cc70]
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 0x1400e32e3
cmp byte [r12 + 0x128], 0
jne 0x1400e32ff
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.1400e2810
mov rcx, rsi
call fcn.1400dc900
mov rcx, r13
call fcn.1400dc900
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 0x1400e300b
mov rax, qword [rdi + 0x10]
mov r12, qword [rax]
mov rax, qword [r12]
mov rax, qword [rax + 0x28]
lea rcx, [0x1400e5e40]
cmp rax, rcx
jne 0x1400e32f1
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 0x1400e2dec
cmp byte [r12 + 0x130], 0
je 0x1400e2dec
mov r13, qword [r15]
test r13, r13
je 0x1400e2dec
mov rax, qword [r13 + 0x10]
test rax, rax
js 0x1400e3168
cmp dword [r13 + 0x24], 1
jne 0x1400e33bb
mov rsi, rbx
cmp qword [r13 + 0x18], 0
jne 0x1400e34db
mov rbx, r14
movabs rax, 0xbfffffffffffffff
lock and qword [r13 + 0x10], rax
mov r14, qword [r12 + 0x138]
cmp qword [r13 + 0x18], 0
jne 0x1400e34ae
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.1400e2360
mov rax, qword [r12]
mov rax, qword [rax + 0x20]
lea rcx, [0x1400e4d10]
cmp rax, rcx
jne 0x1400e331a
mov r13, qword [r12 - 0x10]
sub r13, qword [r12 - 0x18]
shr r13, 6
test byte [0x1402aa3a0], 0x19
jne 0x1400e332b
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
bt eax, 0x16
jb 0x1400e2ebf
movaps xmmword [rsp + 0x90], xmm6
movaps xmmword [rsp + 0x80], xmm6
movaps xmmword [rsp + 0x70], xmm6
test byte [0x1402aa3a0], 0x19
jne 0x1400e340e
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 0x1400e318a
test r12, r12
je 0x1400e2fdf
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
lea rcx, [0x1400e6030]
cmp rax, rcx
jne 0x1400e3179
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 0x1400e2f8c
cmp byte [r12 + 0x130], 0
je 0x1400e2f8c
mov rsi, qword [r15]
test rsi, rsi
je 0x1400e2f8c
mov rax, qword [rsi + 0x10]
test rax, rax
js 0x1400e3157
cmp dword [rsi + 0x24], 1
jne 0x1400e31b4
cmp qword [rsi + 0x18], 0
jne 0x1400e3204
movabs rax, 0xbfffffffffffffff
lock and qword [rsi + 0x10], rax
mov rdi, qword [r12 + 0x138]
cmp qword [rsi + 0x18], 0
jne 0x1400e31de
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.1400e1fc0
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.140186020
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 0x1400e30fa
mov qword [rsp + 0x68], r14
mov rax, qword [fcn.140106270]
lea rcx, [0x140181ca0]
cmp rax, rcx
movabs r13, 0x20c49ba5e353f7cf
jne 0x1400e312c
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 0x1400e3250
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b6458]
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 0x1400e30d1
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 0x1400e3107
jmp 0x1400e2fdf
mov dword [rsp + 0x60], 0xffffffff
lea rbx, [rsp + 0x70]
test ebp, ebp
lea rcx, [0x14017c270]
lea rsi, [rsp + 0x60]
lea r13, [rsp + 0x64]
mov rbp, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
je 0x1400e2c68
jmp 0x1400e2cd8
lea r13, [rsp + 0x68]
mov rcx, r13
call qword [0x1402c9008]
mov rax, qword [r13]
movabs r13, 0x20c49ba5e353f7cf
movabs rbx, 0x7fffffffffffffff
jmp 0x1400e3088
mov rcx, qword [0x1402b6790]
call fcn.1401c0cd0
jmp 0x1400e2f2d
mov rcx, qword [0x1402b6790]
call fcn.1401c0cd0
jmp 0x1400e2d7f
mov rcx, r12
mov edx, r13d
call qword [0x1402c9008]
jmp 0x1400e2fdf
mov dword [rsp + 0x64], 0
test r12, r12
je 0x1400e300b
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
mov rcx, r12
mov edx, r13d
call qword [0x1402c9008]
jmp 0x1400e300b
cmp byte [r12 + 0x140], 0
je 0x1400e2f51
cmp qword [rsi + 0x18], 0
jne 0x1400e322a
movabs rax, 0x4000000000000000
lock or qword [rsi + 0x10], rax
jmp 0x1400e2f51
lea rcx, [rsi + 0x18]
mov rbx, qword [rsi + 0x10]
call fcn.1401c0d20
movabs rcx, 0xff00000000000000
and rcx, rbx
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400e2f64
lea rcx, [rsi + 0x18]
mov rdi, qword [rsi + 0x10]
call fcn.1401c0d20
movabs rcx, 0xff00000000000000
and rcx, rdi
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400e2f42
lea rcx, [rsi + 0x18]
mov rdi, qword [rsi + 0x10]
call fcn.1401c0d20
movabs rcx, 0xff00000000000000
and rcx, rdi
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400e31ca
mov rcx, qword [0x1402b6458]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400e3088
mov rax, qword [fcn.140106270]
lea rcx, [0x140181ca0]
cmp rax, rcx
jne 0x1400e32cc
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 0x1400e3507
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402b6458]
jmp 0x1400e2bb8
lea r12, [rsp + 0x68]
mov rcx, r12
call qword [0x1402c9008]
mov rax, qword [r12]
jmp 0x1400e2bb8
mov rcx, r12
call qword [0x1402c9008]
jmp 0x1400e2cd8
mov rcx, r12
call qword [0x1402c9008]
jmp 0x1400e2e38
lea rcx, [r12 + 0x130]
call fcn.140163a40
mov byte [r12 + 0x128], 0
jmp 0x1400e2c8f
mov rcx, r12
call qword [0x1402c9008]
mov r13d, eax
jmp 0x1400e2e5e
mov rcx, rbx
call fcn.140106270
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, [0x1402aa3a0]
lea r8, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov cl, 0x58
xor r9d, r9d
call fcn.14013ac20
mov rbx, rax
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov dword [rsp + 0x50], eax
cmp byte [0x1402aa3a0], 0
je 0x1400e33a7
lea rcx, [0x1402aa3a0]
lea rdx, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov r8, rbx
call fcn.14014f640
bt dword [rsp + 0x50], 0x16
mov rbx, rsi
jae 0x1400e2e7c
jmp 0x1400e2ebf
mov rsi, rbx
mov rbx, r14
cmp byte [r12 + 0x140], 0
je 0x1400e2daa
cmp qword [r13 + 0x18], 0
jne 0x1400e33eb
movabs rax, 0x4000000000000000
lock or qword [r13 + 0x10], rax
jmp 0x1400e2daa
lea rcx, [r13 + 0x18]
mov r14, qword [r13 + 0x10]
call fcn.1401c0d20
movabs rcx, 0xff00000000000000
and rcx, r14
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400e33d7
lea rsi, [rsp + 0x68]
mov rcx, rsi
call fcn.140106270
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, [0x1402aa3a0]
lea r8, str.MessagePumpForUI::WaitForWork_PeekMessage
mov cl, 0x58
xor r9d, r9d
call fcn.14013ac20
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 [0x1402aa3a0], 0
je 0x1400e3497
lea rcx, [0x1402aa3a0]
lea rdx, str.MessagePumpForUI::WaitForWork_PeekMessage
mov r8, rsi
call fcn.14014f640
test ebx, ebx
movabs r14, 0xaaaaaaaaaaaaaaaa
jne 0x1400e2ebf
jmp 0x1400e318a
lea rcx, [r13 + 0x18]
mov rax, qword [r13 + 0x10]
mov qword [rsp + 0x50], rax
call fcn.1401c0d20
movabs rcx, 0xff00000000000000
and rcx, qword [rsp + 0x50]
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400e2dbd
lea rcx, [r13 + 0x18]
mov rbx, r14
mov r14, qword [r13 + 0x10]
call fcn.1401c0d20
movabs rcx, 0xff00000000000000
and rcx, r14
mov r14, rbx
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400e2d98
mov rcx, qword [0x1402b6458]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400e2bb8