Function at 0x180120df0
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
mov rax, rsp
mov dword [rax + 0x18], r8d
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
mov qword [rax - 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
movaps xmmword [rax - 0x48], xmm6
movaps xmmword [rax - 0x58], xmm7
mov rsi, rdx
mov rdi, rcx
test rdx, rdx
jne 0x180120e32
mov rsi, qword [rcx + 8]
test rsi, rsi
je 0x180121158
call fcn.18012a0e0
call fcn.180211b44
mov r9, qword [rax]
xor r8d, r8d
lea edx, [r8 + 0x7a]
mov rcx, rax
call qword [r9 + 0x10]
mov r15d, eax
call fcn.180211b44
mov r9, qword [rax]
xor r8d, r8d
lea edx, [r8 + 0x7b]
mov rcx, rax
call qword [r9 + 0x10]
mov r12d, eax
call fcn.180090bc0
movaps xmm6, xmm0
movss xmm7, dword [0x1802bf720]
test r15d, r15d
js 0x180120ead
test r12d, r12d
js 0x180120ead
movd xmm1, r15d
cvtdq2ps xmm1, xmm1
mulss xmm1, xmm6
addss xmm1, xmm7
cvttss2si r15d, xmm1
movd xmm2, r12d
cvtdq2ps xmm2, xmm2
mulss xmm2, xmm6
addss xmm2, xmm7
cvttss2si r12d, xmm2
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x2c], r15d
mov ecx, dword [rdi + 0x100]
add ecx, r15d
mov dword [rsp + 0x30], ecx
mov ecx, dword [rdi + 0x104]
add ecx, r12d
mov dword [rsp + 0x34], ecx
mov r14, qword [0x180344ad0]
test r14, r14
jne 0x180120f02
mov ecx, 0x238
call fcn.1802037c4
mov r14, rax
mov qword [rsp + 0xa8], rax
mov rcx, rax
call fcn.18006f080
nop
mov qword [0x180344ad0], r14
lea rcx, [r14 + 0x1d8]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rcx, [r14 + 0x1d0]
mov rax, qword [r14 + 0x1d8]
sub rax, qword [rcx]
imul rax, rax, 0x3e8
cqo
idiv qword [r14 + 0x230]
cmp rax, 0x3e8
jle 0x180120f53
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
call fcn.18008a6f0
mov dword [r14], eax
mov eax, dword [0x180341d3c]
mov dword [r14 + 0x1c8], eax
mov eax, dword [r14]
mov dword [rsp + 0xb0], eax
mov rbx, qword [0x180344ad0]
test rbx, rbx
jne 0x180120f8e
mov ecx, 0x238
call fcn.1802037c4
mov rbx, rax
mov qword [rsp + 0xa8], rax
mov rcx, rax
call fcn.18006f080
nop
mov qword [0x180344ad0], rbx
mov r13d, dword [rbx + 8]
mov rcx, rbx
call fcn.180071370
mov ebp, eax
mov r14, qword [0x180344ad0]
test r14, r14
jne 0x180120fcd
mov ecx, 0x238
call fcn.1802037c4
mov r14, rax
mov qword [rsp + 0xa8], rax
mov rcx, rax
call fcn.18006f080
nop
mov qword [0x180344ad0], r14
cmp dword [r14 + 0x14], 0
jg 0x180120fe4
lea rcx, [rsp + 0x28]
call fcn.18008a470
mov dword [r14 + 0x14], eax
jmp 0x18012103b
lea rcx, [r14 + 0x228]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rcx, [r14 + 0x220]
mov rax, qword [r14 + 0x228]
sub rax, qword [rcx]
imul rax, rax, 0x3e8
cqo
idiv qword [r14 + 0x230]
cmp rax, 0x3e8
jle 0x18012103b
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rcx, [rsp + 0x28]
call fcn.18008a470
mov dword [r14 + 0x14], eax
mov eax, dword [0x180341d3c]
mov dword [r14 + 0x1c8], eax
mov ebx, dword [r14 + 0x14]
mov eax, dword [rsp + 0xb0]
sub ebp, dword [rdi + 0x100]
cmp r15d, eax
jge 0x180121055
add ebp, eax
jmp 0x180121060
mov eax, ebp
mov ebp, r15d
cmp r15d, eax
cmovg ebp, eax
sub ebx, dword [rdi + 0x104]
cmp r12d, r13d
jge 0x180121070
add ebx, r13d
jmp 0x18012107b
mov eax, ebx
mov ebx, r12d
cmp r12d, eax
cmovge ebx, eax
call fcn.180211b44
mov r9, qword [rax]
movd xmm0, ebp
cvtdq2ps xmm0, xmm0
divss xmm0, xmm6
addss xmm0, xmm7
cvttss2si r8d, xmm0
mov edx, 0x7a
mov rcx, rax
call qword [r9 + 8]
call fcn.180211b44
mov r9, qword [rax]
movd xmm0, ebx
cvtdq2ps xmm0, xmm0
divss xmm0, xmm6
addss xmm0, xmm7
cvttss2si r8d, xmm0
mov edx, 0x7b
mov rcx, rax
call qword [r9 + 8]
mov rcx, qword [rdi + 0x160]
mov rax, qword [rcx]
mov edx, 0x4c
call qword [rax]
test eax, eax
je 0x180121100
mov rcx, rdi
call fcn.18012bca0
test al, al
je 0x1801210f6
xor edx, edx
mov rcx, rdi
call fcn.180121180
xor r8d, r8d
mov edx, 0x4c8
jmp 0x180121130
mov dword [rdi + 0x24], ebp
mov dword [rdi + 0x28], ebx
cmp dword [rdi + 0x100], 0
jle 0x18012113c
cmp dword [rdi + 0x104], 0
jle 0x18012113c
mov rcx, rsi
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x18012113c
mov edx, 0x4c9
mov r8d, 4
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.USER32.dll_PostMessageW]
mov rcx, rsi
call qword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x180121158
xor edx, edx
lea r8d, [rdx + 1]
mov rcx, rsi
call qword [sym.imp.USER32.dll_InvalidateRect]
mov rbx, qword [rsp + 0xa0]
movaps xmm6, xmmword [rsp + 0x50]
movaps xmm7, xmmword [rsp + 0x40]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret