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

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x8c0
mov qword [rax - 0x868], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14003c008]
xor rax, rsp
mov qword [rsp + 0x8b0], rax
mov r14, rcx
test rcx, rcx
jne 0x140001148
lea eax, [rcx + 8]
jmp 0x140001497
mov qword [rsp + 0x50], rcx
xor edi, edi
cmp dword [rcx + 0x1c], edi
jne 0x14000115a
mov rsi, qword [rcx + 0x48]
jmp 0x14000115d
mov rsi, rdi
mov qword [rsp + 0x58], rsi
mov r12, qword [rcx + 0x10]
mov qword [rsp + 0x48], r12
mov ebx, dword [rcx]
mov dword [rsp + 0x30], ebx
mov r13, qword [rcx + 0xe0]
mov qword [rsp + 0x70], r13
nop dword [rax]
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140001495
mov dword [rsp + 0x44], edi
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
xor edx, edx
mov r8d, 0x400
lea rcx, [rsp + 0xa0]
call fcn.1400148f0
mov qword [rsp + 0x4a0], 0
xor edx, edx
mov r8d, 0x404
lea rcx, [rsp + 0x4a8]
call fcn.1400148f0
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test ebx, ebx
je 0x14000128a
test r13, r13
je 0x14000128a
mov dword [rsp + 0x38], edi
lea rdx, [rsp + 0x38]
mov rcx, rsi
call r13
test eax, eax
je 0x14000128a
cmp ebx, dword [rsp + 0x38]
je 0x14000128a
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x4a0], eax
mov dword [rsp + 0x4a4], 0xfffffffa
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x44]
mov r8d, 0x410
lea rdx, [rsp + 0x90]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, 0x40c
lea rdx, [rsp + 0x4a0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x140001180
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x44]
mov r8d, 0x410
lea rdx, [rsp + 0x90]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000127c
cmp dword [rsp + 0x44], 0x410
jne 0x1400014c4
mov ecx, dword [rsp + 0x90]
test ecx, ecx
je 0x140001438
cmp ecx, 3
je 0x14000143b
cmp dword [rsp + 0x9c], 0x400
ja 0x140001438
mov dword [rsp + 0x38], ecx
lea r15, [r14 + 0x20]
mov qword [rsp + 0x78], r15
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r9, qword [r14 + 0x60]
mov r8, r9
mov rcx, qword [r9 + 8]
mov rax, rcx
cmp byte [rcx + 0x19], 0
jne 0x1400013e2
mov edx, dword [rsp + 0x38]
cmp dword [rax + 0x20], edx
jae 0x140001323
mov rax, qword [rax + 0x10]
jmp 0x140001329
mov r8, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140001318
cmp r8, r9
je 0x1400013e2
cmp edx, dword [r8 + 0x20]
jb 0x1400013e2
mov rbx, r9
cmp dword [rcx + 0x20], edx
jae 0x140001350
mov rcx, qword [rcx + 0x10]
jmp 0x140001356
mov rbx, rcx
mov rcx, qword [rcx]
cmp byte [rcx + 0x19], 0
je 0x140001345
cmp rbx, r9
je 0x140001366
cmp edx, dword [rbx + 0x20]
jae 0x14000139d
lea rax, [rsp + 0x38]
mov qword [rsp + 0x60], rax
lea r8, [rsp + 0x60]
lea rcx, [r14 + 0x60]
call fcn.140002d70
lea r9, [rax + 0x20]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rsp + 0x68]
lea rcx, [r14 + 0x60]
call fcn.140002da0
mov rbx, qword [rsp + 0x68]
mov rax, qword [rbx + 0x28]
test rax, rax
je 0x1400013de
mov r8, r14
lea rdx, [rsp + 0x4a0]
lea rcx, [rsp + 0x90]
call rax
nop
mov ebx, dword [rsp + 0x30]
jmp 0x1400013fb
mov ebx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x90]
mov dword [rsp + 0x4a0], eax
mov dword [rsp + 0x4a4], 0xffffffff
mov r12, qword [rsp + 0x48]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, 0x40c
lea rdx, [rsp + 0x4a0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x140001180
cmp ecx, 3
sete bl
mov dword [rsp + 0x4a0], ecx
mov eax, 0xfffffffb
cmove eax, edi
mov dword [rsp + 0x4a4], eax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, 0x40c
lea rdx, [rsp + 0x4a0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
test bl, bl
mov ebx, dword [rsp + 0x30]
je 0x140001180
cmp byte [r14 + 0x18], 0
jne 0x140001180
xor eax, eax
mov rcx, qword [rsp + 0x8b0]
xor rcx, rsp
call fcn.1400127a0
lea r11, [rsp + 0x8c0]
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 + 0x90]
mov dword [rsp + 0x4a0], eax
mov dword [rsp + 0x4a4], 0xfffffffe
jmp 0x14000125b