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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, dword fs:[0x18]
sub esp, 0x48
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x14], 0x400
mov dword [esp + 0x10], 0x400
mov dword [esp + 0xc], 1
mov dword [esp + 8], 6
mov dword [esp + 4], 3
mov dword [esp], str..PiPe_tests_pipe.c
call dword [sym.imp.kernel32.dll_CreateNamedPipeA]
sub esp, 0x20
mov ebx, eax
mov eax, 0x31c
call fcn.004f6080
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateNamedPipe_failed_with__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
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 esi, eax
mov eax, 0x320
call fcn.004f6080
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFile_failed_with__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [ebp - 0x28], esi
lea esi, [ebp - 0x24]
mov dword [esp], eax
call fcn.004f6800
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x322
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0x7df7e0
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [ebp - 0x30], eax
call eax
sub esp, 0x14
mov dword [esp], eax
mov dword [esp + 4], str.WriteFile_n
call fcn.004f6800
mov eax, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x7df7e0
mov dword [ebp - 0x2c], eax
call eax
sub esp, 0x14
mov dword [ebp - 0x34], eax
call fcn.0057d110
mov edx, dword [ebp - 0x34]
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x325
xor eax, eax
mov ecx, dword [edi + 0x34]
test edx, edx
jne 0x4f723d
xor eax, eax
cmp ecx, 0xea
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.ReadFile_returned__x__lu__n
call fcn.004f6800
mov eax, 0x326
call fcn.004f6080
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], str.size___lu_n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x7df7e0
mov dword [esp], ebx
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0x14
mov edi, eax
mov eax, 0x32b
call fcn.004f6080
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x4f72ef
xor eax, eax
cmp ecx, 0xea
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.ReadFile_returned__x__lu__n
call fcn.004f6800
mov eax, 0x32c
call fcn.004f6080
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], str.size___lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
mov eax, 0x32d
call fcn.004f6080
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.Internal___Ix_n
cmp eax, 0x80000005
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
mov eax, 0x32e
call fcn.004f6080
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], str.InternalHigh___Ix_n
cmp eax, 1
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_DisconnectNamedPipe]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
sub esp, 4
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0xdeadbeef
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x7df7e0
mov dword [esp], ebx
mov eax, dword [ebp - 0x2c]
call eax
sub esp, 0x14
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x335
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test edi, edi
jne 0x4f740a
xor eax, eax
cmp ecx, 0xe9
sete al
mov dword [esp + 0xc], ecx
mov dword [esp], eax
mov dword [esp + 8], edi
mov dword [esp + 4], str.ReadFile_returned__x__lu__n
call fcn.004f6800
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x336
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], str.size___lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x337
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.Internal___Ix_n
cmp eax, 0x103
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
mov eax, 0x338
call fcn.004f6080
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], str.InternalHigh___Ix_n
cmp eax, 0xdeadbeef
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0xdeadbeef
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x7df7e0
mov dword [esp], ebx
mov eax, dword [ebp - 0x30]
call eax
sub esp, 0x14
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x33d
xor eax, eax
mov edx, dword fs:[0x18]
mov ecx, dword [edx + 0x34]
test esi, esi
jne 0x4f752b
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.ReadFile_returned__x__lu__n
call fcn.004f6800
mov eax, 0x33e
call fcn.004f6080
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], str.size___lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
mov eax, 0x33f
call fcn.004f6080
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.Internal___Ix_n
cmp eax, 0x103
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
call fcn.0057d110
mov dword [eax], 0x5ead94
mov dword [eax + 4], 0x340
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], str.InternalHigh___Ix_n
cmp eax, 0xdeadbeef
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.004f6800
mov dword [esp], ebx
mov ebx, dword [sym.imp.kernel32.dll_CloseHandle]
call ebx
mov eax, dword [ebp - 0x28]
sub esp, 4
mov dword [esp], eax
call ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret