Function at 0x1400cd3f0
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, 0x88
mov rsi, rdx
mov rdi, rcx
mov rax, qword [0x14022c040]
xor rax, rsp
mov qword [rsp + 0x80], rax
movabs r15, 0xaaaaaaaaaaaaaaaa
movabs r13, 0x7fffffffffffffff
mov dword [rsp + 0x6c], 4
mov rbx, qword [rdx]
cmp rbx, r13
je 0x1400cd4c9
mov rax, qword [rsi + 0x10]
mov qword [rsp + 0x78], r15
test rax, rax
je 0x1400cd7d4
xor ecx, ecx
cmp rbx, rax
setns cl
add rcx, r13
sub rbx, rax
cmovo rbx, rcx
lea rax, [rbx + r13]
add rax, 2
cmp rax, 2
jb 0x1400cd4a8
mov rax, rbx
movabs rcx, 0x20c49ba5e353f7cf
imul rcx
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 + 0x68], ebx
test ebx, ebx
jne 0x1400cd4e3
jmp 0x1400cd7a6
mov dword [rsp + 0x68], 0xffffffff
jmp 0x1400cd4e3
mov dword [rsp + 0x68], 0xffffffff
test ebx, ebx
jne 0x1400cd565
mov rax, qword [rdi + 0x10]
mov rbx, qword [rax]
mov rax, qword [rbx]
mov rax, qword [rax + 0x18]
lea rcx, [0x14012eb20]
cmp rax, rcx
jne 0x1400cd856
cmp byte [rbx + 0xd0], 1
je 0x1400cd853
cmp byte [rbx + 0x138], 1
je 0x1400cd864
mov rax, qword [rbx + 0xf0]
mov ecx, dword [rax]
lea edx, [rcx + 1]
cmp edx, 1
adc ecx, 1
mov dword [rax], ecx
movaps xmm0, xmmword [0x1401fa990]
movaps xmmword [rsp + 0x30], xmm0
mov rax, qword [rbx - 0xe0]
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x38], 0
mov qword [rsp + 0x40], rax
add rbx, 0xffffffffffffff30
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.1400b6750
lea rcx, [rsp + 0x68]
call fcn.1400a4690
lea rcx, [rsp + 0x6c]
call fcn.1400a4690
mov dword [rsp + 0x64], 0xaaaaaaaa
mov eax, dword [rsp + 0x6c]
mov r8d, dword [rsp + 0x68]
mov dword [rsp + 0x20], eax
xor ecx, ecx
xor edx, edx
mov r9d, 0x1cff
call qword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
mov ebx, eax
mov dword [rsp + 0x64], eax
test eax, eax
je 0x1400cd6ae
mov dword [rdi + 0x4c], 3
mov qword [rsp + 0x70], 0xb
mov al, byte [0x14023df8b]
test al, al
jne 0x1400cd87c
mov r14, qword [rsi]
cmp r14, r13
je 0x1400cd4d3
mov r12, r15
mov qword [rsp + 0x78], r15
mov rax, qword [fcn.1401241a0]
lea rcx, [0x140124260]
cmp rax, rcx
jne 0x1400cd827
lea r15, [rsp + 0x30]
mov qword [r15], 0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [r15]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x1400cd96b
imul rax, rax, 0xf4240
cqo
idiv qword [0x14023e460]
xor ecx, ecx
cmp r14, rax
setns cl
add rcx, r13
sub r14, rax
cmovo r14, rcx
lea rax, [r14 + r13]
add rax, 2
cmp rax, 2
mov r15, r12
jb 0x1400cd686
mov rax, r14
movabs rcx, 0x20c49ba5e353f7cf
imul rcx
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 + 0x68], r14d
test r14d, r14d
jne 0x1400cd4db
jmp 0x1400cd7a6
mov r12, r15
mov dword [rdi + 0x4c], 1
mov rax, qword [rdi + 0x10]
mov r14, qword [rax]
mov rax, qword [r14]
mov rax, qword [rax + 0x30]
mov rcx, r14
call qword [0x14021e390]
mov rax, qword [r14]
mov rax, qword [rax + 0x28]
mov rcx, r14
call qword [0x14021e390]
mov ebp, eax
mov qword [rsp + 0x78], 0xac
mov al, byte [0x14023e02c]
test al, al
jne 0x1400cd8f9
mov ecx, 0x40
call qword [sym.imp.USER32.dll_GetQueueStatus]
mov r15d, eax
mov qword [rsp + 0x78], 0xac
mov al, byte [0x14023e02c]
test al, al
jne 0x1400cd8aa
bt r15d, 0x16
jb 0x1400cd78f
movaps xmm0, xmmword [0x1401fa990]
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x30], xmm0
mov qword [rsp + 0x70], 0xac
mov al, byte [0x14023e02c]
test al, al
jne 0x1400cd944
mov dword [rsp + 0x20], 0
lea rcx, [rsp + 0x30]
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.USER32.dll_PeekMessageW]
mov r15d, eax
mov qword [rsp + 0x70], 0xac
mov al, byte [0x14023e02c]
test al, al
jne 0x1400cd920
test r15d, r15d
je 0x1400cd8ce
test r14, r14
je 0x1400cd7a6
mov rax, qword [r14]
mov rax, qword [rax + 0x38]
mov rcx, r14
mov edx, ebp
call qword [0x14021e390]
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
cmp rcx, qword [0x14022c040]
je 0x1400cd7c0
call fcn.1401363f0
int3
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [fcn.1401241a0]
lea rcx, [0x140124260]
cmp rax, rcx
jne 0x1400cd83d
lea r14, [rsp + 0x30]
mov qword [r14], 0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [r14]
movabs rcx, 0x8637bd05af7
cmp rax, rcx
jge 0x1400cd992
imul rax, rax, 0xf4240
cqo
idiv qword [0x14023e460]
jmp 0x1400cd455
lea r15, [rsp + 0x78]
mov rcx, r15
call qword [0x14021e390]
mov rax, qword [r15]
jmp 0x1400cd630
lea r14, [rsp + 0x78]
mov rcx, r14
call qword [0x14021e390]
mov rax, qword [r14]
jmp 0x1400cd455
int3
mov rcx, rbx
call qword [0x14021e390]
jmp 0x1400cd565
lea rcx, [rbx + 0x120]
call fcn.140126470
mov byte [rbx + 0x138], 0
jmp 0x1400cd51b
movzx ecx, al
lea rax, [rsp + 0x64]
lea r9, [rsp + 0x30]
mov qword [r9], rax
lea rax, str.MessagePumpForUI::WaitForWork_Spurious_Wakeup
lea r8, [rsp + 0x78]
mov qword [r8], rax
lea rdx, [rsp + 0x70]
call fcn.1401892d0
jmp 0x1400cd5ca
movzx ecx, al
lea r8, [rsp + 0x30]
mov qword [r8], 0
lea rdx, [rsp + 0x78]
mov r9d, 2
call fcn.1400b7bd0
jmp 0x1400cd71d
mov dword [rsp + 0x6c], 0
test r14, r14
mov r15, r12
je 0x1400cd5ca
mov rax, qword [r14]
mov rax, qword [rax + 0x38]
mov rcx, r14
mov edx, ebp
call qword [0x14021e390]
jmp 0x1400cd5ca
movzx ecx, al
lea rax, str.MessagePumpForUI::WaitForWork_GetQueueStatus
lea r8, [rsp + 0x30]
mov qword [r8], rax
lea rdx, [rsp + 0x78]
mov r9d, 1
call fcn.1400b7bd0
jmp 0x1400cd6f8
movzx ecx, al
lea r8, [rsp + 0x78]
mov qword [r8], 0
lea rdx, [rsp + 0x70]
mov r9d, 2
call fcn.1400b7bd0
jmp 0x1400cd786
movzx ecx, al
lea rax, str.MessagePumpForUI::WaitForWork_PeekMessage
lea r8, [rsp + 0x78]
mov qword [r8], rax
lea rdx, [rsp + 0x70]
mov r9d, 1
call fcn.1400b7bd0
jmp 0x1400cd751
mov rcx, qword [0x14023e460]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400cd630
mov rcx, qword [0x14023e460]
cqo
idiv rcx
imul r8, rax, 0xf4240
imul rax, rdx, 0xf4240
cqo
idiv rcx
add rax, r8
jmp 0x1400cd455