Function at 0x4022f0
Capabilities:
Create pipe
Create two anonymous pipes
Read file on windows
Read pipe
Write file on windows
Write pipe

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40ec61
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x860
mov eax, dword [0x416004]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
xor eax, eax
mov dword [ebp - 0x858], eax
mov dword [ebp - 0x85c], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x86c], eax
mov dword [ebp - 0x868], eax
mov byte [ebp - 4], 1
push eax
mov dword [ebp - 0x81c], eax
mov dword [ebp - 0x820], eax
mov dword [ebp - 0x854], eax
mov dword [ebp - 0x850], eax
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x850]
mov dword [ebp - 0x824], 0xc
push eax
lea eax, [ebp - 0x854]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x40271f
mov edi, dword [ebp - 0x854]
mov eax, dword [ebp - 0x850]
push 1
push 1
push edi
mov dword [ebp - 0x85c], edi
mov dword [ebp - 0x860], edi
mov edi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov dword [ebp - 0x858], eax
mov dword [ebp - 0x864], eax
call edi
push 0
lea eax, [ebp - 0x824]
mov dword [ebp - 0x824], 0xc
push eax
lea eax, [ebp - 0x850]
mov dword [ebp - 0x81c], 0
push eax
lea eax, [ebp - 0x854]
mov dword [ebp - 0x820], 0
push eax
mov dword [ebp - 0x854], 0
mov dword [ebp - 0x850], 0
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x40271f
mov eax, dword [ebp - 0x854]
push 1
mov dword [ebp - 0x86c], eax
mov eax, dword [ebp - 0x850]
push 1
push eax
mov dword [ebp - 0x868], eax
call edi
push ecx
lea eax, [ebp - 0x86c]
push eax
lea edx, [ebp - 0x864]
call fcn.00401b20
mov edi, dword [ebp - 0x86c]
add esp, 8
test al, al
jne 0x402485
mov eax, dword [ebp - 0x860]
mov dword [ebp - 0x85c], eax
mov eax, dword [ebp - 0x864]
mov byte [ebp - 0x849], 0
mov dword [ebp - 0x858], eax
jmp 0x402703
cmp dword [esi + 0x14], 0x10
mov eax, dword [esi + 0x10]
jb 0x402490
mov esi, dword [esi]
push 0
lea ecx, [ebp - 0x854]
mov dword [ebp - 0x854], 0
push ecx
push eax
push esi
mov esi, dword [ebp - 0x864]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
je 0x4024c1
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x4024c7
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x860]
test eax, eax
je 0x4024d4
push eax
call esi
xor eax, eax
mov dword [ebp - 0x81c], 0xf
xor esi, esi
mov dword [ebp - 0x858], eax
xorps xmm0, xmm0
mov dword [ebp - 0x864], eax
movups xmmword [ebp - 0x830], xmm0
mov dword [ebp - 0x85c], esi
mov dword [ebp - 0x860], esi
mov dword [ebp - 0x820], eax
mov byte [ebp - 0x830], al
mov byte [ebp - 4], 2
mov esi, 0x800
jmp 0x402526
mov edi, dword [ebp - 0x86c]
push 0
lea eax, [ebp - 0x850]
mov dword [ebp - 0x850], 0
push eax
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x4026bf
mov eax, dword [ebp - 0x850]
test eax, eax
je 0x4026af
push 0
cmp eax, 0x800
lea ecx, [ebp - 0x850]
push ecx
cmova eax, esi
push eax
lea eax, [ebp - 0x818]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4026bf
mov eax, dword [ebp - 0x850]
cmp eax, 0xffffffff
je 0x4026bf
test eax, eax
je 0x4026af
push eax
lea eax, [ebp - 0x818]
mov dword [ebp - 0x838], 0
xorps xmm0, xmm0
mov dword [ebp - 0x834], 0
push eax
lea ecx, [ebp - 0x848]
movups xmmword [ebp - 0x848], xmm0
call fcn.00402900
mov byte [ebp - 4], 3
lea edx, [ebp - 0x848]
cmp dword [ebp - 0x834], 0x10
mov edi, dword [ebp - 0x848]
mov esi, dword [ebp - 0x820]
cmovae edx, edi
mov eax, dword [ebp - 0x81c]
mov ecx, dword [ebp - 0x838]
sub eax, esi
mov dword [ebp - 0x854], esi
push ecx
push edx
cmp ecx, eax
ja 0x402648
cmp dword [ebp - 0x81c], 0x10
lea eax, [esi + ecx]
mov dword [ebp - 0x820], eax
lea esi, [ebp - 0x830]
cmovae esi, dword [ebp - 0x830]
mov eax, dword [ebp - 0x854]
add eax, esi
push eax
call fcn.00405820
mov eax, dword [ebp - 0x838]
add esp, 0xc
mov ecx, dword [ebp - 0x854]
add eax, esi
mov byte [eax + ecx], 0
jmp 0x402667
mov byte [ebp - 0x870], 0
push dword [ebp - 0x870]
push ecx
lea ecx, [ebp - 0x830]
call fcn.00402990
mov edi, dword [ebp - 0x848]
mov byte [ebp - 4], 2
mov esi, 0x800
mov eax, dword [ebp - 0x834]
cmp eax, 0x10
jb 0x402520
lea ecx, [eax + 1]
mov eax, edi
cmp ecx, 0x1000
jb 0x4026a0
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40276a
push ecx
push edi
call fcn.00402e8b
add esp, 8
jmp 0x402520
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x402526
cmp dword [ebp - 0x820], 0
mov ecx, dword [ebp - 0x81c]
setne byte [ebp - 0x849]
cmp ecx, 0x10
jb 0x402703
mov edx, dword [ebp - 0x830]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4026f9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40276a
push ecx
push edx
call fcn.00402e8b
add esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x402710
push edi
call esi
mov eax, dword [ebp - 0x868]
test eax, eax
je 0x402726
push eax
call esi
jmp 0x402726
mov byte [ebp - 0x849], 0
mov eax, dword [ebp - 0x858]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x402739
push eax
call esi
mov eax, dword [ebp - 0x85c]
test eax, eax
je 0x402746
push eax
call esi
mov al, byte [ebp - 0x849]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00402e4d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00406162
int3