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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff34
push ebx
push esi
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_GetFileType
cmp eax, 1
je 0x42f673
mov eax, 0x1000000
jmp 0x42f9bc
lea edx, [ebp - 0xa0]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.dll_GetFileInformationByHandle
test eax, eax
jne 0x42f691
mov eax, 0x200
jmp 0x42f9bc
lea edx, [ebp - 0xb0]
push edx
call sub.KERNEL32.dll_GetSystemTime
lea ecx, [ebp - 0xc0]
push ecx
call sub.KERNEL32.dll_GetLocalTime
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0xb0]
push edx
call sub.KERNEL32.dll_SystemTimeToFileTime
lea ecx, [ebp - 0x10]
push ecx
lea eax, [ebp - 0xc0]
push eax
call sub.KERNEL32.dll_SystemTimeToFileTime
mov dword [ebp - 0x28], 8
lea edx, [ebp - 0x28]
lea ecx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], 8
push ecx
call fcn.004cdc94
add esp, 8
mov eax, dword [eax]
lea edx, [ebp - 8]
lea ecx, [ebp - 0x18]
push eax
push edx
push ecx
call fcn.004cddfc
add esp, 0xc
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 8
push eax
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 8
push edx
call fcn.004cdc94
add esp, 8
mov ecx, dword [eax]
lea eax, [ebp - 0x10]
lea edx, [ebp - 0x20]
push ecx
push eax
push edx
call fcn.004cddfc
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
sbb edx, dword [ebp - 0x1c]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
mov ecx, dword [0x5096f8]
mov dword [ebp - 0xcc], ecx
mov ecx, dword [0x5096fc]
mov dword [ebp - 0xc8], ecx
mov ecx, dword [0x509700]
mov dword [ebp - 0xc4], ecx
lea eax, [ebp - 0x8c]
mov dword [ebp - 0xcc], eax
lea edx, [ebp - 0x94]
mov dword [ebp - 0xc8], edx
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0xc4], ecx
xor esi, esi
lea ebx, [ebp - 0xcc]
mov dword [ebp - 0x48], 8
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x44]
push eax
mov dword [ebp - 0x44], 8
push edx
call fcn.004cdc94
add esp, 8
mov ecx, dword [eax]
push ecx
mov eax, dword [ebx]
push eax
lea edx, [ebp - 0x40]
push edx
call fcn.004cddfc
mov eax, dword [ebp - 0x40]
add esp, 0xc
sub eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
sbb edx, dword [ebp - 0x34]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edx
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x58], 8
push ecx
lea eax, [ebp - 0x54]
mov dword [ebp - 0x54], 8
push eax
call fcn.004cdc94
add esp, 8
mov edx, dword [eax]
push edx
lea ecx, [ebp - 0x50]
push ecx
mov eax, dword [ebx]
push eax
call fcn.004cddfc
add esp, 0xc
inc esi
add ebx, 4
cmp esi, 3
jl 0x42f78d
mov eax, dword [ebp - 0xa0]
xor ebx, ebx
test al, 1
je 0x42f817
or ebx, 1
test al, 2
je 0x42f81e
or ebx, 2
test al, 4
je 0x42f825
or ebx, 4
mov edx, eax
and edx, 0x10
test edx, edx
je 0x42f831
or ebx, 0x10
test al, 0x20
je 0x42f838
or ebx, 0x20
test edx, edx
je 0x42f844
or ebx, 0x40000000
jmp 0x42f84a
or ebx, 0x80000000
or ebx, 0x1000000
test al, 1
jne 0x42f85a
or ebx, 0x800000
push 0
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_GetFileSize
mov esi, eax
cmp esi, 0x28
jbe 0x42f921
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_SetFilePointer
lea edx, [ebp - 0x5c]
push 0
push edx
lea ecx, [ebp - 0x5e]
push 2
push ecx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_ReadFile
push 0
push 0
push 0x24
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.dll_SetFilePointer
lea ecx, [ebp - 0x5c]
push 0
push ecx
lea eax, [ebp - 0x64]
push 4
push eax
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.dll_ReadFile
cmp word [ebp - 0x5e], 0x54ad
jne 0x42f921
mov ecx, dword [ebp - 0x64]
add ecx, 0x34
cmp esi, ecx
jbe 0x42f921
push 0
push 0
mov eax, dword [ebp - 0x64]
push eax
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.dll_SetFilePointer
lea ecx, [ebp - 0x5c]
push 0
push ecx
lea eax, [ebp - 0x68]
push 4
push eax
mov edx, dword [ebp + 8]
push edx
call sub.KERNEL32.dll_ReadFile
mov ecx, dword [ebp - 0x68]
cmp ecx, 0x5a4d
je 0x42f91b
mov eax, dword [ebp - 0x68]
cmp eax, 0x454e
je 0x42f91b
mov edx, dword [ebp - 0x68]
cmp edx, 0x454c
je 0x42f91b
mov ecx, dword [ebp - 0x68]
cmp ecx, 0x4550
jne 0x42f921
or ebx, 0x400000
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x42f92d
mov edx, dword [ebp + 0xc]
mov dword [edx], ebx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x42f939
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x42f98d
push dword [ebp - 0x90]
push dword [ebp - 0x94]
call fcn.0042f5c4
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
push dword [ebp - 0x88]
push dword [ebp - 0x8c]
call fcn.0042f5c4
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 4], eax
push dword [ebp - 0x98]
push dword [ebp - 0x9c]
call fcn.0042f5c4
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [edx + 8], eax
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x42f9ba
lea eax, [ebp - 0x6c]
push eax
lea edx, [ebp - 0x6a]
push edx
lea ecx, [ebp - 0x8c]
push ecx
call sub.KERNEL32.dll_FileTimeToDosDateTime
movzx edx, word [ebp - 0x6a]
movzx eax, word [ebp - 0x6c]
shl edx, 0x10
mov ecx, dword [ebp + 0x18]
or eax, edx
mov dword [ecx], eax
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret