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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x511611
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax + 5], 0
je 0x5115e1
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 0x51144b
call sub.kernel32.dll_GetLastError
cmp eax, 0x6d
je 0x5115ca
push 0
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov edx, 0x51162c
mov eax, dword [ebp - 4]
call fcn.0051125c
jmp 0x5115ca
cmp dword [ebp - 8], 0
jbe 0x5115ca
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 0x511469
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
call fcn.00409d78
mov esi, eax
mov edx, esi
add edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
add eax, 0x24
xor ecx, ecx
call fcn.0040a424
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.00409e3c
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 0x5114e4
push 0
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov edx, 0x511670
mov eax, dword [ebp - 4]
call fcn.0051125c
jmp 0x5115ca
cmp dword [ebp - 0xc], 0
jbe 0x5115ca
mov edx, esi
add edx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
add eax, 0x24
xor ecx, ecx
call fcn.0040a424
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, ebx
call fcn.00511304
mov esi, eax
test esi, esi
je 0x511582
push ebp
lea eax, [ebp - 0x18]
push eax
mov ecx, esi
dec ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, 1
call fcn.0040a300
mov eax, dword [ebp - 0x18]
call fcn.00511350
pop ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
cmp byte [eax + esi - 1], 0xd
jne 0x51155d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
call fcn.00409d78
cmp esi, eax
jge 0x51155d
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
cmp byte [eax + esi], 0xa
jne 0x51155d
inc esi
mov eax, dword [ebp - 4]
add eax, 0x24
mov ecx, esi
mov edx, 1
call fcn.0040a368
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
mov edx, ebx
call fcn.00511304
mov esi, eax
test esi, esi
jne 0x511513
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 0x5115ca
mov eax, dword [ebp - 4]
mov byte [eax + 5], 0
mov eax, dword [ebp - 4]
add eax, 0x24
call fcn.00409864
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov edx, 0x5116a8
mov eax, dword [ebp - 4]
call fcn.0051125c
mov eax, dword [ebp - 4]
cmp byte [eax + 5], 0
jne 0x5115e1
mov eax, dword [ebp - 4]
lea edx, [eax + 0x14]
mov eax, dword [ebp - 4]
call fcn.00511244
test bl, bl
je 0x5115fb
mov eax, dword [ebp - 4]
cmp dword [eax + 0x24], 0
je 0x5115fb
push ebp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x24]
call fcn.00511350
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511618
lea eax, [ebp - 0x18]
call fcn.00409864
ret