Function at 0x180002800
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x980
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov rax, qword [0x18002f528]
xor rax, rsp
mov qword [rsp + 0x970], rax
mov rsi, rcx
cmp byte [rcx + 0x78], 0
je 0x180002847
call fcn.180002c40
test al, al
je 0x180002c07
lea r14, [rsi + 0xb0]
mov rax, qword [r14 + 8]
xor ebp, ebp
cmp qword [r14], rax
jne 0x180002a86
mov eax, dword [0x180031de8]
lea ecx, [rax + 1]
imul ecx, eax
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, 0xa
jne 0x1800029ad
mov ebx, ebp
mov edi, 0xe9
nop
call fcn.18000d40c
movd xmm0, eax
cvtdq2pd xmm0, xmm0
movsd qword [rsp + rbx*8 + 0x80], xmm0
inc rbx
cmp rbx, rdi
jb 0x180002890
mov r8, rbp
mov r9d, 0xe8
nop word [rax + rax]
mov ecx, 0xe8
cmp r8, rcx
jge 0x18000299e
cmp r9, 4
jl 0x18000296d
lea rax, [rsp + 0x7b0]
mov edx, 0xe4
sub rdx, r8
shr rdx, 2
inc rdx
mov ecx, 0x3a
sub rcx, rdx
shl rcx, 2
nop dword [rax + rax]
movsd xmm0, qword [rax + 0x10]
movsd xmm1, qword [rax + 8]
comisd xmm0, xmm1
jbe 0x18000291a
movsd qword [rax + 0x10], xmm1
movsd qword [rax + 8], xmm0
movsd xmm0, qword [rax + 8]
movsd xmm1, qword [rax]
comisd xmm0, xmm1
jbe 0x180002932
movsd qword [rax + 8], xmm1
movsd qword [rax], xmm0
movsd xmm0, qword [rax]
movsd xmm1, qword [rax - 8]
comisd xmm0, xmm1
jbe 0x18000294a
movsd qword [rax], xmm1
movsd qword [rax - 8], xmm0
movsd xmm0, qword [rax - 8]
movsd xmm1, qword [rax - 0x10]
comisd xmm0, xmm1
jbe 0x180002964
movsd qword [rax - 8], xmm1
movsd qword [rax - 0x10], xmm0
sub rax, 0x20
dec rdx
jne 0x180002900
cmp rcx, r8
jle 0x18000299e
movsd xmm0, qword [rsp + rcx*8 + 0x80]
movsd xmm1, qword [rsp + rcx*8 + 0x78]
comisd xmm0, xmm1
jbe 0x180002996
movsd qword [rsp + rcx*8 + 0x80], xmm1
movsd qword [rsp + rcx*8 + 0x78], xmm0
dec rcx
cmp rcx, r8
jg 0x180002972
inc r8
dec r9
dec rdi
jne 0x1800028c0
lea rcx, [rsi + 0xd0]
mov qword [rsp + 0x38], rcx
lea rbx, [rcx + 8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rsi + 0x120], 0
jne 0x180002a33
mov r8d, dword [0x180031de8]
mov ecx, r8d
imul ecx, r8d
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x16
sub ecx, edx
cmp ecx, 0x11
jne 0x180002a25
lea rcx, [rsp + 0x7d0]
mov eax, dword [rcx]
imul eax, eax, 0xc1
add r8d, eax
inc ebp
lea rcx, [rcx + 4]
movsxd rax, ebp
cmp rax, 0x198
jb 0x180002a02
mov dword [0x180031de8], r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180002c07
lea rcx, [rsi + 0x100]
lea rdx, [rsp + 0x58]
call fcn.180003c70
mov rdx, rax
mov rax, qword [rax]
test rax, rax
jne 0x180002a54
mov rax, rbp
jmp 0x180002a57
mov rax, qword [rax]
mov rcx, qword [rax + 0x10]
dec rcx
and rcx, qword [rdx + 0x10]
mov rax, qword [rax + 8]
mov rdx, qword [rax + rcx*8]
add rdx, 8
mov rcx, r14
call fcn.180003520
mov qword [rsi + 0xc8], rbp
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x30], ebp
mov rdx, qword [r14]
mov r8, qword [r14 + 8]
sub r8, rdx
lea rcx, [rsi + 0x80]
add rdx, qword [rsi + 0xc8]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0x30]
mov rcx, qword [rsi + 0xa8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x180002b48
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x180002b13
cmp eax, 0x3e5
je 0x180002b0d
lea rax, str.Channel_write_failure
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x58]
call fcn.18000d188
nop
lea rax, [0x180026ab8]
mov qword [rsp + 0x58], rax
lea rdx, [0x18002db20]
lea rcx, [rsp + 0x58]
call fcn.18000d988
int3
mov byte [rsi + 0x78], 1
jmp 0x180002b48
lea rcx, [rsp + 0x40]
call fcn.18000d200
nop
lea rax, [0x180026ab8]
mov qword [rsp + 0x40], rax
lea rax, [0x180026ad8]
mov qword [rsp + 0x40], rax
lea rdx, [0x18002dad8]
lea rcx, [rsp + 0x40]
call fcn.18000d988
int3
cmp byte [rsi + 0x78], 0
jne 0x180002c07
mov eax, dword [rsp + 0x30]
add qword [rsi + 0xc8], rax
mov bl, 1
mov rax, qword [r14 + 8]
sub rax, qword [r14]
cmp qword [rsi + 0xc8], rax
jne 0x180002bf5
lea rax, [rsi + 0xd0]
mov qword [rsp + 0x38], rax
lea rdi, [rax + 8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rsi + 0x120], 0
je 0x180002bd3
mov rcx, qword [rsi + 0x110]
dec rcx
and rcx, qword [rsi + 0x118]
mov rax, qword [rsi + 0x108]
mov rcx, qword [rax + rcx*8]
mov rax, qword [rcx]
xor edx, edx
call qword [rax]
dec qword [rsi + 0x120]
jne 0x180002bcc
mov qword [rsi + 0x118], rbp
jmp 0x180002bd3
inc qword [rsi + 0x118]
mov rax, qword [r14]
mov qword [r14 + 8], rax
mov qword [rsi + 0xc8], rbp
cmp qword [rsi + 0x120], 0
setne bl
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsi + 0xa0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
movzx eax, bl
jmp 0x180002c09
xor al, al
mov rcx, qword [rsp + 0x970]
xor rcx, rsp
call fcn.18000c100
lea r11, [rsp + 0x980]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret