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

Disassembly:
and dword [eax], 0
jmp 0x100d074
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
jmp 0x100d1ae
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]
jb 0x100c989
jmp 0x100d0ac
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100d1e4
jmp 0x100dfc0
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 0x100d108
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]
jb 0x100c9e3
jmp 0x100d108
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x100c8c9
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 0x100d0ac
cmp dword [ebp + 0x14], 0x50
jne 0x100d276
and dword [ebp - 4], 0
cmp dword [ebp + 0x1c], 0
ja 0x100c989
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
test ebx, ebx
je 0x100df08
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 0x100d108
cmp eax, 0xe
jbe 0x100d52a
cmp eax, 0x4f
jbe 0x100d108
cmp eax, 0x51
ja 0x100d108
mov eax, dword [ebp + 0x1c]
test eax, eax
ja 0x100c9be
push 0x101a2a8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 0x14], 5
lea eax, [ebp - 0xc]
je 0x100df10
mov edi, dword [sym.imp.KERNEL32.dll_TransactNamedPipe]
mov esi, 0x101a2c4
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 0x100d193
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
mov dword [ebp + 0x1c], eax
je 0x100df44
cmp dword [ebp + 0x1c], 0x3e5
jne 0x100d1ae
push dword [0x101a2c0]
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x100df76
test eax, eax
jne 0x100d193
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 0x100df9e
cmp dword [ebp - 0xc], 8
jne 0x100dfac
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0x1c], eax
mov eax, dword [ebp + 0x20]
test eax, eax
jne 0x100c8d1
push 0x101a2a8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 0x1c], 0
jne 0x100d1e4
mov ecx, dword [ebp + 0x14]
cmp ecx, 1
je 0x100c9ae
cmp ecx, 2
je 0x100c9ae
cmp ecx, 3
je 0x100c9ae
mov eax, dword [ebp + 0x1c]
pop edi
pop esi
pop ebx
leave
ret 0x1c
cmp dword [ebp + 0x14], 0x51
je 0x100d09e
mov ecx, dword [edi + 4]
lea eax, [eax + ecx + 8]
mov dword [ebp - 8], eax
jmp 0x100d0ac
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 0x100d108
push 8
pop eax
jmp 0x100d1e7
push 0x101a2c4
push eax
push dword [ebp - 8]
push ebx
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100df3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
mov dword [ebp + 0x1c], eax
jne 0x100d1ae
and dword [ebp + 0x1c], 0
jmp 0x100d1ae
push dword [ebp + 0x10]
call fcn.01012e80
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 0x100d193
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x1c], eax
jmp 0x100d154
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_CancelIo]
push dword [ebp + 8]
push dword [0x101a2c0]
push 7
call fcn.0100d30d
add esp, 0xc
mov dword [ebp + 0x1c], 0x41d
jmp 0x100d1ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x1c], eax
jmp 0x100d1ae
push 8
call fcn.0100d30d
pop ecx
mov dword [ebp + 0x1c], 0x1f
jmp 0x100d1ae
cmp word [eax], 0
je 0x100d1e4
push ecx
push eax
push 0x1d
call fcn.0100d294
jmp 0x100d1e4