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

Disassembly:
sub esp, 0x80
mov eax, dword [0x5d3070]
xor eax, esp
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x84]
push ebx
mov ebx, dword [esp + 0x8c]
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x9c]
push edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x4fb62e
mov eax, 0x1000000
jmp 0x4fb834
lea eax, [esp + 0x38]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4fb648
mov eax, 0x200
jmp 0x4fb834
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x70]
push eax
call esi
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x80]
push eax
call esi
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
sbb ecx, dword [esp + 0x28]
sub dword [esp + 0x4c], eax
sbb dword [esp + 0x50], ecx
sub dword [esp + 0x44], eax
sbb dword [esp + 0x48], ecx
sub dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
mov edx, eax
sbb dword [esp + 0x40], ecx
xor esi, esi
and edx, 1
mov ecx, 1
cmovne esi, ecx
test al, 2
je 0x4fb6c1
or esi, 2
test al, 4
je 0x4fb6c8
or esi, 4
mov ecx, eax
and ecx, 0x10
je 0x4fb6d2
or esi, 0x10
test al, 0x20
je 0x4fb6d9
or esi, 0x20
mov eax, esi
or esi, 0x80000000
or eax, 0x40000000
test ecx, ecx
cmovne esi, eax
or esi, 0x1000000
test edx, edx
jne 0x4fb6fb
or esi, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 0x28
jbe 0x4fb7b1
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x30]
push eax
push 2
lea eax, [esp + 0x2c]
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, [esp + 0x30]
push eax
push 4
lea eax, [esp + 0x30]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [esp + 0x20], ax
jne 0x4fb7b1
mov ecx, dword [esp + 0x24]
lea eax, [ecx + 0x34]
cmp ebp, eax
jbe 0x4fb7b1
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x30]
push eax
push 4
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x30]
cmp eax, 0x5a4d
je 0x4fb7ab
cmp eax, 0x454e
je 0x4fb7ab
cmp eax, 0x454c
je 0x4fb7ab
cmp eax, 0x4550
jne 0x4fb7b1
or esi, 0x400000
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4fb7bb
mov dword [eax], esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4fb7c5
mov dword [eax], ebp
test ebx, ebx
je 0x4fb804
push dword [esp + 0x48]
push dword [esp + 0x48]
call fcn.004fb4f0
push dword [esp + 0x58]
mov dword [ebx], eax
push dword [esp + 0x58]
mov dword [ebx + 4], edx
call fcn.004fb4f0
push dword [esp + 0x50]
mov dword [ebx + 8], eax
push dword [esp + 0x50]
mov dword [ebx + 0xc], edx
call fcn.004fb4f0
add esp, 0x18
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4fb832
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx ecx, word [esp + 0x20]
movzx eax, word [esp + 0x24]
shl ecx, 0x10
or ecx, eax
mov dword [esi], ecx
xor eax, eax
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0053f778
add esp, 0x80
ret