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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a0
mov eax, dword [0x444600]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x80]
and dword [ebx + 0x1c], 0xfffdffff
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x294], edi
mov esi, edx
test eax, eax
je 0x41d3dd
call fcn.0041a910
mov esi, dword [esi + 0x10]
test esi, esi
jge 0x41d5cd
test dword [ebx + 0x1c], 0x100
je 0x41d61c
push dword [0x43c0ac]
push dword [0x43c0a8]
push esi
call dword [0x447eac]
mov ecx, ebx
mov edx, edi
call fcn.0041d380
pop ecx
jmp 0x41d61b
xor eax, eax
push eax
lea ecx, [ebp - 0x29c]
push ecx
push eax
push eax
push eax
push dword [ebx + 0x78]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x41d5dc
cmp dword [ebp - 0x29c], 0
je 0x41d5fd
xor edi, edi
cmp dword [ebx + 0x74], edi
je 0x41d52a
mov eax, dword [ebx + 0xd8]
or eax, dword [ebx + 0xdc]
jne 0x41d516
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 0x298]
push eax
push 0x10
lea eax, [ebp - 0x290]
push eax
push dword [ebx + 0x78]
call esi
test eax, eax
je 0x41d5dc
test byte [ebp - 0x290], 2
je 0x41d4f0
push edi
lea eax, [ebp - 0x298]
push eax
push 0x278
lea eax, [ebp - 0x280]
push eax
push dword [ebx + 0x78]
call esi
test eax, eax
je 0x41d5dc
push 0x274
call fcn.00423a63
lea edi, [ebx + 0xe4]
pop ecx
mov dword [edi], eax
test eax, eax
jne 0x41d4d2
push str.malloc
push 0xe
call fcn.0041fca8
pop ecx
pop ecx
mov edi, dword [edi]
mov ecx, 0x9d
lea esi, [ebp - 0x280]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x290]
and eax, 4
mov dword [ebx + 0xe8], eax
test byte [ebp - 0x290], 1
je 0x41d52a
mov eax, dword [ebp - 0x288]
mov dword [ebx + 0xd8], eax
mov eax, dword [ebp - 0x284]
mov dword [ebx + 0xdc], eax
jmp 0x41d5cd
mov eax, dword [ebx + 0xd8]
cmp dword [ebp - 0x29c], eax
jb 0x41d52a
mov dword [ebp - 0x29c], eax
push dword [ebp - 0x29c]
push ebx
call dword [ebx + 0x24]
pop ecx
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x298]
push eax
push edi
mov esi, edx
push esi
push dword [ebx + 0x78]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41d5dc
cmp dword [ebx + 0x74], 0
je 0x41d5b6
mov ecx, dword [ebp - 0x298]
lea eax, [ebx + 0xd8]
sub dword [eax], ecx
sbb dword [eax + 4], 0
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x41d58e
mov edx, dword [ebx + 0xe4]
neg edx
sbb edx, edx
and edx, 0xc
push edx
push esi
push edi
push ecx
push ebx
call eax
add esp, 0x14
jmp 0x41d59e
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x41d59e
push esi
push edi
push ecx
push ebx
call eax
add esp, 0x10
lea esi, [ebx + 0xe4]
mov eax, dword [esi]
test eax, eax
je 0x41d5c5
push eax
call fcn.00423946
and dword [esi], 0
pop ecx
jmp 0x41d5c5
push esi
push edi
push dword [ebp - 0x298]
push ebx
call dword [ebx + 0x28]
add esp, 0x10
cmp dword [ebp - 0x298], edi
jbe 0x41d5fd
test dword [ebx + 0x1c], 0x100
jne 0x41d417
jmp 0x41d5fd
push dword [0x43c0ac]
push dword [0x43c0a8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x294]
mov ecx, ebx
call fcn.0041d380
pop ecx
pop ecx
mov eax, dword [ebx + 0x1c]
test eax, 0x100
je 0x41d61c
test eax, 0x20000
jne 0x41d61c
push dword [ebp - 0x294]
mov esi, ebx
call fcn.0041ce5d
pop ecx
dec dword [ebx + 0x30]
test byte [ebx + 0x1c], 1
mov eax, dword [ebx + 0x30]
je 0x41d639
test eax, eax
jne 0x41d639
mov edx, dword [ebp - 0x294]
mov ecx, ebx
call fcn.0041af78
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00423324
leave
ret