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

Disassembly:
mov r11, rsp
push rbp
push rsi
push r12
push r14
sub rsp, 0x48
xor r12d, r12d
lea rax, [r11 + 0x20]
mov ebp, r8d
mov qword [r11 - 0x40], r12
mov rsi, rdx
mov qword [r11 - 0x48], rax
xor r9d, r9d
mov dword [r11 - 0x38], r12d
xor edx, edx
mov dword [r11 + 0x20], r12d
mov r8d, 0x10000
mov r14, rcx
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x140010582
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x40], r15
lea r15, [0x140076b30]
nop dword [rax]
mov eax, dword [rsp + 0x88]
test eax, eax
je 0x140010573
mov r8d, 0x10000
mov qword [rsp + 0x20], r12
cmp eax, r8d
lea r9, [rsp + 0x30]
mov rdx, r15
mov rcx, r14
cmovbe r8d, eax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140010573
mov edx, dword [rsp + 0x30]
test edx, edx
je 0x140010573
mov rax, r15
mov ecx, edx
nop dword [rax + rax]
cmp byte [rax], 1
jae 0x140010338
mov byte [rax], 0x3f
inc rax
sub rcx, 1
jne 0x140010330
cmp rdx, 0x10001
jae 0x14001058d
mov byte [rdx + r15], r12b
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [r15 + rbx], r12b
jne 0x140010360
mov eax, dword [rsi + 8]
mov edx, dword [rsi + 0xc]
lea edi, [rax + rbx]
cmp edx, edi
jg 0x140010387
add edx, edx
cmp edx, edi
jle 0x140010376
mov rcx, rsi
call fcn.14002fa70
mov eax, dword [rsi + 8]
movsxd rcx, eax
mov rdx, r15
add rcx, qword [rsi]
movsxd r8, ebx
inc r8
call fcn.140039e10
mov dword [rsi + 8], edi
cmp ebp, 1
jne 0x14001047a
mov ecx, ebp
call fcn.1400405b4
movzx ecx, byte [0x140076b30]
mov rdi, rax
mov rbx, r15
test cl, cl
je 0x14001040c
nop
lea rdx, [0x14006ac50]
mov rcx, rbx
call fcn.14003b930
mov r9, rdi
mov r8, rax
mov edx, 1
mov rcx, rbx
call fcn.14004a1c0
movzx edx, byte [rax + rbx]
lea rcx, [rax + rbx]
movzx eax, dl
cmp dl, 0xd
jne 0x1400103f6
movzx eax, byte [rcx + 1]
cmp dl, 0xd
lea rbx, [rcx + 1]
cmovne rbx, rcx
test al, al
jne 0x1400103c0
movzx ecx, byte [0x140076b30]
mov rdi, qword [0x140074c68]
test rdi, rdi
je 0x140010545
mov rbx, r15
test cl, cl
je 0x140010545
nop word [rax + rax]
lea rdx, [0x14006ac50]
mov rcx, rbx
call fcn.14003b930
mov r9, rdi
mov r8, rax
mov edx, 1
mov rcx, rbx
call fcn.14004a1c0
movzx edx, byte [rax + rbx]
lea rcx, [rax + rbx]
movzx eax, dl
cmp dl, 0xd
jne 0x140010466
movzx eax, byte [rcx + 1]
cmp dl, 0xd
lea rbx, [rcx + 1]
cmovne rbx, rcx
test al, al
jne 0x140010430
jmp 0x140010545
cmp ebp, 2
jne 0x140010545
mov ecx, ebp
call fcn.1400405b4
movzx ecx, byte [0x140076b30]
mov rdi, rax
mov rbx, r15
test cl, cl
je 0x1400104ec
nop dword [rax + rax]
lea rdx, [0x14006ac50]
mov rcx, rbx
call fcn.14003b930
mov r9, rdi
mov r8, rax
mov edx, 1
mov rcx, rbx
call fcn.14004a1c0
movzx edx, byte [rax + rbx]
lea rcx, [rax + rbx]
movzx eax, dl
cmp dl, 0xd
jne 0x1400104d6
movzx eax, byte [rcx + 1]
cmp dl, 0xd
lea rbx, [rcx + 1]
cmovne rbx, rcx
test al, al
jne 0x1400104a0
movzx ecx, byte [0x140076b30]
mov rdi, qword [0x140074c68]
test rdi, rdi
je 0x140010545
mov rbx, r15
test cl, cl
je 0x140010545
nop
lea rdx, [0x14006ac50]
mov rcx, rbx
call fcn.14003b930
mov r9, rdi
mov r8, rax
mov edx, 1
mov rcx, rbx
call fcn.14004a1c0
movzx edx, byte [rax + rbx]
lea rcx, [rax + rbx]
movzx eax, dl
cmp dl, 0xd
jne 0x140010536
movzx eax, byte [rcx + 1]
cmp dl, 0xd
lea rbx, [rcx + 1]
cmovne rbx, rcx
test al, al
jne 0x140010500
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], r12
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor edx, edx
mov r8d, 0x10000
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x1400102e0
mov rdi, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
mov r15, qword [rsp + 0x40]
add rsp, 0x48
pop r14
pop r12
pop rsi
pop rbp
ret
call fcn.14003618c
int3