Function at 0x40a3e0
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 0x40a46d
mov al, byte [esi + 8]
test al, al
je 0x40a46d
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 0x40a452
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x40a432
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 0x40a445
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 0x40a467
mov edx, dword [ebp + 0x14]
pop edi
pop esi
mov dword [edx], eax
mov eax, 0xb
pop ebp
ret
cmp edi, eax
jbe 0x40a46d
mov edi, eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40a497
mov cl, byte [esi + 8]
test cl, cl
jne 0x40a497
mov ecx, dword [esi + 0x48]
mov dword [eax + 8], ecx
mov eax, dword [esi + 0x48]
mov edx, dword [esi + 0x4c]
mov ecx, 0x20
call fcn.0040ab50
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]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
test eax, eax
mov dword [edx], ecx
jne 0x40a5fa
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
test eax, eax
jne 0x40a4d2
xor edi, edi
jmp 0x40a5a7
call ebx
mov edi, eax
add edi, 0xafc80
cmp edi, 0xb0065
jne 0x40a5d2
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
test ecx, ecx
jl 0x40a510
jg 0x40a4f8
test eax, eax
jbe 0x40a510
push 0
push 0x3e8
push ecx
push eax
call fcn.0040a880
push eax
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x10]
push ecx
jmp 0x40a51f
and eax, ecx
cmp eax, 0xffffffff
jne 0x40a577
mov edx, dword [esi + 0xc]
push eax
mov eax, dword [edx + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, eax
cmp edi, 0xffffffff
je 0x40a55f
test edi, edi
je 0x40a53f
cmp edi, 0x102
jne 0x40a573
mov edi, 0x11177
jmp 0x40a577
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]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
xor edi, edi
mov dword [edx], ecx
jmp 0x40a5a7
call ebx
test eax, eax
jne 0x40a569
xor edi, edi
jmp 0x40a5a7
call ebx
mov edi, eax
add edi, 0xafc80
test edi, edi
je 0x40a5a7
cmp dword [0x40f464], 0xe
jl 0x40a5a3
mov eax, dword [0x40f4d0]
mov ebx, dword [esi + 4]
test eax, eax
jne 0x40a5a0
push eax
push str.CancelIo
push eax
call fcn.00409ca0
add esp, 0xc
mov dword [0x40f4d0], eax
push ebx
call eax
test edi, edi
jne 0x40a5cb
mov eax, dword [esi + 0xc]
test eax, eax
je 0x40a5cb
mov al, byte [esi + 8]
test al, al
jne 0x40a5cb
mov eax, dword [ebp + 0x14]
mov edx, dword [esi + 0x48]
mov ecx, dword [eax]
mov eax, dword [esi + 0x4c]
add edx, ecx
adc eax, 0
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], eax
mov eax, edi
pop ebx
pop edi
pop esi
pop ebp
ret
cmp edi, 0xafced
jne 0x40a5e6
mov edi, 0x1117e
pop ebx
mov eax, edi
pop edi
pop esi
pop ebp
ret
cmp edi, 0xafca6
jne 0x40a5a3
mov edi, 0x1117e
pop ebx
mov eax, edi
pop edi
pop esi
pop ebp
ret
test ecx, ecx
jne 0x40a565
mov edi, 0x1117e
pop ebx
mov eax, edi
pop edi
pop esi
pop ebp
ret