Function at 0x18005ff60
Capabilities:
Read file on windows
Read pipe
Write file on windows

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0xff60]
mov eax, 0x10060
call fcn.1800eaee0
sub rsp, rax
mov rax, qword [0x18019e008]
xor rax, rsp
mov qword [rbp + 0xff40], rax
mov eax, dword [rcx + 8]
mov r14, rdx
dec eax
mov rdi, rcx
test eax, 0xfffffffd
je 0x18005ffa4
xor al, al
jmp 0x180060383
mov qword [rsp + 0x10090], rbx
mov qword [rsp + 0x10050], r15
xor r15d, r15d
mov qword [rsp + 0x10058], rsi
nop
mov rbx, qword [rdi]
test rbx, rbx
je 0x1800602e2
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
je 0x1800602e2
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], r15
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x30], r15d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x1800602cd
cmp dword [rsp + 0x30], 8
jb 0x1800602e2
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x34]
mov r8d, 8
mov dword [rsp + 0x34], r15d
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x1800602cd
mov ecx, dword [rsp + 0x44]
test ecx, ecx
je 0x1800600d2
mov rbx, qword [rdi]
mov esi, ecx
test rbx, rbx
je 0x1800601ca
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
je 0x1800601ca
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], r15
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x30], r15d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x1800601b5
mov eax, dword [rsp + 0x30]
cmp rax, rsi
jb 0x1800601ca
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x34]
mov r8d, esi
mov dword [rsp + 0x34], r15d
lea rdx, [rsp + 0x48]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x1800601b5
mov eax, dword [rsp + 0x44]
mov byte [rsp + rax + 0x48], r15b
mov ecx, dword [rsp + 0x44]
mov eax, dword [rsp + 0x40]
sub eax, 1
je 0x1800602b9
sub eax, 1
je 0x180060226
sub eax, 1
je 0x180060156
cmp eax, 1
je 0x18005ffc0
lea rdx, [rdi + 0x64]
mov dword [rdi + 0x60], 2
lea r10, str.Bad_ipc_frame
mov rax, rdx
sub rax, rdi
lea rcx, [r10 - 0x64]
add rcx, rax
mov r8d, 1
sub r8, r10
mov r9, rdx
nop dword [rax]
nop word [rax + rax]
lea rax, [r8 + rcx]
cmp rax, 0x100
jae 0x18006032f
movzx eax, byte [rcx]
inc rcx
mov byte [r9], al
inc r9
cmp byte [rcx], r15b
jne 0x180060130
jmp 0x18006032f
mov ebx, ecx
mov dword [rsp + 0x40], 4
add rbx, 8
je 0x18005ffc0
mov rax, qword [rdi]
test rax, rax
je 0x1800601a8
mov rcx, qword [rax + 8]
cmp rcx, 0xffffffffffffffff
je 0x1800601a8
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], r15d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x1800601a8
cmp dword [rsp + 0x30], ebx
je 0x18005ffc0
mov rcx, rdi
call fcn.18005fe10
jmp 0x18005ffc0
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [rbx], r15b
mov qword [rbx + 8], 0xffffffffffffffff
lea rdx, [rdi + 0x64]
mov dword [rdi + 0x60], 2
lea r10, str.Partial_data_in_frame
mov rax, rdx
sub rax, rdi
lea rcx, [r10 - 0x64]
add rcx, rax
mov r8d, 1
sub r8, r10
mov r9, rdx
nop word [rax + rax]
lea rax, [r8 + rcx]
cmp rax, 0x100
jae 0x18006032f
movzx eax, byte [rcx]
inc rcx
mov byte [r9], al
inc r9
cmp byte [rcx], r15b
jne 0x180060200
jmp 0x18006032f
lea rdx, [rsp + 0x48]
mov rcx, r14
call fcn.1800603a0
mov rcx, r14
call fcn.18005e1e0
lea r8, [0x1800f24c5]
mov dword [rdi + 0x60], eax
lea rdx, str.message
mov rcx, r14
call fcn.18005e2b0
test rax, rax
je 0x180060293
movzx r8d, byte [rax]
lea rcx, [rdi + 0x64]
test r8b, r8b
je 0x180060290
mov rdx, rcx
sub rdx, rdi
sub rdx, 0x63
sub rax, rcx
cmp rdx, 0x100
jae 0x180060290
mov byte [rcx], r8b
inc rdx
movzx r8d, byte [rax + rcx + 1]
inc rcx
test r8b, r8b
jne 0x180060273
mov byte [rcx], r15b
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x18006034d
mov eax, dword [rdi + 8]
dec eax
test eax, 0xfffffffd
jne 0x18006034d
lea rdx, [rdi + 0x64]
jmp 0x180060347
lea rdx, [rsp + 0x48]
mov rcx, r14
call fcn.1800603a0
mov al, 1
jmp 0x18006036b
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [rbx], r15b
mov qword [rbx + 8], 0xffffffffffffffff
mov rax, qword [rdi]
cmp byte [rax], r15b
jne 0x180060369
lea rdx, [rdi + 0x64]
mov r8d, 1
lea r10, str.Pipe_closed
mov dword [rdi + 0x60], r8d
mov rax, rdx
lea rcx, [r10 - 0x64]
sub rax, rdi
mov r9, rdx
add rcx, rax
sub r8, r10
lea rax, [r8 + rcx]
cmp rax, 0x100
jae 0x18006032f
movzx eax, byte [rcx]
inc rcx
mov byte [r9], al
inc r9
cmp byte [rcx], r15b
jne 0x180060312
mov byte [r9], r15b
mov r8, qword [rdi + 0x18]
test r8, r8
je 0x18006034d
mov eax, dword [rdi + 8]
dec eax
test eax, 0xfffffffd
jne 0x18006034d
mov ecx, dword [rdi + 0x60]
call r8
mov rbx, qword [rdi]
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 8], 0xffffffffffffffff
mov byte [rbx], r15b
mov dword [rdi + 8], r15d
xor al, al
mov rsi, qword [rsp + 0x10058]
mov rbx, qword [rsp + 0x10090]
mov r15, qword [rsp + 0x10050]
mov rcx, qword [rbp + 0xff40]
xor rcx, rsp
call fcn.1800e99a0
add rsp, 0x10060
pop r14
pop rdi
pop rbp
ret