Function at 0x140001280
Capabilities:
Connect pipe
Read file on windows
Write file on windows
Write pipe

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x8a0
mov rax, qword [0x14003f040]
xor rax, rsp
mov qword [rsp + 0x890], rax
mov r14, rcx
test rcx, rcx
jne 0x1400012bc
lea eax, [rcx + 8]
jmp 0x1400015a1
mov qword [rsp + 0x48], rcx
xor edi, edi
cmp dword [rcx + 0x1c], edi
jne 0x1400012ce
mov rsi, qword [rcx + 0x48]
jmp 0x1400012d1
mov rsi, rdi
mov qword [rsp + 0x50], rsi
mov r13, qword [rcx + 0x10]
mov qword [rsp + 0x58], r13
mov r12d, dword [rcx]
mov dword [rsp + 0x40], r12d
mov r15, qword [rcx + 0xe0]
mov qword [rsp + 0x60], r15
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x14000159f
mov dword [rsp + 0x3c], edi
mov dword [rsp + 0x38], edi
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x80]
call fcn.14002dab0
mov qword [rsp + 0x480], 0
mov dword [rsp + 0x488], edi
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0x48c]
call fcn.14002dab0
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test r12d, r12d
je 0x140001400
test r15, r15
je 0x140001400
mov dword [rsp + 0x30], edi
lea rdx, [rsp + 0x30]
mov rcx, rsi
mov rax, r15
call qword [0x1400303a8]
test eax, eax
je 0x140001400
cmp r12d, dword [rsp + 0x30]
je 0x140001400
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x480], eax
mov dword [rsp + 0x484], 0xfffffffa
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x3c]
mov r8d, 0x410
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x38]
mov r8d, 0x40c
lea rdx, [rsp + 0x480]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x1400012f3
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x3c]
mov r8d, 0x410
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1400013f2
cmp dword [rsp + 0x3c], 0x410
jne 0x1400015ce
mov ecx, dword [rsp + 0x70]
test ecx, ecx
je 0x140001546
cmp ecx, 3
je 0x140001549
cmp dword [rsp + 0x7c], 0x400
ja 0x140001546
mov dword [rsp + 0x30], ecx
lea rbx, [r14 + 0x20]
mov qword [rsp + 0x68], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r8, qword [r14 + 0x60]
mov rax, qword [r8 + 8]
mov rcx, r8
mov edx, dword [rsp + 0x30]
cmp byte [rax + 0x19], 0
jne 0x140001497
nop
cmp dword [rax + 0x20], edx
jae 0x14000148b
mov rax, qword [rax + 0x10]
jmp 0x140001491
mov rcx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140001480
cmp byte [rcx + 0x19], 0
jne 0x1400014f8
cmp edx, dword [rcx + 0x20]
jb 0x1400014f8
cmp rcx, r8
je 0x1400014f8
lea rdx, [rsp + 0x30]
lea rcx, [r14 + 0x60]
call fcn.140002290
mov rax, qword [rax]
test rax, rax
je 0x1400014f8
mov r8, r14
lea rdx, [rsp + 0x480]
lea rcx, [rsp + 0x70]
call qword [0x1400303a8]
nop
jmp 0x14000150e
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x480], eax
mov dword [rsp + 0x484], 0xffffffff
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x38]
mov r8d, 0x40c
lea rdx, [rsp + 0x480]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x1400012f3
cmp ecx, 3
sete bl
mov dword [rsp + 0x480], ecx
mov eax, 0xfffffffb
cmove eax, edi
mov dword [rsp + 0x484], eax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x38]
mov r8d, 0x40c
lea rdx, [rsp + 0x480]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test bl, bl
je 0x1400012f3
cmp byte [r14 + 0x18], 0
jne 0x1400012f3
xor eax, eax
mov rcx, qword [rsp + 0x890]
xor rcx, rsp
call fcn.140013940
lea r11, [rsp + 0x8a0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x480], eax
mov dword [rsp + 0x484], 0xfffffffe
jmp 0x1400013d1