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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a25f0
mov eax, dword fs:[0]
push eax
sub esp, 0xcc
mov eax, dword [0x100a80a4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0xb8], edi
push 0
push 0
push 0
push 0
push 0
push dword [edi + 4]
mov dword [ebp - 0xd0], edi
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
jne 0x100476fb
mov ecx, edi
call fcn.100475f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.100a1500
mov esp, ebp
pop ebp
ret
cmp byte [edi + 0x38], 0
jne 0x1004774f
mov eax, dword [edi]
push 1
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x100ae518]
mov ecx, edi
call esi
mov eax, dword [edi + 0x34]
mov ecx, edi
inc dword [edi + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x20], 0x10
mov dword [ebp - 0x24], 1
call fcn.100471e0
mov eax, dword [edi]
push 0
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x100ae518]
mov ecx, edi
call esi
mov dword [ebp - 4], 0
lea esi, [ebp - 0xa4]
mov eax, 0x80
mov dword [ebp - 0xb0], esi
mov dword [ebp - 0xac], 0
mov dword [ebp - 0xa8], eax
mov byte [ebp - 4], 1
jmp 0x10047780
cmp eax, 8
jae 0x100477e7
push 0x28
call fcn.1000efa0
mov edx, eax
add esp, 4
test edx, edx
je 0x10047978
and eax, 0x1f
mov ecx, 0x20
sub ecx, eax
mov dword [edx + ecx - 4], ecx
push dword [ebp - 0xac]
push dword [ebp - 0xb0]
lea esi, [edx + ecx]
push esi
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0xb0]
lea eax, [ebp - 0xa4]
add esp, 0xc
cmp ecx, eax
je 0x100477e1
test ecx, ecx
je 0x100477e1
sub ecx, dword [ecx - 4]
je 0x100477e1
push ecx
call fcn.1000efc0
add esp, 4
mov dword [ebp - 0xb0], esi
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xac], 8
push eax
lea eax, [ebp - 0xd8]
push eax
lea eax, [ebp - 0xb4]
push eax
push 8
push esi
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x10047993
mov eax, dword [ebp - 0xb4]
cmp eax, dword [ebp - 0xac]
jae 0x1004785f
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xa4]
mov eax, dword [ebp - 0xb0]
cmp eax, ecx
je 0x100476df
test eax, eax
je 0x100476df
sub eax, dword [eax - 4]
je 0x100476df
push eax
call fcn.1000efc0
add esp, 4
jmp 0x100476df
mov ebx, dword [ebp - 0xb0]
mov esi, dword [ebx + 4]
cmp esi, dword [ebp - 0xa8]
jbe 0x100478ee
test esi, esi
je 0x100479bc
lea eax, [esi + 0x20]
test eax, eax
je 0x10047894
push eax
call fcn.1000efa0
mov edx, eax
add esp, 4
test edx, edx
je 0x100479bc
jmp 0x10047896
xor edx, edx
mov eax, edx
mov ecx, 0x20
and eax, 0x1f
sub ecx, eax
mov dword [edx + ecx - 4], ecx
lea ebx, [edx + ecx]
test ebx, ebx
je 0x100479bc
push dword [ebp - 0xac]
push dword [ebp - 0xb0]
push ebx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0xb0]
lea eax, [ebp - 0xa4]
add esp, 0xc
cmp ecx, eax
je 0x100478e8
test ecx, ecx
je 0x100478e8
sub ecx, dword [ecx - 4]
je 0x100478e8
push ecx
call fcn.1000efc0
add esp, 4
mov dword [ebp - 0xb0], ebx
mov dword [ebp - 0xac], esi
cmp esi, 8
jb 0x100479d7
xor edi, edi
nop
cmp edi, esi
jae 0x1004793f
push 0
lea ecx, [ebp - 0xb4]
sub esi, edi
push ecx
push esi
lea eax, [ebx + edi]
push eax
mov eax, dword [ebp - 0xb8]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100479f2
add edi, dword [ebp - 0xb4]
mov esi, dword [ebp - 0xac]
mov ebx, dword [ebp - 0xb0]
jmp 0x10047900
mov edi, dword [ebp - 0xb8]
push ebx
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100ae518]
mov ecx, edi
call esi
mov eax, dword [ebp - 0xa8]
mov esi, dword [ebp - 0xb0]
jmp 0x10047780
push 0x100a7210
lea eax, [ebp - 0xbc]
mov dword [ebp - 0xbc], 0x8007000e
push eax
call sub.msvcrt.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100479a5
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xc0]
push 0x100a7210
push eax
call sub.msvcrt.dll__CxxThrowException
push 0x100a7210
lea eax, [ebp - 0xc4]
mov dword [ebp - 0xc4], 0x8007000e
push eax
call sub.msvcrt.dll__CxxThrowException
push 0x100a7210
lea eax, [ebp - 0xc8]
mov dword [ebp - 0xc8], 0x80004005
push eax
call sub.msvcrt.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10047a04
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xcc], eax
lea eax, [ebp - 0xcc]
push 0x100a7210
push eax
call sub.msvcrt.dll__CxxThrowException
int3