Function at 0x1400de280
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 [0x140297028]
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 0x1400de362
mov rsi, rdx
mov rax, qword [rdx + 8]
mov qword [rsp + 0x68], r14
test rax, rax
je 0x1400de9b7
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 0x1400de341
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 0x1400de36a
jmp 0x1400de71f
mov dword [rsp + 0x60], 0xffffffff
mov eax, dword [0x1402a76e4]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea r15, [rax + 0x190]
lea rcx, [0x14017a130]
movaps xmm6, xmmword [0x140268c70]
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 0x1400dea23
cmp byte [r12 + 0x128], 0
jne 0x1400dea3f
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 - 0xe8]
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x88], rax
add r12, 0xffffffffffffff20
mov rcx, r12
mov rdx, rbx
call fcn.1400dde60
mov rcx, rsi
call fcn.1400d8260
mov rcx, r13
call fcn.1400d8260
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 0x1400de74b
mov rax, qword [rdi + 0x10]
mov r12, qword [rax]
mov rax, qword [r12]
mov rax, qword [rax + 0x28]
lea rcx, [0x1400e1560]
cmp rax, rcx
jne 0x1400dea31
mov qword [rsp + 0x80], r14
movaps xmmword [rsp + 0x70], xmm6
mov rax, qword [r12 - 0xe8]
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x88], rax
cmp byte [r12 + 0x128], 0
je 0x1400de52c
cmp byte [r12 + 0x130], 0
je 0x1400de52c
mov r13, qword [r15]
test r13, r13
je 0x1400de52c
mov rax, qword [r13 + 0x10]
test rax, rax
js 0x1400de8a8
cmp dword [r13 + 0x24], 1
jne 0x1400deafb
mov rsi, rbx
cmp qword [r13 + 0x18], 0
jne 0x1400dec1b
mov rbx, r14
movabs rax, 0xbfffffffffffffff
lock and qword [r13 + 0x10], rax
mov r14, qword [r12 + 0x138]
cmp qword [r13 + 0x18], 0
jne 0x1400debee
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 - 0xe0]
mov rdx, rbx
call fcn.1400dd820
mov rax, qword [r12]
mov rax, qword [rax + 0x20]
lea rcx, [0x1400e0420]
cmp rax, rcx
jne 0x1400dea5a
mov r13, qword [r12 - 0x10]
sub r13, qword [r12 - 0x18]
shr r13, 6
test byte [0x14029a240], 0x19
jne 0x1400dea6b
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
bt eax, 0x16
jb 0x1400de5ff
movaps xmmword [rsp + 0x90], xmm6
movaps xmmword [rsp + 0x80], xmm6
movaps xmmword [rsp + 0x70], xmm6
test byte [0x14029a240], 0x19
jne 0x1400deb4e
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 0x1400de8ca
test r12, r12
je 0x1400de71f
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
lea rcx, [0x1400e1750]
cmp rax, rcx
jne 0x1400de8b9
mov qword [rsp + 0x80], r14
movaps xmmword [rsp + 0x70], xmm6
mov rax, qword [r12 - 0xe8]
mov byte [rsp + 0x70], 0
mov qword [rsp + 0x88], rax
cmp byte [r12 + 0x128], 0
je 0x1400de6cc
cmp byte [r12 + 0x130], 0
je 0x1400de6cc
mov rsi, qword [r15]
test rsi, rsi
je 0x1400de6cc
mov rax, qword [rsi + 0x10]
test rax, rax
js 0x1400de897
cmp dword [rsi + 0x24], 1
jne 0x1400de8f4
cmp qword [rsi + 0x18], 0
jne 0x1400de91e
movabs rax, 0xbfffffffffffffff
lock and qword [rsi + 0x10], rax
mov rdi, qword [r12 + 0x138]
cmp qword [rsi + 0x18], 0
jne 0x1400de944
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, 0xffffffffffffff20
lea rdx, [rsp + 0x70]
mov rcx, r12
mov r8d, r13d
call fcn.1400dd2e0
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1401830b0
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 0x1400de83a
mov qword [rsp + 0x68], r14
mov rax, qword [fcn.1401038f0]
lea rcx, [0x14017e8a0]
cmp rax, rcx
movabs r13, 0x20c49ba5e353f7cf
jne 0x1400de86c
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 0x1400de990
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402ac9c8]
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 0x1400de811
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 0x1400de847
jmp 0x1400de71f
mov dword [rsp + 0x60], 0xffffffff
lea rbx, [rsp + 0x70]
test ebp, ebp
lea rcx, [0x14017a130]
lea rsi, [rsp + 0x60]
lea r13, [rsp + 0x64]
mov rbp, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
je 0x1400de3a8
jmp 0x1400de418
lea r13, [rsp + 0x68]
mov rcx, r13
call qword [case.0x1401e9be0.0]
mov rax, qword [r13]
movabs r13, 0x20c49ba5e353f7cf
movabs rbx, 0x7fffffffffffffff
jmp 0x1400de7c8
mov rcx, qword [0x1402b01c0]
call fcn.1401bcd60
jmp 0x1400de66d
mov rcx, qword [0x1402b01c0]
call fcn.1401bcd60
jmp 0x1400de4bf
mov rcx, r12
mov edx, r13d
call qword [case.0x1401e9be0.0]
jmp 0x1400de71f
mov dword [rsp + 0x64], 0
test r12, r12
je 0x1400de74b
mov rax, qword [r12]
mov rax, qword [rax + 0x30]
mov rcx, r12
mov edx, r13d
call qword [case.0x1401e9be0.0]
jmp 0x1400de74b
cmp byte [r12 + 0x140], 0
je 0x1400de691
cmp qword [rsi + 0x18], 0
jne 0x1400de96a
movabs rax, 0x4000000000000000
lock or qword [rsi + 0x10], rax
jmp 0x1400de691
lea rcx, [rsi + 0x18]
mov rdi, qword [rsi + 0x10]
call fcn.1401bcdb0
movabs rcx, 0xff00000000000000
and rcx, rdi
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400de682
lea rcx, [rsi + 0x18]
mov rbx, qword [rsi + 0x10]
call fcn.1401bcdb0
movabs rcx, 0xff00000000000000
and rcx, rbx
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400de6a4
lea rcx, [rsi + 0x18]
mov rdi, qword [rsi + 0x10]
call fcn.1401bcdb0
movabs rcx, 0xff00000000000000
and rcx, rdi
or rcx, rax
mov qword [rsi + 0x10], rcx
jmp 0x1400de90a
mov rcx, qword [0x1402ac9c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400de7c8
mov rax, qword [fcn.1401038f0]
lea rcx, [0x14017e8a0]
cmp rax, rcx
jne 0x1400dea0c
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 0x1400dec47
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402ac9c8]
jmp 0x1400de2f8
lea r12, [rsp + 0x68]
mov rcx, r12
call qword [case.0x1401e9be0.0]
mov rax, qword [r12]
jmp 0x1400de2f8
mov rcx, r12
call qword [case.0x1401e9be0.0]
jmp 0x1400de418
mov rcx, r12
call qword [case.0x1401e9be0.0]
jmp 0x1400de578
lea rcx, [r12 + 0x130]
call fcn.14015b040
mov byte [r12 + 0x128], 0
jmp 0x1400de3cf
mov rcx, r12
call qword [case.0x1401e9be0.0]
mov r13d, eax
jmp 0x1400de59e
mov rcx, rbx
call fcn.1401038f0
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, [0x14029a240]
lea r8, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov cl, 0x58
xor r9d, r9d
call fcn.140131640
mov rbx, rax
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov dword [rsp + 0x50], eax
cmp byte [0x14029a240], 0
je 0x1400deae7
lea rcx, [0x14029a240]
lea rdx, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov r8, rbx
call fcn.140149db0
bt dword [rsp + 0x50], 0x16
mov rbx, rsi
jae 0x1400de5bc
jmp 0x1400de5ff
mov rsi, rbx
mov rbx, r14
cmp byte [r12 + 0x140], 0
je 0x1400de4ea
cmp qword [r13 + 0x18], 0
jne 0x1400deb2b
movabs rax, 0x4000000000000000
lock or qword [r13 + 0x10], rax
jmp 0x1400de4ea
lea rcx, [r13 + 0x18]
mov r14, qword [r13 + 0x10]
call fcn.1401bcdb0
movabs rcx, 0xff00000000000000
and rcx, r14
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400deb17
lea rsi, [rsp + 0x68]
mov rcx, rsi
call fcn.1401038f0
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, [0x14029a240]
lea r8, str.MessagePumpForUI::WaitForWork_PeekMessage
mov cl, 0x58
xor r9d, r9d
call fcn.140131640
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 [0x14029a240], 0
je 0x1400debd7
lea rcx, [0x14029a240]
lea rdx, str.MessagePumpForUI::WaitForWork_PeekMessage
mov r8, rsi
call fcn.140149db0
test ebx, ebx
movabs r14, 0xaaaaaaaaaaaaaaaa
jne 0x1400de5ff
jmp 0x1400de8ca
lea rcx, [r13 + 0x18]
mov rax, qword [r13 + 0x10]
mov qword [rsp + 0x50], rax
call fcn.1401bcdb0
movabs rcx, 0xff00000000000000
and rcx, qword [rsp + 0x50]
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400de4fd
lea rcx, [r13 + 0x18]
mov rbx, r14
mov r14, qword [r13 + 0x10]
call fcn.1401bcdb0
movabs rcx, 0xff00000000000000
and rcx, r14
mov r14, rbx
or rcx, rax
mov qword [r13 + 0x10], rcx
jmp 0x1400de4d8
mov rcx, qword [0x1402ac9c8]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400de2f8