Function at 0x180008d78
Capabilities:
Check for time delay via gettickcount

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x598]
sub rsp, 0x660
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rax, qword [0x18002f528]
xor rax, rsp
mov qword [rbp + 0x550], rax
mov rsi, r9
mov r14, r8
mov rbx, rdx
mov rdi, qword [rbp + 0x5c0]
mov r15, qword [rbp + 0x5d0]
mov r13, qword [0x180031e00]
mov eax, dword [0x180031de8]
mov ecx, eax
imul ecx, eax
imul ecx, eax
mov eax, 0x38e38e39
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
add eax, eax
sub ecx, eax
cmp ecx, 4
jne 0x180008e07
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x180031de8], eax
mov eax, dword [rbp + 0x5c8]
mov dword [rsp + 0x20], eax
mov r9, rdi
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call qword [r13 + 0x38]
mov dword [r15], eax
xor esi, esi
test rdi, rdi
je 0x180009059
test eax, eax
je 0x180009059
cmp dword [r14], esi
je 0x180009059
cmp qword [rdi], rsi
je 0x180009059
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileType]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x180031de8]
imul ecx, ecx
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
cmp ecx, 3
jne 0x180008e95
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rsi
mov word [rsp + 0x50], si
lea r8, [rsp + 0x50]
mov rdx, rbx
mov rcx, r13
call fcn.180009c4c
lea rax, [r13 + 0x50]
mov qword [rsp + 0x48], rax
lea r15, [rax + 8]
mov qword [rsp + 0x38], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r13 + 0x80]
mov rbx, qword [rax]
cmp rax, rbx
je 0x180009028
mov rdx, qword [rdi]
cmp qword [rbx + 0x50], rdx
sete cl
test cl, cl
jne 0x180008f07
mov rbx, qword [rbx]
cmp rbx, rax
jne 0x180008ef4
cmp rax, rbx
je 0x180009028
cmp byte [rbx + 0x18], sil
jne 0x180009028
lea r12, [rbx + 0x30]
mov rax, qword [rbx + 0x48]
mov qword [rsp + 0x30], rax
mov rdi, qword [r12 + 8]
sub rdi, qword [r12]
mov edx, dword [r14]
add rdx, rdi
mov rcx, r12
call fcn.1800039ac
mov esi, dword [0x180031de8]
lea ecx, [rsi + 1]
imul ecx, esi
mov eax, 0x78787879
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x11
sub ecx, edx
cmp ecx, 0xe
jne 0x180008f73
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
mov dword [0x180031de8], eax
mov rcx, qword [r12]
mov r8d, dword [r14]
add rcx, rdi
mov rdx, qword [rsp + 0x30]
call fcn.18000bbf0
mov ecx, esi
imul ecx, esi
imul ecx, esi
mov eax, 0x6bca1af3
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x13
sub ecx, edx
cmp ecx, 5
jne 0x18000900e
xor r14d, r14d
lea r15, [rsp + 0x70]
xor r8d, r8d
lea edi, [r8 + 1]
lea ecx, [r14 + 1]
mov eax, esi
cdq
idiv ecx
mov ecx, edx
mov eax, esi
sub eax, r14d
imul ecx, eax
mov eax, esi
cdq
idiv edi
add ecx, eax
sub ecx, r8d
mov edx, ecx
lea rcx, [0x180026ce8]
call fcn.18000ce18
mov r8d, edi
add r15, 4
cmp edi, 0x16
jge 0x180008ff8
mov esi, dword [0x180031de8]
jmp 0x180008fb5
inc r14d
cmp r14d, 0x11
jge 0x180009009
mov esi, dword [0x180031de8]
jmp 0x180008fb2
mov r15, qword [rsp + 0x38]
xor esi, esi
mov byte [rsp + 0x28], sil
mov r8, r12
mov rdx, qword [rbx + 0x10]
mov rcx, r13
call fcn.18000942c
test al, al
jne 0x180009010
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0x68], 8
jb 0x180009044
mov rcx, qword [rsp + 0x50]
call fcn.18000c270
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], rsi
mov word [rsp + 0x50], si
jmp 0x18000909a
mov eax, dword [0x180031de8]
lea ecx, [rax + 1]
imul ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
cmp ecx, 7
jne 0x18000909a
call fcn.18000cecc
mov ecx, dword [0x180031de8]
cmp ecx, eax
jne 0x18000909a
dec ecx
mov dword [0x180031de8], ecx
mov eax, 1
mov rcx, qword [rbp + 0x550]
xor rcx, rsp
call fcn.18000bbc0
mov rbx, qword [rsp + 0x6a0]
add rsp, 0x660
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret