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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x20], ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5be674
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 5], 0
je 0x5be642
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
push eax
call sub.kernel32.dll_PeekNamedPipe
cmp eax, 1
sbb eax, eax
inc eax
mov edx, dword [ebp - 4]
mov byte [edx + 5], al
mov eax, dword [ebp - 4]
cmp byte [eax + 5], 0
jne 0x5be488
call sub.kernel32.dll_GetLastError
cmp eax, 0x6d
je 0x5be62b
push 0
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x1c]
mov edx, 0x5be690
mov eax, dword [ebp - 4]
call fcn.005be290
jmp 0x5be62b
cmp dword [ebp - 8], 0
jbe 0x5be62b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0xc]
cmp eax, dword [ebp - 8]
jae 0x5be4a6
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x5be4b5
sub eax, 4
mov eax, dword [eax]
mov esi, eax
mov edx, esi
add edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
add eax, 0x24
xor ecx, ecx
call fcn.0040b410
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
add eax, 0x24
call fcn.0040ae34
add eax, esi
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
push eax
call sub.kernel32.dll_ReadFile
cmp eax, 1
sbb eax, eax
inc eax
mov edx, dword [ebp - 4]
mov byte [edx + 5], al
mov eax, dword [ebp - 4]
cmp byte [eax + 5], 0
jne 0x5be525
push 0
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x1c]
mov edx, 0x5be6d4
mov eax, dword [ebp - 4]
call fcn.005be290
jmp 0x5be62b
cmp dword [ebp - 0xc], 0
jbe 0x5be62b
mov edx, esi
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add eax, 0x24
xor ecx, ecx
call fcn.0040b410
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, ebx
call fcn.005be33c
mov esi, eax
test esi, esi
je 0x5be5e3
push ebp
lea eax, [ebp - 0x20]
push eax
mov ecx, esi
dec ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, 1
call fcn.0040b2f4
mov eax, dword [ebp - 0x20]
call fcn.005be38c
pop ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
cmp byte [eax + esi - 1], 0xd
jne 0x5be5a3
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x10], eax
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x5be59b
sub edi, 4
mov edi, dword [edi]
cmp edi, esi
setg byte [ebp - 0x11]
jmp 0x5be5a7
mov byte [ebp - 0x11], 0
cmp byte [ebp - 0x11], 0
je 0x5be5ba
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
cmp byte [eax + esi], 0xa
jne 0x5be5ba
inc esi
mov eax, dword [ebp - 4]
add eax, 0x24
mov ecx, esi
mov edx, 1
call fcn.0040b354
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, ebx
call fcn.005be33c
mov esi, eax
test esi, esi
jne 0x5be558
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
add dword [eax + 0xc], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 8]
jb 0x5be62b
mov eax, dword [ebp - 4]
mov byte [eax + 5], 0
mov eax, dword [ebp - 4]
add eax, 0x24
call fcn.0040a890
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
lea ecx, [ebp - 0x1c]
mov edx, 0x5be70c
mov eax, dword [ebp - 4]
call fcn.005be290
mov eax, dword [ebp - 4]
cmp byte [eax + 5], 0
jne 0x5be642
mov eax, dword [ebp - 4]
lea edx, [eax + 0x14]
mov eax, dword [ebp - 4]
call fcn.005be278
test bl, bl
je 0x5be65c
mov eax, dword [ebp - 4]
cmp dword [eax + 0x24], 0
je 0x5be65c
push ebp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
call fcn.005be38c
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5be67b
lea eax, [ebp - 0x20]
call fcn.0040a890
pop eax
jmp eax