Function at 0x1401c87b0
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, 0xa8
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x1402e0038]
xor rax, rsp
mov qword [rsp + 0xa0], rax
movabs rcx, 0xaaaaaaaaaaaaaaaa
movabs r12, 0x7fffffffffffffff
mov dword [rsp + 0x94], 4
mov rbx, qword [rdx]
movabs r13, 0x20c49ba5e353f7cf
cmp rbx, r12
je 0x1401c88a7
mov rax, qword [rsi + 0x10]
mov qword [rsp + 0x60], rcx
test rax, rax
je 0x1401c88b4
xor ecx, ecx
cmp rbx, rax
setns cl
add rcx, r12
sub rbx, rax
cmovo rbx, rcx
lea rax, [r12 + rbx]
add rax, 2
cmp rax, 2
jb 0x1401c886b
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 + 0x90], ebx
test ebx, ebx
je 0x1401c8a98
mov rax, qword [rdi + 0x10]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [0x140318008]
jmp 0x1401c8997
mov dword [rsp + 0x90], 0xffffffff
jmp 0x1401c888e
mov rax, qword [fcn.14009a170]
lea r14, [rsp + 0x60]
mov rcx, r14
call qword [0x140318008]
mov rax, qword [r14]
jmp 0x1401c8822
mov dword [rsp + 0x90], 0xffffffff
jmp 0x1401c898f
mov rax, qword [r14]
mov rax, qword [rax + 0x38]
mov rcx, r14
mov edx, ebp
call qword [0x140318008]
mov r14, qword [rsi]
cmp r14, r12
je 0x1401c88d1
lea r15, [rsp + 0x60]
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [r15], rax
mov rax, qword [fcn.14009a170]
mov rcx, r15
call qword [0x140318008]
mov rax, qword [r15]
xor ecx, ecx
cmp r14, rax
setns cl
add rcx, r12
sub r14, rax
cmovo r14, rcx
lea rax, [r12 + r14]
add rax, 2
cmp rax, 2
jb 0x1401c8969
mov rax, r14
imul r13
mov rax, rdx
shr rax, 0x3f
sar rdx, 7
add rdx, rax
imul rax, rdx, 0x3e8
xor ecx, ecx
cmp r14, rax
setg cl
add rcx, rdx
mov r14, rcx
xor eax, eax
test r14, r14
setns al
neg eax
mov rcx, r14
shr rcx, 0x20
cmovne r14d, eax
mov dword [rsp + 0x90], r14d
test r14d, r14d
je 0x1401c8a98
test ebx, ebx
je 0x1401c888e
lea rbx, [rsp + 0x90]
mov rcx, rbx
call fcn.14008fa20
lea r14, [rsp + 0x94]
mov rcx, r14
call fcn.14008fa20
mov eax, dword [r14]
mov r9d, dword [rdi + 0x88]
mov r8d, dword [rbx]
mov dword [rsp + 0x20], eax
xor ecx, ecx
xor edx, edx
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
mov ebx, eax
test eax, eax
jne 0x1401c88f3
mov rax, qword [rdi + 0x10]
mov r14, qword [rax]
mov rax, qword [r14]
mov rax, qword [rax + 0x30]
mov rcx, r14
call qword [0x140318008]
mov rax, qword [r14]
mov rax, qword [rax + 0x28]
mov rcx, r14
call qword [0x140318008]
mov ebp, eax
test byte [0x1402e2e90], 0x19
jne 0x1401c8abd
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
bt eax, 0x16
jb 0x1401c8a81
movaps xmm0, xmmword [0x14029bb90]
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rsp + 0x60], xmm0
test byte [0x1402e2e90], 0x19
jne 0x1401c8bbd
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0x60]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x1401c8a81
mov dword [rsp + 0x94], 0
test r14, r14
jne 0x1401c88e1
jmp 0x1401c88f3
test r14, r14
je 0x1401c8a98
mov rax, qword [r14]
mov rax, qword [rax + 0x38]
mov rcx, r14
mov edx, ebp
call qword [0x140318008]
mov rcx, qword [rsp + 0xa0]
xor rcx, rsp
call fcn.14010fba0
nop
add rsp, 0xa8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x1402e38a8]
lea rcx, [0x140038fc0]
cmp rax, rcx
jne 0x1401c8cd1
lea r15, [rsp + 0x60]
mov qword [r15], 0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [r15]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x1401c8b1f
mov rcx, qword [0x1402f3f50]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401c8b2f
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402f3f50]
mov qword [rsp + 0x60], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x38], rcx
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, [0x1402e2e90]
lea r8, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov cl, 0x58
xor r9d, r9d
call fcn.14016b830
mov qword [rsp + 0x58], rax
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov r15d, eax
cmp byte [0x1402e2e90], 0
je 0x1401c8bad
lea rcx, [0x1402e2e90]
lea rdx, str.MessagePumpForUI::WaitForWork_GetQueueStatus
mov r8, qword [rsp + 0x58]
call fcn.14016b030
bt r15d, 0x16
jae 0x1401c8a23
jmp 0x1401c8a81
mov rax, qword [0x1402e38a8]
lea rcx, [0x140038fc0]
cmp rax, rcx
jne 0x1401c8ce1
lea r15, [rsp + 0x98]
mov qword [r15], 0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [r15]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jl 0x1401c8c22
mov rcx, qword [0x1402f3f50]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1401c8c32
imul rax, rax, 0xf4240
cqo
idiv qword [0x1402f3f50]
mov qword [rsp + 0x98], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor r15d, r15d
mov dword [rsp + 0x48], r15d
lea rcx, [rsp + 0x98]
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, [0x1402e2e90]
lea r8, str.MessagePumpForUI::WaitForWork_PeekMessage
mov cl, 0x58
xor r9d, r9d
call fcn.14016b830
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x20], r15d
lea rcx, [rsp + 0x60]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
mov r15d, eax
cmp byte [0x1402e2e90], 0
je 0x1401c8cc3
lea rcx, [0x1402e2e90]
lea rdx, str.MessagePumpForUI::WaitForWork_PeekMessage
mov r8, qword [rsp + 0x58]
call fcn.14016b030
test r15d, r15d
je 0x1401c8a68
jmp 0x1401c8a81
lea rcx, [rsp + 0x60]
call qword [0x140318008]
jmp 0x1401c8b34
lea rcx, [rsp + 0x98]
call qword [0x140318008]
jmp 0x1401c8c3a