Function at 0x14004cc40
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rbx, rcx
cmp byte [rcx + 0x78], 0
je 0x14004ccf6
call fcn.14004d00c
test al, al
jne 0x14004ccf6
mov r8d, dword [0x14019fd80]
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 2
sub ecx, eax
cmp ecx, 9
jne 0x14004cfea
mov eax, 0x51eb851f
imul r8d
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x64
sub r8d, edx
add r8d, 0x2f4
movsxd rcx, r8d
mov eax, 4
mul rcx
mov r15, 0xffffffffffffffff
cmovo rax, r15
mov rcx, rax
call fcn.1400b8688
mov rcx, rax
call fcn.1400ba0bc
jmp 0x14004cfea
lea rsi, [rbx + 0xb0]
mov rax, qword [rsi + 8]
or r15, 0xffffffffffffffff
lea edi, [r15 + 2]
cmp qword [rsi], rax
jne 0x14004ce40
lea rax, [rbx + 0xd0]
mov qword [rbp - 0x48], rax
lea r14, [rax + 8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x120], 0
jne 0x14004cd43
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x14004cfea
lea rcx, [rbx + 0x100]
lea rdx, [rbp - 0x40]
call fcn.14002bab8
mov rdx, rax
mov rcx, qword [rax]
test rcx, rcx
jne 0x14004cd62
xor eax, eax
jmp 0x14004cd65
mov rax, qword [rcx]
mov rcx, qword [rax + 0x10]
sub rcx, rdi
and rcx, qword [rdx + 0x10]
mov rax, qword [rax + 8]
mov rdx, qword [rax + rcx*8]
add rdx, 8
mov rcx, rsi
call fcn.1400284f0
and qword [rbx + 0xc8], 0
mov r8d, dword [0x14019fd80]
mov ecx, r8d
imul ecx, r8d
imul ecx, r8d
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, 0xd
jne 0x14004cdd8
mov edx, edi
mov eax, edi
mov ecx, 0xae
lea r8d, [rax + rdx]
lea edx, [rax]
mov eax, r8d
sub ecx, edi
jns 0x14004cdc4
mov dword [0x14019fd80], r8d
lea ecx, [r8 + 1]
imul ecx, r8d
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, 3
jne 0x14004ce37
mov eax, 0x51eb851f
imul r8d
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x64
sub r8d, edx
add r8d, 0x63
movsxd rcx, r8d
mov eax, 4
mul rcx
cmovo rax, r15
mov rcx, rax
call fcn.1400b8688
mov rcx, rax
call fcn.1400ba0bc
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
and dword [rbp - 0x50], 0
mov rdx, qword [rsi]
mov r8, qword [rsi + 8]
sub r8, rdx
lea rcx, [rbx + 0x80]
add rdx, qword [rbx + 0xc8]
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x50]
mov rcx, qword [rbx + 0xa8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14004cef4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x14004cec3
cmp eax, 0x3e5
je 0x14004cebd
lea rax, str.Channel_write_failure
mov qword [rbp - 0x48], rax
lea rdx, [rbp - 0x48]
lea rcx, [rbp - 0x40]
call fcn.1400bc498
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rbp - 0x40], rax
lea rdx, [0x1401630d0]
lea rcx, [rbp - 0x40]
call fcn.1400c0ee8
int3
mov byte [rbx + 0x78], dil
jmp 0x14004cef4
lea rcx, [rbp - 0x28]
call fcn.1400bc510
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rbp - 0x28], rax
lea rax, vtable.CRSimpleIPCExceptionDisconnected.0
mov qword [rbp - 0x28], rax
lea rdx, [0x140163088]
lea rcx, [rbp - 0x28]
call fcn.1400c0ee8
int3
cmp byte [rbx + 0x78], 0
jne 0x14004cfb2
mov eax, dword [rbp - 0x50]
add qword [rbx + 0xc8], rax
mov rax, qword [rsi + 8]
sub rax, qword [rsi]
cmp qword [rbx + 0xc8], rax
jne 0x14004cfa0
lea rax, [rbx + 0xd0]
mov qword [rbp - 0x48], rax
lea r14, [rax + 8]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [rbx + 0x120], 0
je 0x14004cf7c
mov rcx, qword [rbx + 0x110]
sub rcx, rdi
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]
add qword [rbx + 0x120], r15
jne 0x14004cf75
and qword [rbx + 0x118], 0
jmp 0x14004cf7c
add qword [rbx + 0x118], rdi
mov rax, qword [rsi]
mov qword [rsi + 8], rax
and qword [rbx + 0xc8], 0
cmp qword [rbx + 0x120], 0
setne dil
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbx + 0xa0]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov al, dil
jmp 0x14004cfec
mov ecx, dword [0x14019fd80]
lea r8d, [rcx + 2]
lea eax, [rcx + 1]
imul r8d, eax
imul r8d, ecx
mov eax, 0x2e8ba2e9
imul r8d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xb
sub r8d, edx
cmp r8d, 8
jne 0x14004cfea
sub dword [0x1401a13d8], edi
xor al, al
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret