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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov esi, dword fs:[0x18]
sub esp, 0x54
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x400
mov dword [esp + 0x10], 0x400
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 3
mov dword [esp], str..PiPe_tests_pipe.c
call dword [sym.imp.kernel32.dll_CreateNamedPipeA]
mov ebx, eax
sub eax, 1
sub esp, 0x20
cmp eax, 0xfffffffd
jbe 0x507e73
cmp dword [esi + 0x34], 0x78
je 0x5083a0
call fcn.0057d110
lea esi, [ebp - 0x34]
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x5d7
mov eax, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.Bit_Bucket
mov dword [esp], ebx
mov dword [ebp - 0x38], eax
call eax
mov edx, eax
sub esp, 0x14
xor eax, eax
test edx, edx
jne 0x507ecf
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x218
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.WriteFile_to_not_yet_connected_pipe_n
call fcn.004f6800
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x5d9
lea eax, [ebp - 0x30]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x20
mov dword [esp], ebx
mov dword [ebp - 0x3c], eax
call eax
mov edx, eax
sub esp, 0x14
xor eax, eax
test edx, edx
jne 0x507f3a
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x218
sete al
movzx eax, al
mov dword [esp + 4], str.ReadFile_from_not_yet_connected_pipe_n
mov dword [esp], eax
call fcn.004f6800
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], str..PiPe_tests_pipe.c
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x5dd
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp + 4], str.CreateFile_failed_n
mov dword [esp], eax
call fcn.004f6800
mov edx, dword [sym.imp.kernel32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x50835c
mov eax, 0x5e6
call fcn.004f6080
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.Bit_Bucket
mov dword [esp], edi
mov eax, dword [ebp - 0x38]
call eax
sub esp, 0x14
mov dword [esp], eax
mov dword [esp + 4], str.WriteFile_n
call fcn.004f6800
mov eax, 0x5e7
call fcn.004f6080
mov dword [esp + 4], str.write_file_len_n
xor eax, eax
cmp dword [ebp - 0x34], 0xb
sete al
mov dword [esp], eax
call fcn.004f6800
mov eax, 0x5e8
call fcn.004f6080
mov ecx, dword [sym.imp.kernel32.dll_DisconnectNamedPipe]
mov dword [esp], ebx
mov dword [ebp - 0x40], ecx
call ecx
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.DisconnectNamedPipe_while_messages_waiting_n
call fcn.004f6800
mov eax, 0x5e9
call fcn.004f6080
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.Bit_Bucket
mov dword [esp], edi
mov eax, dword [ebp - 0x38]
call eax
mov edx, eax
sub esp, 0x14
xor eax, eax
test edx, edx
jne 0x5080a0
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xe9
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.WriteFile_to_disconnected_pipe_n
call fcn.004f6800
mov eax, 0x5eb
call fcn.004f6080
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.Bit_Bucket
mov dword [esp], ebx
mov eax, dword [ebp - 0x38]
call eax
mov edx, eax
sub esp, 0x14
xor eax, eax
test edx, edx
jne 0x5080fc
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xe9
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.WriteFile_to_disconnected_pipe_n
call fcn.004f6800
mov eax, 0x5ed
call fcn.004f6080
lea eax, [ebp - 0x30]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 8], 0x20
mov dword [esp + 4], eax
mov dword [esp], edi
mov eax, dword [ebp - 0x3c]
call eax
mov edx, eax
sub esp, 0x14
xor eax, eax
test edx, edx
jne 0x50815a
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xe9
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.ReadFile_from_disconnected_pipe_with_bytes_waiting_n
call fcn.004f6800
mov eax, 0x5f0
call fcn.004f6080
lea eax, [ebp - 0x30]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 8], 0x20
mov dword [esp + 4], eax
mov dword [esp], ebx
mov eax, dword [ebp - 0x3c]
call eax
mov edx, eax
sub esp, 0x14
xor eax, eax
test edx, edx
jne 0x5081b8
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xe9
sete al
movzx eax, al
mov dword [esp], eax
mov dword [esp + 4], str.ReadFile_from_disconnected_pipe_with_bytes_waiting_n
call fcn.004f6800
mov eax, 0x5f4
call fcn.004f6080
mov dword [esp], ebx
mov eax, dword [ebp - 0x40]
call eax
mov edx, eax
sub esp, 4
xor eax, eax
test edx, edx
jne 0x5081f8
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0xe9
sete al
movzx eax, al
mov dword [esp + 4], str.DisconnectNamedPipe_worked_twice_n
mov dword [esp], eax
call fcn.004f6800
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
sub esp, 8
mov esi, eax
mov eax, 0x5f7
call fcn.004f6080
xor eax, eax
cmp esi, 0x102
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.WaitForSingleObject_returned__lX_n
mov dword [esp], eax
call fcn.004f6800
lea eax, [ebp - 0x30]
mov dword [esp], edi
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.kernel32.dll_PeekNamedPipe]
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x38], eax
call eax
sub esp, 0x18
mov esi, eax
mov eax, 0x5fa
call fcn.004f6080
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test esi, esi
jne 0x5082a5
xor eax, eax
cmp ecx, 0xe9
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.PeekNamedPipe_returned__lx___lu__n
call fcn.004f6800
lea eax, [ebp - 0x30]
mov dword [esp], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x38]
call eax
sub esp, 0x18
mov esi, eax
mov eax, 0x5fd
call fcn.004f6080
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test esi, esi
jne 0x508316
xor eax, eax
cmp ecx, 0xe6
sete al
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.PeekNamedPipe_returned__lx___lu__n
call fcn.004f6800
mov eax, 0x5ff
call fcn.004f6080
mov edx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], edi
mov dword [ebp - 0x38], edx
call edx
sub esp, 4
mov dword [esp + 4], str.CloseHandle_n
mov dword [esp], eax
call fcn.004f6800
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x38], edx
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x602
mov dword [esp], ebx
mov edx, dword [ebp - 0x38]
call edx
sub esp, 4
mov dword [esp], eax
mov dword [esp + 4], str.CloseHandle_n
call fcn.004f6800
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x5d3
call fcn.004f6080
mov dword [esp], str.Named_pipes_are_not_implemented_n
call fcn.004f67d0
mov eax, 1
jmp 0x50838e