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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x5f931c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4d4505
mov eax, 0x200
jmp 0x4d46b8
push ebx
mov ebx, dword [ebp - 0x38]
mov eax, ebx
push esi
mov esi, ebx
and esi, 1
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, ebx
mov eax, edx
or eax, 0x10
and ecx, 0x10
cmove eax, edx
mov edx, eax
or edx, 0x20
and bl, 0x20
mov ebx, 0x81000000
cmove edx, eax
test ecx, ecx
mov eax, 0x41000000
cmove eax, ebx
or edx, eax
mov dword [ebp - 0x3c], edx
test esi, esi
jne 0x4d4560
or edx, 0x800000
mov dword [ebp - 0x3c], edx
xor ebx, ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x28
jbe 0x4d4609
push ebx
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call ebx
push 0
lea eax, [ebp - 0x44]
push eax
push 2
lea eax, [ebp - 0x40]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push edi
call ebx
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x48]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 0x40], ax
jne 0x4d4609
mov ecx, dword [ebp - 0x48]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x4d4609
push 0
push 0
push ecx
push edi
call ebx
push 0
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x4c]
cmp eax, 0x5a4d
je 0x4d45ff
cmp eax, 0x454e
je 0x4d45ff
cmp eax, 0x454c
je 0x4d45ff
cmp eax, 0x4550
jne 0x4d4609
mov eax, dword [ebp - 0x3c]
or eax, 0x400000
jmp 0x4d460c
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x4d4615
mov dword [ecx], eax
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x4d461e
mov dword [eax], esi
mov ebx, dword [ebp - 0x58]
test ebx, ebx
je 0x4d4688
mov ecx, dword [ebp - 0x2c]
mov edi, 0x19db1de
mov eax, dword [ebp - 0x28]
sub ecx, 0xd53e8000
push 0
mov esi, 0x989680
sbb eax, edi
push esi
push eax
push ecx
call fcn.00536680
mov ecx, dword [ebp - 0x24]
mov dword [ebx], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x20]
push 0
push esi
sbb eax, edi
mov dword [ebx + 4], edx
push eax
push ecx
call fcn.00536680
mov ecx, dword [ebp - 0x34]
mov dword [ebx + 8], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x30]
push 0
push esi
sbb eax, edi
mov dword [ebx + 0xc], edx
push eax
push ecx
call fcn.00536680
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [ebp - 0x5c]
test esi, esi
je 0x4d46b4
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call fcn.004d5810
movzx ecx, word [ebp - 0x40]
add esp, 0x10
movzx eax, word [ebp - 0x3c]
shl ecx, 0x10
or ecx, eax
mov dword [esi], ecx
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.005364e2
leave
ret