Function at 0x1400830e0
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, 0xd8
movaps xmmword [rsp + 0xc0], xmm7
movaps xmmword [rsp + 0xb0], xmm6
mov qword [rsp + 0x50], rcx
mov rax, qword [0x14028f028]
xor rax, rsp
mov qword [rsp + 0xa8], rax
movabs r15, 0xaaaaaaaaaaaaaaaa
movabs rsi, 0x7fffffffffffffff
mov dword [rsp + 0x9c], 4
mov dword [rsp + 0x98], 0xaaaaaaaa
mov rbx, qword [rdx]
movabs rbp, 0x20c49ba5e353f7cf
cmp rbx, rsi
mov qword [rsp + 0x58], rdx
je 0x1400833af
mov rax, qword [rdx + 8]
mov qword [rsp + 0x60], r15
test rax, rax
je 0x140083581
sub rbx, rax
lea rax, [rsi + rbx]
add rax, 2
cmp rax, 2
jb 0x1400831ab
mov rax, rbx
imul rbp
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
mov rax, rbx
sar rax, 0x3f
not eax
mov rcx, rbx
shr rcx, 0x20
cmovne ebx, eax
mov dword [rsp + 0x98], ebx
test ebx, ebx
je 0x14008337b
lea r13, [0x1400c85e0]
mov r12d, 1
xorps xmm6, xmm6
lea rbx, [rsp + 0x98]
lea rdi, [rsp + 0x9c]
mov r14, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
movaps xmm7, xmmword [0x140257270]
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x10]
mov rbp, qword [rax]
mov rax, qword [rbp]
mov rax, qword [rax + 0x18]
cmp rax, r13
jne 0x1400835b1
mov rax, qword [rbp + 0x118]
mov ecx, dword [rax]
inc ecx
cmove ecx, r12d
mov dword [rax], ecx
cmp byte [rbp + 0x148], 0
jne 0x1400835bb
mov rax, qword [rbp + 0xa8]
cmp qword [rbp + 0xa0], rax
je 0x14008326a
mov ecx, dword [rax - 4]
cmp ecx, 2
je 0x1400835d3
mov dword [rax - 4], 0
test ecx, ecx
je 0x14008326a
test byte [0x140291180], 0x19
jne 0x1400833bf
mov rcx, rbx
call fcn.140078fa0
mov rcx, rdi
call fcn.140078fa0
mov eax, dword [rsp + 0x9c]
mov r8d, dword [rsp + 0x98]
mov dword [rsp + 0x20], eax
xor ecx, ecx
xor edx, edx
mov r9d, 0x1cff
call r14
test eax, eax
jne 0x140083779
mov rax, qword [rsp + 0x50]
mov rax, qword [rax + 0x10]
mov r14, qword [rax]
mov rax, qword [r14]
mov rax, qword [rax + 0x20]
lea rcx, [0x140084570]
cmp rax, rcx
jne 0x1400835f2
mov rax, qword [r14 + 0x118]
mov ecx, dword [rax]
inc ecx
cmove ecx, r12d
mov dword [rax], ecx
mov rax, qword [r14 + 0xa8]
cmp qword [r14 + 0xa0], rax
lea rbp, [rsp + 0x60]
je 0x14008330f
mov ecx, dword [rax - 4]
cmp ecx, 2
je 0x140083601
mov dword [rax - 4], 2
test ecx, ecx
jne 0x14008330f
test byte [0x140291180], 0x19
jne 0x140083424
test byte [0x140291c00], 0x19
jne 0x14008361d
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
bt eax, 0x16
jb 0x14008336d
movaps xmmword [rsp + 0x80], xmm7
movaps xmmword [rsp + 0x70], xmm7
movaps xmmword [rsp + 0x60], xmm7
test byte [0x140291c00], 0x19
jne 0x1400836b8
mov dword [rsp + 0x20], 0
mov rcx, rbp
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x140083760
test r14, r14
je 0x14008337b
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1400ccfe0
movaps xmm6, xmmword [rsp + 0xb0]
movaps xmm7, xmmword [rsp + 0xc0]
add rsp, 0xd8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x98], 0xffffffff
jmp 0x1400831cd
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov r14d, eax
mov qword [rsp + 0xa0], r15
mov rax, qword [0x1402910e8]
lea rcx, [0x14005a590]
cmp rax, rcx
jne 0x140083596
mov qword [rsp + 0x60], 0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x14008348a
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402979e0]
jmp 0x1400834ac
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
mov qword [rsp + 0xa0], r15
mov rax, qword [0x1402910e8]
lea rcx, [0x14005a590]
cmp rax, rcx
jne 0x1400835a5
mov qword [rsp + 0x60], 0
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rsp + 0x60]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x140083508
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402979e0]
jmp 0x14008352f
mov rcx, qword [0x1402979e0]
cqo
idiv rcx
imul rbx, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbx
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], r14d
movups xmmword [rsp + 0x20], xmm6
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov cl, 0x45
lea rdx, [0x140291180]
lea r8, str.ThreadController_active
xor r9d, r9d
call fcn.14006a790
lea rbx, [rsp + 0x98]
mov r14, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
jmp 0x14008326a
mov rcx, qword [0x1402979e0]
cqo
idiv rcx
imul rbx, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, rbx
lea rbp, [rsp + 0x60]
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], edi
movups xmmword [rsp + 0x20], xmm6
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
mov cl, 0x42
lea rdx, [0x140291180]
lea r8, str.ThreadController_active
xor r9d, r9d
call fcn.14006a790
mov r12d, 1
jmp 0x14008330f
lea r14, [rsp + 0x60]
mov rcx, r14
call fcn.14008f730
mov rax, qword [r14]
jmp 0x140083171
lea rcx, [rsp + 0xa0]
call rax
jmp 0x1400834b4
lea rcx, [rsp + 0xa0]
call rax
jmp 0x140083537
mov rcx, rbp
call rax
jmp 0x14008326a
lea rcx, [rbp + 0x150]
call fcn.140084870
mov byte [rbp + 0x148], 0
jmp 0x140083236
add rbp, 0xa0
lea rdx, [rsp + 0x60]
mov dword [rdx], 0
mov rcx, rbp
call fcn.1401af9a0
jmp 0x14008326a
mov rcx, r14
call rax
lea rbp, [rsp + 0x60]
jmp 0x14008330f
lea rcx, [r14 + 0xa0]
lea rdx, [rsp + 0x60]
mov dword [rdx], 2
call fcn.1401af9a0
jmp 0x14008330f
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rdi, rbp
mov ebp, eax
mov qword [rsp + 0x60], r15
mov rcx, rdi
call fcn.14007b660
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], ebp
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
lea rdx, [0x140291c00]
lea r8, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov cl, 0x58
xor r9d, r9d
call fcn.14006a790
mov rdi, rax
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov ebp, eax
cmp byte [0x140291c00], 0
je 0x14008369e
lea rcx, [0x140291c00]
lea rdx, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov r8, rdi
call fcn.140079550
bt ebp, 0x16
mov r12d, 1
lea rbp, [rsp + 0x60]
jae 0x14008332d
jmp 0x14008336d
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
mov qword [rsp + 0xa0], r15
lea rdi, [rsp + 0xa0]
mov rcx, rdi
call fcn.14007b660
xor ebx, ebx
mov dword [rsp + 0x48], ebx
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], ebp
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x40], 0
lea rdx, [0x140291c00]
lea r8, str.MessagePumpForUI::WaitForWork_PeekMessage
mov cl, 0x58
xor r9d, r9d
call fcn.14006a790
mov rdi, rax
mov dword [rsp + 0x20], ebx
lea rcx, [rsp + 0x60]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
mov ebp, eax
cmp byte [0x140291c00], 0
je 0x14008374b
lea rcx, [0x140291c00]
lea rdx, str.MessagePumpForUI::WaitForWork_PeekMessage
mov r8, rdi
call fcn.140079550
test ebp, ebp
lea r13, [0x1400c85e0]
mov r12d, 1
jne 0x14008336d
mov dword [rsp + 0x9c], 0
test r14, r14
je 0x140083779
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x28]
mov rax, qword [rsp + 0x58]
mov rbp, qword [rax]
cmp rbp, rsi
je 0x140083820
mov qword [rsp + 0x60], r15
lea rcx, [rsp + 0x60]
call fcn.14008f730
sub rbp, qword [rsp + 0x60]
lea rax, [rsi + rbp]
add rax, 2
cmp rax, 2
movabs rcx, 0x20c49ba5e353f7cf
jb 0x1400837df
mov rax, rbp
imul rcx
mov rax, rdx
shr rax, 0x3f
sar rdx, 7
add rdx, rax
imul rax, rdx, 0x3e8
xor ecx, ecx
cmp rbp, rax
setg cl
add rcx, rdx
mov rbp, rcx
mov rcx, rbp
shr rcx, 0x20
mov rax, rbp
sar rax, 0x3f
test rcx, rcx
not eax
cmove eax, ebp
lea rbx, [rsp + 0x98]
lea rdi, [rsp + 0x9c]
mov r14, qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
mov dword [rsp + 0x98], eax
test eax, eax
jne 0x1400831fb
jmp 0x14008337b
mov eax, 0xffffffff
jmp 0x1400837f5