Function at 0x10060ea
Capabilities:
Read pipe
Write file on windows
Write pipe

Disassembly:
lea eax, [ebx + esi + 0x17]
and eax, 0xfffffffc
mov ecx, eax
sub ecx, ebx
mov dword [ebx + 0x10], ecx
mov ecx, dword [edi]
mov dword [eax], ecx
mov ecx, dword [edi + 4]
mov esi, dword [edi + 8]
lea edi, [eax + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1006191
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x1006f56
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
push esi
push edi
push dword [ebp + 8]
call ebx
mov edi, dword [ebp + 0x18]
test edi, edi
lea esi, [eax + eax + 2]
lea eax, [esi + 0x18]
pop ecx
mov dword [ebp - 8], eax
je 0x1006135
cmp dword [ebp + 0x14], 0x50
jne 0x10063a3
and dword [ebp - 4], 0
cmp dword [ebp + 0x1c], 0
ja 0x1006fd8
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x100de24
mov eax, dword [ebp + 0x14]
push dword [ebp + 8]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 8]
mov dword [ebx], eax
lea eax, [ebx + 0x14]
push eax
mov dword [ebx + 0xc], 0x14
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [ebp + 0x14]
cmp eax, 0xb
pop ecx
pop ecx
jb 0x1006191
cmp eax, 0xe
jbe 0x1005cb2
cmp eax, 0x4f
jbe 0x1006191
cmp eax, 0x51
ja 0x1006191
mov eax, dword [ebp + 0x1c]
test eax, eax
ja 0x100700e
push 0x101b2bc
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 0x14], 5
lea eax, [ebp - 0xc]
je 0x100de2c
mov edi, dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
mov esi, 0x101b2d8
push esi
push eax
push 8
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push ebx
push dword [ebp + 0x10]
call edi
test eax, eax
jne 0x100621c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
mov dword [ebp + 0x1c], eax
je 0x100de60
cmp dword [ebp + 0x1c], 0x3e5
jne 0x1006237
push dword [0x101b2d4]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x100de92
test eax, eax
jne 0x100621c
push 1
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x100deba
cmp dword [ebp - 0xc], 8
jne 0x100dec8
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x1006f5e
push 0x101b2bc
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x1c], 0
jne 0x100626d
mov ecx, dword [ebp + 0x14]
cmp ecx, 1
je 0x1006ffe
cmp ecx, 2
je 0x1006ffe
cmp ecx, 3
je 0x1006ffe
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
leave
ret 0x1c
cmp dword [ebp + 0x14], 0x51
je 0x1006127
mov ecx, dword [edi + 4]
lea eax, [eax + ecx + 8]
mov dword [ebp - 8], eax
jmp 0x1006135
and dword [eax], 0
jmp 0x10060fd
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
jmp 0x1006237
mov eax, dword [edi]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
call ebx
inc dword [ebp - 4]
pop ecx
mov ecx, dword [ebp - 8]
lea eax, [ecx + eax*2 + 6]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x1c]
jae 0x1006135
jmp 0x1006fd8
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x100dedc
jmp 0x100626d
and dword [ebp - 4], 0
mov edi, eax
lea esi, [ebx + esi + 0x17]
and esi, 0xfffffffc
mov eax, esi
sub eax, ebx
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 0x1c]
shl edi, 2
test eax, eax
mov dword [ebx + 8], eax
jbe 0x1006191
mov eax, dword [ebp + 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 4]
push dword [eax + ecx*4]
lea eax, [esi + edi]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x18]
mov dword [esi + eax*4], edi
mov ecx, dword [ecx]
push dword [ecx + eax*4]
call dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0xc
inc dword [ebp - 4]
lea edi, [edi + eax*2 + 2]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0x1c]
jae 0x1006191
jmp 0x1007033
push 8
pop eax
jmp 0x1006270
push 0x101b2d8
push eax
push dword [ebp - 8]
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100de57
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
mov dword [ebp + 0x1c], eax
jne 0x1006237
and dword [ebp + 0x1c], 0
jmp 0x1006237
push dword [ebp + 0x10]
call fcn.010130f1
push esi
lea eax, [ebp - 0xc]
push eax
push 8
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 8]
push ebx
push dword [ebp + 0x10]
call edi
test eax, eax
jne 0x100621c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x1c], eax
jmp 0x10061dd
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CancelIo]
push dword [ebp + 8]
push dword [0x101b2d4]
push 7
call fcn.0100633d
add esp, 0xc
mov dword [ebp + 0x1c], 0x41d
jmp 0x1006237
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x1c], eax
jmp 0x1006237
push 8
call fcn.0100633d
pop ecx
mov dword [ebp + 0x1c], 0x1f
jmp 0x1006237
cmp word [eax], 0
je 0x100626d
push ecx
push eax
push 0x1d
call fcn.010062c4
jmp 0x100626d