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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x14], 0
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x10], 0
test edi, edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebx], 0
mov dword [ebx + 4], 0
je 0x6106b1e6
mov eax, dword [edi]
test eax, eax
jne 0x6106b280
call sym.cygwin1.dll___errno
mov dword [eax], 3
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x6106b270
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x6106b260
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x6106b250
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x6106b242
cld
mov ecx, 4
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [0x610ef740]
xor edx, edx
mov dword [eax + 0x1d0], edx
add eax, 0x1e4
mov dword [esp], eax
call sub.KERNEL32.dll_LeaveCriticalSection
sub esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6106b20d
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6106b206
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6106b1ff
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6106b1f8
mov dword [esp + 0xc], 0x40
lea eax, [ebp - 0x10]
mov dword [esp + 4], eax
lea eax, [ebp - 0x14]
mov dword [esp + 8], 0x610ef7a0
mov dword [esp], eax
call sub.KERNEL32.dll_CreatePipe
sub esp, 0x10
test eax, eax
jne 0x6106b2f0
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6106b2c6
mov edx, 0x1bf
mov eax, 0x61069fa0
call fcn.61022e70
jmp 0x6106b1f1
mov dword [esp + 0xc], 0x6106b17c
mov dword [esp + 8], 0x6106b140
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6106b2b2
mov dword [esp + 0xc], 0x40
lea eax, [ebp - 0x18]
mov dword [esp + 4], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 8], 0x610ef7a0
mov dword [esp], eax
call sub.KERNEL32.dll_CreatePipe
sub esp, 0x10
test eax, eax
jne 0x6106b34f
mov eax, dword [0x610f08a0]
test eax, eax
jne 0x6106b329
mov edx, 0x1c5
jmp 0x6106b2b7
mov dword [esp + 0xc], 0x6106b17c
mov dword [esp + 8], 0x6106b140
mov dword [esp + 4], 0x800
mov dword [esp], 0x610f089c
call fcn.6108fd50
jmp 0x6106b322
mov eax, dword [0x610ef740]
add eax, 0x1e4
mov dword [esp], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov edx, dword [0x610ef740]
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x1d4], eax
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0x1d8], eax
mov eax, dword [edi]
mov dword [edx + 0x1d0], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 4
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x6106b3ba
cmp dword [ebp - 0x20], 4
je 0x6106b3c4
mov edx, 0x1ce
jmp 0x6106b2b7
cmp dword [ebp + 0x10], 2
je 0x6106b5c5
xor ecx, ecx
mov edx, 0xffffffdd
mov eax, edi
call fcn.6108a4a0
xor esi, esi
test eax, eax
jne 0x6106b1f1
lea esi, [esi]
lea edi, [edi]
mov dword [esp], edi
call fcn.6106aaa0
mov byte [ebp - 0x2d], al
test al, al
je 0x6106b420
cmp esi, 0x270f
jg 0x6106b420
mov eax, dword [0x610ef740]
mov eax, dword [eax + 0x1d0]
test eax, eax
jle 0x6106b420
xor eax, eax
inc esi
call fcn.61055610
jmp 0x6106b3f0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x1c]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov dword [ebp - 0x1c], 0
sub esp, 4
cmp byte [ebp - 0x2d], 0
je 0x6106b1e6
mov eax, dword [0x610ef740]
mov eax, dword [eax + 0x1d0]
test eax, eax
js 0x6106b5b5
mov eax, dword [ebp + 0x10]
cmp eax, 1
je 0x6106b516
cmp eax, 2
je 0x6106b499
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x6106b219
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], 8
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
mov dword [ebp - 0x2c], eax
sub esp, 0x14
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 4
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
mov ecx, dword [ebp - 0x2c]
sub esp, 0x14
test ecx, ecx
je 0x6106b1f1
cmp dword [ebp - 0x20], 8
je 0x6106b478
call sym.cygwin1.dll___errno
mov dword [eax], 0x20
jmp 0x6106b1f1
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], 4
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x6106b54c
cmp dword [ebp - 0x20], 4
je 0x6106b556
mov edx, 0x202
jmp 0x6106b2b7
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call fcn.61054c10
mov dword [ebx], eax
mov esi, eax
mov dword [esp + 0x10], 0
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x6106b598
mov edi, dword [ebp - 0x20]
add esi, edi
jmp 0x6106b565
mov eax, esi
mov esi, dword [ebx]
sub eax, esi
cmp eax, dword [ebp - 0x28]
jne 0x6106b5ab
mov dword [ebx + 4], eax
jmp 0x6106b478
mov edx, 0x20b
jmp 0x6106b2b7
call sym.cygwin1.dll___errno
mov dword [eax], 0x58
jmp 0x6106b1f1
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x14]
mov dword [esp + 8], 4
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x6106b605
cmp dword [ebp - 0x20], 4
je 0x6106b3ce
mov edx, 0x1d9
jmp 0x6106b2b7