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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x778400]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x54ad01
mov eax, 0x200
jmp 0x54af17
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x54], 0
mov eax, dword [ebp - 0x58]
and eax, 1
je 0x54ad1f
mov ecx, dword [ebp - 0x54]
or ecx, 1
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x58]
and edx, 2
je 0x54ad30
mov eax, dword [ebp - 0x54]
or eax, 2
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x58]
and ecx, 4
je 0x54ad41
mov edx, dword [ebp - 0x54]
or edx, 4
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x58]
and eax, 0x10
je 0x54ad52
mov ecx, dword [ebp - 0x54]
or ecx, 0x10
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x58]
and edx, 0x20
je 0x54ad63
mov eax, dword [ebp - 0x54]
or eax, 0x20
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x58]
and ecx, 0x10
je 0x54ad79
mov edx, dword [ebp - 0x54]
or edx, 0x40000000
mov dword [ebp - 0x54], edx
jmp 0x54ad84
mov eax, dword [ebp - 0x54]
or eax, 0x80000000
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x54]
or ecx, 0x1000000
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x58]
and edx, 1
je 0x54ad9a
jmp 0x54ada5
mov eax, dword [ebp - 0x54]
or eax, 0x800000
mov dword [ebp - 0x54], eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0x28
jbe 0x54ae79
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x18]
push ecx
push 4
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx ecx, word [ebp - 0xc]
cmp ecx, 0x54ad
jne 0x54ae79
mov edx, dword [ebp - 0x1c]
add edx, 0x34
cmp dword [ebp - 0x5c], edx
jbe 0x54ae79
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x18]
push edx
push 4
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 8], 0x5a4d
je 0x54ae6d
cmp dword [ebp - 8], 0x454e
je 0x54ae6d
cmp dword [ebp - 8], 0x454c
je 0x54ae6d
cmp dword [ebp - 8], 0x4550
jne 0x54ae79
mov edx, dword [ebp - 0x54]
or edx, 0x400000
mov dword [ebp - 0x54], edx
cmp dword [ebp + 0xc], 0
je 0x54ae87
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x54]
mov dword [eax], ecx
cmp dword [ebp + 0x10], 0
je 0x54ae95
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x5c]
mov dword [edx], eax
cmp dword [ebp + 0x14], 0
je 0x54aee5
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call fcn.0054abd0
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0054abd0
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x4c]
push eax
call fcn.0054abd0
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], edx
cmp dword [ebp + 0x18], 0
je 0x54af15
lea edx, [ebp - 0x10]
push edx
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
call fcn.0054ac10
add esp, 0x10
movzx eax, word [ebp - 0x10]
movzx ecx, word [ebp - 0x14]
shl ecx, 0x10
or eax, ecx
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0066c98d
mov esp, ebp
pop ebp
ret