Function at 0x402c30
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 0x402cbd
mov al, byte [esi + 8]
test al, al
je 0x402cbd
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 0x402ca2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x402c82
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 0x402c95
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 0x402cb7
mov edx, dword [ebp + 0x14]
pop edi
pop esi
mov dword [edx], eax
mov eax, 0xb
pop ebp
ret
cmp edi, eax
jbe 0x402cbd
mov edi, eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x402ce7
mov cl, byte [esi + 8]
test cl, cl
jne 0x402ce7
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.0040acc0
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 0x402d0a
xor eax, eax
jmp 0x402e0e
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
je 0x402e0e
call edi
add eax, 0xafc80
cmp eax, 0xb0065
jne 0x402dd8
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
test ecx, ecx
jl 0x402d52
jg 0x402d42
test eax, eax
jbe 0x402d52
push 0
push 0x3e8
push ecx
push eax
call fcn.0040ab00
jmp 0x402d5f
and eax, ecx
cmp eax, 0xffffffff
jne 0x402d5d
or eax, eax
jmp 0x402d5f
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 0x402d32
test edi, edi
je 0x402d81
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 4]
lea ecx, [ebp + 0x10]
push 1
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x402d9d
xor eax, eax
jmp 0x402e0e
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
je 0x402e0e
call ebx
add eax, 0xafc80
cmp eax, 0xb0064
je 0x402dbe
cmp eax, 0xb0063
jne 0x402dd8
cmp edi, 0x102
jne 0x402dd8
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 0x402df1
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 0x402e0a
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 0x402e46
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jne 0x402e27
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 0x402e46
mov dl, byte [esi + 8]
test dl, dl
jne 0x402e46
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