Function at 0x49c867
Capabilities:
Read file on windows
Read pipe

Disassembly:
push 0x248
mov eax, 0x5241c2
call fcn.004d8af2
mov edi, ecx
mov dword [ebp - 0x224], edi
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x218]
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x234], esi
mov dword [ebp - 0x238], eax
call fcn.0040687a
and dword [ebp - 4], 0
cmp byte [edi + 0x22d], 0
jne 0x49cb75
and dword [ebp - 0x220], 0
lea eax, [ebp - 0x220]
push 0
push eax
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x49cb38
push 0x200
lea eax, [ebp - 0x214]
push 0
push eax
call fcn.004d9f30
add esp, 0xc
mov eax, 0x1fe
cmp dword [ebp - 0x220], eax
mov esi, eax
cmovb esi, dword [ebp - 0x220]
push 0
test esi, esi
je 0x49ca60
and dword [ebp - 0x228], 0
lea eax, [ebp - 0x228]
push eax
push esi
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x234]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49cadf
cmp esi, dword [ebp - 0x228]
jne 0x49ca94
lea eax, [ebp - 0x214]
push eax
call fcn.004ddaa2
pop ecx
push eax
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp - 0x218]
call fcn.004d5d16
push 0
push 0xa
lea ecx, [ebp - 0x218]
call fcn.004aee68
jmp 0x49ca3f
push esi
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x218]
call fcn.0040452e
mov byte [ebp - 4], 4
lea ecx, [esi + 1]
mov eax, dword [ebp - 0x218]
mov eax, dword [eax - 0xc]
sub eax, ecx
push eax
push ecx
lea eax, [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x218]
call fcn.0040467c
lea eax, [ebp - 0x22c]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x218]
call fcn.00405d6e
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
call fcn.00407189
cmp byte [edi + 0x22d], 0
jne 0x49ca4c
mov edi, dword [ebp - 0x230]
push ecx
mov esi, esp
mov dword [ebp - 0x21c], esi
lea ecx, [edi - 0x10]
call fcn.004070e7
mov ecx, dword [ebp - 0x224]
add eax, 0x10
mov dword [esi], eax
lea eax, [ebp - 0x254]
push eax
call fcn.0049c741
mov ecx, dword [ebp - 0x24c]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 0
call fcn.00407189
push 0
push 0xa
lea ecx, [ebp - 0x218]
call fcn.004aee68
mov edi, dword [ebp - 0x224]
mov esi, eax
cmp esi, 0xffffffff
jne 0x49c978
jmp 0x49ca7c
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x230]
add ecx, 0xfffffff0
call fcn.00407189
jmp 0x49ca7c
push dword [ebp - 0x238]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x49cb75
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [edi + 0x22d], 0
jne 0x49cb75
mov esi, dword [ebp - 0x234]
jmp 0x49c8b5
push 0x4820
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x244]
call fcn.00406620
lea eax, [ebp - 0x244]
mov byte [ebp - 4], 3
push eax
mov ecx, ebx
call fcn.0040121b
mov ecx, dword [ebp - 0x23c]
add ecx, 0xfffffff0
call fcn.00407189
mov ecx, dword [ebp - 0x218]
add ecx, 0xfffffff0
jmp 0x49cb8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x481f
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x244]
call fcn.00406620
mov byte [ebp - 4], 2
lea eax, [ebp - 0x244]
mov ecx, ebx
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x23c]
lea ecx, [ecx - 0x10]
call fcn.00407189
jmp 0x49cb84
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x4817
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x244]
call fcn.00406620
mov byte [ebp - 4], 1
jmp 0x49cb1a
and dword [ebx], 0
lea ecx, [ebx + 8]
and dword [ebx + 4], 0
call fcn.0040687a
mov ecx, dword [ebp - 0x218]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, ebx
call fcn.004d8aa1
ret 0xc