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

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
or eax, ecx
mov dword [ebp + 0x10], 0
jne 0x40b10d
mov al, byte [esi + 8]
test al, al
je 0x40b10d
mov edx, dword [esi + 4]
lea ecx, [ebp + 8]
push 0
push ecx
push 0
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x40b0f2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x40b0d2
mov ecx, dword [ebp + 0x14]
pop edi
pop esi
mov dword [ecx], eax
pop ebp
ret
call esi
add eax, 0xafc80
cmp eax, 0xafced
jne 0x40b0e5
mov eax, 0x1117e
mov ecx, dword [ebp + 0x14]
pop edi
pop esi
mov dword [ecx], 0
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
jne 0x40b107
mov edx, dword [ebp + 0x14]
pop edi
pop esi
mov dword [edx], eax
mov eax, 0xb
pop ebp
ret
cmp edi, eax
jbe 0x40b10d
mov edi, eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40b137
mov cl, byte [esi + 8]
test cl, cl
jne 0x40b137
mov ecx, dword [esi + 0x50]
mov dword [eax + 8], ecx
mov eax, dword [esi + 0x50]
mov edx, dword [esi + 0x54]
mov ecx, 0x20
call fcn.0040b810
mov edx, dword [esi + 0xc]
mov dword [edx + 0xc], eax
mov eax, dword [esi + 0xc]
mov edx, dword [ebp + 0xc]
push ebx
lea ecx, [ebp + 0x10]
push eax
mov eax, dword [esi + 4]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b15a
xor eax, eax
jmp 0x40b285
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x40b285
call edi
add eax, 0xafc80
cmp eax, 0xb0065
jne 0x40b24f
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
test ecx, ecx
jl 0x40b1a2
jg 0x40b192
test eax, eax
jbe 0x40b1a2
push 0
push 0x3e8
push ecx
push eax
call fcn.0040b590
jmp 0x40b1af
and eax, ecx
cmp eax, 0xffffffff
jne 0x40b1ad
or eax, eax
jmp 0x40b1af
xor eax, eax
mov ecx, dword [esi + 0xc]
push eax
mov edx, dword [ecx + 0x10]
push edx
call ebx
mov edi, eax
cmp edi, 0x80
je 0x40b182
test edi, edi
je 0x40b1f8
mov eax, dword [0x410960]
mov ebx, dword [esi + 4]
test eax, eax
jne 0x40b1eb
push eax
push str.CancelIo
push eax
call fcn.0040a940
add esp, 0xc
mov dword [0x410960], eax
test eax, eax
je 0x40b1f0
push ebx
call eax
jmp 0x40b1f8
push 1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 4]
lea eax, [ebp + 0x10]
push 1
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x40b214
xor eax, eax
jmp 0x40b285
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
je 0x40b285
call ebx
add eax, 0xafc80
cmp eax, 0xb0064
je 0x40b235
cmp eax, 0xb0063
jne 0x40b24f
cmp edi, 0x102
jne 0x40b24f
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
pop ebx
pop edi
mov eax, 0x11177
mov dword [ecx], edx
pop esi
pop ebp
ret
cmp eax, 0xafced
jne 0x40b268
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
pop ebx
pop edi
mov eax, 0x1117e
mov dword [ecx], edx
pop esi
pop ebp
ret
cmp eax, 0xafca6
jne 0x40b281
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
pop ebx
pop edi
mov eax, 0x1117e
mov dword [ecx], edx
pop esi
pop ebp
ret
test eax, eax
jne 0x40b2bd
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x40b29e
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
pop ebx
pop edi
mov eax, 0x1117e
mov dword [ecx], edx
pop esi
pop ebp
ret
mov edx, dword [esi + 0xc]
test edx, edx
je 0x40b2bd
mov dl, byte [esi + 8]
test dl, dl
jne 0x40b2bd
mov edx, dword [esi + 0x50]
add edx, ecx
mov ecx, dword [esi + 0x54]
adc ecx, 0
mov dword [esi + 0x50], edx
mov dword [esi + 0x54], ecx
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
pop ebx
pop edi
mov dword [ecx], edx
pop esi
pop ebp
ret