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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x100e6018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x48]
mov edi, ecx
push eax
push edi
mov dword [ebp - 0x4c], edx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x10064b1f
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100947be
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x48]
xor esi, esi
mov edx, eax
and edx, 1
mov ecx, 1
cmovne esi, ecx
test al, 2
je 0x10064b38
or esi, 2
test al, 4
je 0x10064b3f
or esi, 4
mov ecx, eax
and ecx, 0x10
je 0x10064b49
or esi, 0x10
test al, 0x20
je 0x10064b50
or esi, 0x20
test ecx, ecx
je 0x10064b5c
or esi, 0x40000000
jmp 0x10064b62
or esi, 0x80000000
or esi, 0x1000000
test edx, edx
jne 0x10064b72
or esi, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x28
jbe 0x10064c1f
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x10]
push eax
push 2
lea eax, [ebp - 8]
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 - 0x10]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 8], ax
jne 0x10064c1f
mov ecx, dword [ebp - 0xc]
lea eax, [ecx + 0x34]
cmp ebx, eax
jbe 0x10064c1f
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x14]
cmp eax, 0x5a4d
je 0x10064c19
cmp eax, 0x454e
je 0x10064c19
cmp eax, 0x454c
je 0x10064c19
cmp eax, 0x4550
jne 0x10064c1f
or esi, 0x400000
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x10064c28
mov dword [eax], esi
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x10064c31
mov dword [eax], ebx
mov ebx, dword [ebp - 0x54]
mov esi, dword [ebp - 0x30]
mov edi, dword [ebp - 0x34]
test ebx, ebx
je 0x10064caa
mov ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
push 0
sub ecx, 0xd53e8000
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.10097250
mov dword [ebx], eax
push 0
mov ecx, edi
sub ecx, 0xd53e8000
mov eax, esi
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
mov dword [ebx + 4], edx
call fcn.10097250
mov ecx, dword [ebp - 0x44]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x40]
push 0
sub ecx, 0xd53e8000
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
mov dword [ebx + 0xc], edx
call fcn.10097250
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov ebx, dword [ebp - 0x50]
test ebx, ebx
je 0x10064cd0
push esi
push edi
lea edx, [ebp - 0xc]
lea ecx, [ebp - 8]
call fcn.10064a50
movzx ecx, word [ebp - 8]
movzx eax, word [ebp - 0xc]
shl ecx, 0x10
add esp, 8
or ecx, eax
mov dword [ebx], ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.100947be
mov esp, ebp
pop ebp
ret