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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
push esi
push edi
lea eax, [ebp - 0x60]
mov dword [ebp - 0x18], edx
mov edi, ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x100422b9
mov eax, 0x200
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x60]
xor esi, esi
mov edx, eax
mov ecx, 1
and edx, 1
cmovne esi, ecx
test al, 2
je 0x100422d2
or esi, 2
test al, 4
je 0x100422d9
or esi, 4
mov ecx, eax
and ecx, 0x10
je 0x100422e3
or esi, 0x10
test al, 0x20
je 0x100422ea
or esi, 0x20
test ecx, ecx
je 0x100422f6
or esi, 0x40000000
jmp 0x100422fc
or esi, 0x80000000
or esi, 0x1000000
test edx, edx
jne 0x1004230c
or esi, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x28
jbe 0x100423b9
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0xc]
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 - 0xc]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 8], ax
jne 0x100423b9
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + 0x34]
cmp ebx, eax
jbe 0x100423b9
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0xc]
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 0x100423b3
cmp eax, 0x454e
je 0x100423b3
cmp eax, 0x454c
je 0x100423b3
cmp eax, 0x4550
jne 0x100423b9
or esi, 0x400000
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x100423c2
mov dword [eax], esi
mov eax, dword [ebp + 8]
test eax, eax
je 0x100423cb
mov dword [eax], ebx
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 0x48]
mov ebx, dword [ebp - 0x4c]
test esi, esi
je 0x10042444
mov ecx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
sub ecx, 0xd53e8000
push 0
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.1004e330
mov dword [esi], eax
mov ecx, ebx
sub ecx, 0xd53e8000
mov dword [esi + 4], edx
push 0
mov eax, edi
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.1004e330
mov ecx, dword [ebp - 0x5c]
mov dword [esi + 8], eax
sub ecx, 0xd53e8000
mov eax, dword [ebp - 0x58]
push 0
push 0x989680
sbb eax, 0x19db1de
mov dword [esi + 0xc], edx
push eax
push ecx
call fcn.1004e330
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x100424a3
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x18], edi
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2a]
and eax, 0xf
lea ecx, [ecx - 0x3c]
shl ecx, 4
or ecx, eax
mov eax, dword [ebp - 0x26]
shl ecx, 5
and eax, 0x1f
movzx edx, cx
mov ecx, dword [ebp - 0x22]
or edx, eax
mov eax, dword [ebp - 0x24]
and ecx, 0x3f
shl eax, 6
or ecx, eax
shl edx, 0x10
shl ecx, 5
movzx eax, cx
or edx, eax
mov eax, dword [ebp - 0x20]
add eax, eax
and eax, 0x1f
or edx, eax
mov dword [esi], edx
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret