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

Disassembly:
push rsi
push rdi
sub rsp, 0x48
mov rax, qword [0x180066008]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov eax, dword [rcx + 0x1c]
lea rsi, [rcx - 0x6f8]
mov qword [rsp + 0x68], rbx
mov rbx, rcx
mov ecx, dword [rcx + 0xc]
mov qword [rsp + 0x70], rbp
mov rbp, rdx
cmp eax, ecx
jae 0x18000629f
mov dil, 1
movzx edx, byte [rbx]
sub eax, r9d
mov dword [rbx + 0x1c], eax
test dl, 2
jne 0x180006343
test r9d, r9d
je 0x1800060f7
mov eax, dword [rbx + 0x14]
cmp ecx, eax
jae 0x18000613d
lea edx, [rcx + r9]
mov dword [rbx + 0xc], edx
cmp edx, eax
jae 0x18003ab2d
mov eax, dword [rbx + 0x20]
add eax, eax
cmp edx, eax
jbe 0x1800060f7
mov dword [rbx + 0xc], eax
or byte [rbx], 8
mov rcx, rsi
mov qword [rbx + 0x28], rbp
call fcn.180006428
mov eax, dword [rbx + 0xc]
mov rbp, qword [rsp + 0x70]
cmp dword [rbx + 0x1c], eax
jae 0x1800063cd
mov al, 1
mov rbx, qword [rsp + 0x68]
cmp dil, al
jne 0x1800062b1
xor al, al
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.180028c10
add rsp, 0x48
pop rdi
pop rsi
ret
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
test dl, 8
je 0x180006164
mov eax, dword [rbx + 8]
mov r8, rbp
sub r8, qword [rbx + 0x28]
cmp r8, rax
ja 0x1800063de
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rsp + 0x20]
xor edx, edx
mov rax, rcx
mov ecx, ecx
shr rax, 0x20
imul rax, rax, 0xf4240
div qword [0x180067c48]
mov r10, rax
shl rdx, 0x20
imul rax, rcx, 0xf4240
shl r10, 0x20
add rax, rdx
xor edx, edx
div qword [0x180067c48]
add r10, rax
movabs rax, 0x624dd2f1a9fbe77
mul r10
mov eax, 0xffffffff
sub r10, rdx
shr r10, 1
add r10, rdx
shr r10, 9
sub r10, qword [rbx + 0x30]
cmp r10, rax
ja 0x18003ab9e
movzx r15d, word [rsi + 0x124]
mov eax, 0x10624dd3
mul dword [rsp + 0x80]
mov eax, dword [rbx + 0x38]
mov ecx, r15d
mov r12d, dword [rbx + 0x40]
shr edx, 6
mov r8d, edx
sub r8, rax
mov r11d, edx
add r8, r10
shl ecx, 2
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
mov rax, r8
imul rax, r8
movsxd r9, edx
sar rax, 0xa
imul r9, rax
imul r9, r8
sar r9, 0x14
add r9, r12
js 0x180006419
mov r14d, 1
mov rax, r15
cmp r11d, r14d
cmovb r11d, r14d
xor edx, edx
imul rax, r10
imul ecx, r12d, 7
mov r12, qword [rsp + 0x40]
lea r8d, [r11 + r11]
div r8
mov r8, rax
mov eax, 0xcccccccd
mul ecx
shr edx, 3
add rdx, r8
mov r8d, dword [rbx + 0xc]
cmp rdx, r9
jle 0x18000631f
lea eax, [r8 + 1]
mov ecx, eax
cmp rdx, rcx
cmovle edx, eax
mov dword [rbx + 0xc], edx
mov r14, qword [rsp + 0x38]
mov r15, qword [rsp + 0x30]
jmp 0x1800060eb
cmp byte [rbx + 0x24], 0
ja 0x1800060bb
xor dil, dil
jmp 0x1800060be
mov edx, 8
mov rcx, rsi
test dil, dil
jne 0x18003aba6
call fcn.1800054a4
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rsp + 0x20]
xor edx, edx
mov rax, rcx
mov ecx, ecx
shr rax, 0x20
imul rax, rax, 0xf4240
div qword [0x180067c48]
mov r9, rax
shl rdx, 0x20
imul rax, rcx, 0xf4240
shl r9, 0x20
add rax, rdx
xor edx, edx
div qword [0x180067c48]
add rax, r9
mov qword [rsi + 0xa18], rax
mov al, 1
jmp 0x180006129
sub r9, r8
imul r9, r15
mov rax, r9
cqo
idiv r8
cmp rax, r14
cmovg r14, rax
lea eax, [r8 + r14]
mov dword [rbx + 0xc], eax
mov edx, eax
jmp 0x180006290
cmp r8, qword [rbx + 0x50]
jbe 0x1800060f7
test byte [0x180067c72], 4
jne 0x18003ab16
and dl, 0xf9
lea rcx, [rsp + 0x20]
mov byte [rbx], dl
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rsp + 0x20]
xor edx, edx
mov rax, rcx
mov ecx, ecx
shr rax, 0x20
imul rax, rax, 0xf4240
div qword [0x180067c48]
mov r9, rax
shl rdx, 0x20
imul rax, rcx, 0xf4240
shl r9, 0x20
add rax, rdx
xor edx, edx
div qword [0x180067c48]
lea rcx, [r9 + rax]
movabs rax, 0x624dd2f1a9fbe77
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 9
mov qword [rbx + 0x30], rcx
jmp 0x1800060f7
cmp byte [rbx + 0x24], 0
ja 0x180006117
xor al, al
jmp 0x180006119
mov eax, dword [rsi + 0x184]
mov ecx, dword [rsi + 0x190]
lea edx, [rax + rcx*4]
mov eax, 0x10624dd3
mul edx
shr edx, 6
mov eax, edx
cmp r8, rax
jbe 0x180006164
add qword [rbx + 0x30], r8
cmp rbp, qword [rbx + 0x30]
ja 0x180006164
mov qword [rbx + 0x30], rbp
jmp 0x180006164
mov eax, dword [rbx + 0x20]
lea r9d, [rax + rax]
jmp 0x18000623e
mov r8, rsi
lea rdx, [0x18005af78]
call fcn.1800420e4
movzx edx, byte [rbx]
jmp 0x18000635a
lea rcx, [rsp + 0x20]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rsp + 0x20]
xor edx, edx
mov rax, rcx
mov ecx, ecx
shr rax, 0x20
imul rax, rax, 0xf4240
div qword [0x180067c48]
mov r9, rax
shl rdx, 0x20
imul rax, rcx, 0xf4240
shl r9, 0x20
add rax, rdx
xor edx, edx
div qword [0x180067c48]
lea rcx, [r9 + rax]
movabs rax, 0x624dd2f1a9fbe77
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
mov edx, dword [rbx + 0xc]
shr rcx, 9
mov qword [rbx + 0x30], rcx
jmp 0x1800060eb
mov r10, rax
jmp 0x1800061da
call fcn.180007868
nop
jmp 0x180006127