Function at 0x180002ae8
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rbx, rcx
cmp byte [rcx + 0x78], 0
je 0x180002b1c
call fcn.180002eb0
test al, al
je 0x180002e99
lea rdi, [rbx + 0xb0]
mov rax, qword [rdi + 8]
cmp qword [rdi], rax
jne 0x180002c04
lea rax, [rbx + 0xd0]
mov qword [rbp + 0x28], rax
lea rsi, [rax + 8]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x120], 0
jne 0x180002b61
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180002e99
lea rcx, [rbx + 0x100]
lea rdx, [rbp - 0x20]
call fcn.180003d7c
mov rdx, rax
mov rcx, qword [rax]
test rcx, rcx
jne 0x180002b80
xor eax, eax
jmp 0x180002b83
mov rax, qword [rcx]
mov rcx, qword [rax + 0x10]
dec rcx
and rcx, qword [rdx + 0x10]
mov rax, qword [rax + 8]
mov r14, qword [rax + rcx*8]
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, 8
jne 0x180002be7
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0xcccccccd
mul r8d
shr edx, 6
lea ecx, [rdx + rdx*4]
shl ecx, 4
sub r8d, ecx
lea eax, [r8 + 1]
mov dword [0x180031de8], eax
lea rdx, [r14 + 8]
mov rcx, rdi
call fcn.180003874
and qword [rbx + 0xc8], 0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [rbp + 0x20], 0
mov rdx, qword [rdi]
mov r8, qword [rdi + 8]
sub r8, rdx
lea rcx, [rbx + 0x80]
add rdx, qword [rbx + 0xc8]
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0x20]
mov rcx, qword [rbx + 0xa8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180002cb8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x180002c87
cmp eax, 0x3e5
je 0x180002c81
lea rax, str.Channel_write_failure
mov qword [rbp + 0x28], rax
lea rdx, [rbp + 0x28]
lea rcx, [rbp - 0x20]
call fcn.18000cc48
nop
lea rax, [0x180026e28]
mov qword [rbp - 0x20], rax
lea rdx, [0x18002d8a0]
lea rcx, [rbp - 0x20]
call fcn.18000d448
int3
mov byte [rbx + 0x78], 1
jmp 0x180002cb8
lea rcx, [rbp - 0x38]
call fcn.18000ccc0
nop
lea rax, [0x180026e28]
mov qword [rbp - 0x38], rax
lea rax, [0x180026e48]
mov qword [rbp - 0x38], rax
lea rdx, [0x18002d858]
lea rcx, [rbp - 0x38]
call fcn.18000d448
int3
cmp byte [rbx + 0x78], 0
jne 0x180002e27
mov ecx, dword [0x180031de8]
lea r8d, [rcx + 2]
lea eax, [rcx + 1]
imul r8d, eax
imul r8d, ecx
mov eax, 0x38e38e39
imul r8d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
sub r8d, eax
cmp r8d, 8
jne 0x180002d2c
lea ecx, [r8 + 0x20]
call fcn.18000bb8c
mov r14, rax
xor esi, esi
call fcn.18000cecc
add eax, dword [0x180031de8]
mov dword [r14 + rsi*4], eax
inc rsi
cmp rsi, 0xa
jl 0x180002d02
mov ecx, dword [r14 + 0x24]
mov dword [0x180031de8], ecx
mov rcx, r14
call fcn.18000cec4
mov eax, dword [rbp + 0x20]
add qword [rbx + 0xc8], rax
mov sil, 1
mov rax, qword [rdi + 8]
sub rax, qword [rdi]
cmp qword [rbx + 0xc8], rax
jne 0x180002dd1
lea rax, [rbx + 0xd0]
mov qword [rbp + 0x28], rax
lea r14, [rax + 8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x120], 0
je 0x180002dad
mov rcx, qword [rbx + 0x110]
dec rcx
and rcx, qword [rbx + 0x118]
mov rax, qword [rbx + 0x108]
mov rcx, qword [rax + rcx*8]
mov rax, qword [rcx]
xor edx, edx
call qword [rax]
dec qword [rbx + 0x120]
jne 0x180002da6
and qword [rbx + 0x118], 0
jmp 0x180002dad
inc qword [rbx + 0x118]
mov rax, qword [rdi]
mov qword [rdi + 8], rax
and qword [rbx + 0xc8], 0
cmp qword [rbx + 0x120], 0
setne sil
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbx + 0xa0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov ecx, dword [0x180031de8]
imul ecx, ecx
and ecx, 0x80000007
jge 0x180002df6
dec ecx
or ecx, 0xfffffff8
inc ecx
cmp ecx, 5
jne 0x180002e22
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0xcccccccd
mul r8d
shr edx, 6
lea ecx, [rdx + rdx*4]
shl ecx, 4
sub r8d, ecx
inc r8d
mov dword [0x180031de8], r8d
mov al, sil
jmp 0x180002e9b
mov r8d, dword [0x180031de8]
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xb
sub ecx, edx
cmp ecx, 7
jne 0x180002e99
movsd xmm3, qword [0x1800274d0]
xorps xmm2, xmm2
movd xmm4, r8d
cvtdq2pd xmm4, xmm4
addsd xmm2, xmm3
movaps xmm0, xmm2
mulsd xmm0, xmm2
comisd xmm0, xmm4
jbe 0x180002e81
subsd xmm2, xmm3
divsd xmm3, qword [0x1800274d8]
movaps xmm1, xmm2
mulsd xmm1, xmm2
movaps xmm0, xmm4
subsd xmm0, xmm1
comisd xmm0, xmmword [0x1800274c8]
ja 0x180002e64
xor al, al
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret