Function at 0x41fac0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x559410]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x41fb0f
mov eax, 0x200
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00453c72
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x38]
mov ecx, 1
push ebx
push esi
xor esi, esi
mov edx, eax
and edx, 1
cmovne esi, ecx
test al, 2
je 0x41fb2a
or esi, 2
test al, 4
je 0x41fb31
or esi, 4
mov ecx, eax
and ecx, 0x10
je 0x41fb3b
or esi, 0x10
test al, 0x20
je 0x41fb42
or esi, 0x20
test ecx, ecx
je 0x41fb4e
or esi, 0x40000000
jmp 0x41fb54
or esi, 0x80000000
or esi, 0x1000000
test edx, edx
jne 0x41fb64
or esi, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x28
jbe 0x41fc11
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 2
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 0x3c], ax
jne 0x41fc11
mov ecx, dword [ebp - 0x40]
lea eax, [ecx + 0x34]
cmp ebx, eax
jbe 0x41fc11
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x58]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x58]
cmp eax, 0x5a4d
je 0x41fc0b
cmp eax, 0x454e
je 0x41fc0b
cmp eax, 0x454c
je 0x41fc0b
cmp eax, 0x4550
jne 0x41fc11
or esi, 0x400000
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x41fc1a
mov dword [eax], esi
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x41fc23
mov dword [eax], ebx
mov ebx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
test ebx, ebx
je 0x41fc9c
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
sub ecx, 0xd53e8000
push 0
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.00455730
mov dword [ebx], eax
mov ecx, edi
sub ecx, 0xd53e8000
mov dword [ebx + 4], edx
push 0
mov eax, esi
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.00455730
mov ecx, dword [ebp - 0x34]
mov dword [ebx + 8], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x30]
push 0
push 0x989680
sbb eax, 0x19db1de
mov dword [ebx + 0xc], edx
push eax
push ecx
call fcn.00455730
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov ebx, dword [ebp - 0x50]
test ebx, ebx
je 0x41fcc4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x3c]
push eax
push esi
push edi
call fcn.0041fa40
movzx ecx, word [ebp - 0x3c]
add esp, 0x10
movzx eax, word [ebp - 0x40]
shl ecx, 0x10
or ecx, eax
mov dword [ebx], ecx
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
pop ebx
xor ecx, ebp
pop edi
call fcn.00453c72
mov esp, ebp
pop ebp
ret