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

Disassembly:
sub esp, 0x434
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x1d4c0
push ebx
push 2
or esi, 0xffffffff
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
call fcn.00401c70
test eax, eax
jne 0x40185a
push 0xbb8
push 0x42a
push 0x20
call fcn.00401130
add esp, 0xc
call fcn.004017a0
call fcn.00401df0
call fcn.00402060
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 0xffffffff
je 0x401829
push esi
call edi
mov eax, dword [0x40be58]
test eax, eax
je 0x401835
push eax
call edi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401840
push eax
call edi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x401853
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add esp, 0x434
ret
push 0x1d4c0
push ebx
push 2
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
call fcn.004016a0
test eax, eax
push 0xbb8
je 0x4017fd
push ebx
push 2
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push 1
push ebx
call edi
cmp eax, ebx
mov dword [0x40be58], eax
je 0x40180c
push 0xbb8
push ebx
push 2
mov dword [esp + 0x20], eax
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
push ebx
push ebx
push 1
push ebx
call edi
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40180c
push 0xbb8
push ebx
push 2
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
push 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x40180c
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x40180c
mov ecx, dword [esp + 0x10]
push ebx
push ebx
push 1
push ecx
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x40180c
mov edx, dword [esp + 0x10]
push 0xbb8
push ebx
push 2
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], 1
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
lea eax, [esp + 0x34]
push eax
push 0x3e8
push ebx
push ebx
push 1
push 6
push 0x40000003
push 0x409208
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov esi, eax
push ebx
cmp esi, 0xffffffff
jne 0x401993
push 0x4091f8
call fcn.00401bd0
add esp, 8
jmp 0x40180c
push ebx
push 4
call fcn.00401130
add esp, 0xc
test eax, eax
je 0x40180c
mov ebp, dword [sym.imp.KERNEL32.dll_ResetEvent]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
push eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x30], eax
call ebp
lea edx, [esp + 0x1c]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x3e5
jne 0x401a04
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push 0
push eax
push 2
call ebx
cmp eax, 1
jne 0x40180c
xor ecx, ecx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
push eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x30], eax
call ebp
lea edx, [esp + 0x1c]
lea eax, [esp + 0x40]
push edx
push eax
lea ecx, [esp + 0x24c]
push 0x200
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401a66
call edi
cmp eax, 0x3e5
jne 0x401a66
push 0xffffffffffffffff
lea edx, [esp + 0x18]
push 0
push edx
push 2
call ebx
cmp eax, 1
jne 0x40180c
mov ecx, 0x80
xor eax, eax
lea edi, [esp + 0x44]
mov byte [esp + 0x244], 0
rep stosd dword es:[edi], eax
lea eax, [esp + 0x44]
lea ecx, [esp + 0x244]
push eax
push ecx
call fcn.004025d0
xor edx, edx
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], edx
add esp, 8
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x30], eax
call ebp
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x44]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x1c]
mov dword [esp + 0x30], ecx
lea ecx, [esp + 0x30]
push eax
push ecx
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401b0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x401b0f
push 0xffffffffffffffff
lea eax, [esp + 0x18]
push 0
push eax
push 2
call ebx
cmp eax, 1
jne 0x40180c
push esi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
jmp 0x4019b2