Function at 0x14005b3e0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x80
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0xb0], rbx
movaps xmmword [rsp + 0x70], xmm6
mov rdi, rcx
cmp byte [rcx + 0x78], 0
je 0x14005b466
call fcn.14005b710
test al, al
jne 0x14005b466
mov eax, dword [0x1401b4d80]
mov ecx, eax
imul ecx, eax
imul ecx, eax
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
sub ecx, eax
cmp ecx, 7
jne 0x14005b6ed
mov ecx, 4
call fcn.1400c8398
mov rbx, rax
call fcn.1400c84d4
mov dword [rbx], eax
mov dword [0x1401b4d80], eax
mov rcx, rbx
call fcn.1400c7bc0
jmp 0x14005b6ed
lea rsi, [rdi + 0xb0]
mov rax, qword [rsi + 8]
cmp qword [rsi], rax
jne 0x14005b58d
lea rax, [rdi + 0xd0]
mov qword [rsp + 0xa8], rax
lea rbx, [rax + 8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rdi + 0x120], 0
jne 0x14005b4af
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14005b6ed
lea rcx, [rdi + 0x100]
lea rdx, [rsp + 0x50]
call fcn.140033450
mov rdx, rax
mov rcx, qword [rax]
test rcx, rcx
jne 0x14005b4cf
xor eax, eax
jmp 0x14005b4d2
mov rax, qword [rcx]
mov rcx, qword [rax + 0x10]
dec rcx
and rcx, qword [rdx + 0x10]
mov rax, qword [rax + 8]
mov r9, qword [rax + rcx*8]
mov r8d, dword [0x1401b4d80]
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x17
sub ecx, edx
cmp ecx, 0x10
jne 0x14005b56d
movsd xmm3, qword [0x140144ec8]
xorps xmm2, xmm2
movd xmm4, r8d
cvtdq2pd xmm4, xmm4
movsd xmm5, qword [0x140144ef0]
movsd xmm6, qword [0x140144ec0]
nop word [rax + rax]
addsd xmm2, xmm3
movaps xmm0, xmm2
mulsd xmm0, xmm2
comisd xmm0, xmm4
jbe 0x14005b559
subsd xmm2, xmm3
divsd xmm3, xmm5
movaps xmm1, xmm2
mulsd xmm1, xmm2
movaps xmm0, xmm4
subsd xmm0, xmm1
comisd xmm0, xmm6
ja 0x14005b540
lea rdx, [r9 + 8]
mov rcx, rsi
call fcn.14002e660
mov qword [rdi + 0xc8], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0xa0], 0
mov rdx, qword [rsi]
mov r8, qword [rsi + 8]
sub r8, rdx
lea rcx, [rdi + 0x80]
add rdx, qword [rdi + 0xc8]
mov qword [rsp + 0x20], rcx
lea r9, [rsp + 0xa0]
mov rcx, qword [rdi + 0xa8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14005b65f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x14005b62a
cmp eax, 0x3e5
je 0x14005b624
lea rax, str.Channel_write_failure
mov qword [rsp + 0xa8], rax
lea rdx, [rsp + 0xa8]
lea rcx, [rsp + 0x50]
call fcn.1400cb068
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x50], rax
lea rdx, [0x140177bb8]
lea rcx, [rsp + 0x50]
call fcn.1400cfab8
int3
mov byte [rdi + 0x78], 1
jmp 0x14005b65f
lea rcx, [rsp + 0x38]
call fcn.1400cb0e0
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x38], rax
lea rax, vtable.CRSimpleIPCExceptionDisconnected.0
mov qword [rsp + 0x38], rax
lea rdx, [0x140177b70]
lea rcx, [rsp + 0x38]
call fcn.1400cfab8
int3
cmp byte [rdi + 0x78], 0
jne 0x14005b6ed
mov eax, dword [rsp + 0xa0]
add qword [rdi + 0xc8], rax
mov bpl, 1
mov rax, qword [rsi + 8]
sub rax, qword [rsi]
cmp qword [rdi + 0xc8], rax
jne 0x14005b6da
lea rax, [rdi + 0xd0]
mov qword [rsp + 0xa8], rax
lea rbx, [rax + 8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rcx, [rdi + 0x100]
call fcn.14005bb30
mov rax, qword [rsi]
mov qword [rsi + 8], rax
mov qword [rdi + 0xc8], 0
cmp qword [rdi + 0x120], 0
setne bpl
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rdi + 0xa0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
movzx eax, bpl
jmp 0x14005b6ef
xor al, al
mov rbx, qword [rsp + 0xb0]
movaps xmm6, xmmword [rsp + 0x70]
add rsp, 0x80
pop rdi
pop rsi
pop rbp
ret