Function at 0x4313a4
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 0x4313c7
mov eax, 0x1000000
jmp 0x431710
lea edx, [ebp - 0xa0]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.dll_GetFileInformationByHandle
test eax, eax
jne 0x4313e5
mov eax, 0x200
jmp 0x431710
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.004d2bc4
add esp, 8
mov eax, dword [eax]
lea edx, [ebp - 8]
lea ecx, [ebp - 0x18]
push eax
push edx
push ecx
call fcn.004d2d2c
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.004d2bc4
add esp, 8
mov ecx, dword [eax]
lea eax, [ebp - 0x10]
lea edx, [ebp - 0x20]
push ecx
push eax
push edx
call fcn.004d2d2c
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 [0x51b46c]
mov dword [ebp - 0xcc], ecx
mov ecx, dword [0x51b470]
mov dword [ebp - 0xc8], ecx
mov ecx, dword [0x51b474]
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.004d2bc4
add esp, 8
mov ecx, dword [eax]
push ecx
mov eax, dword [ebx]
push eax
lea edx, [ebp - 0x40]
push edx
call fcn.004d2d2c
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.004d2bc4
add esp, 8
mov edx, dword [eax]
push edx
lea ecx, [ebp - 0x50]
push ecx
mov eax, dword [ebx]
push eax
call fcn.004d2d2c
add esp, 0xc
inc esi
add ebx, 4
cmp esi, 3
jl 0x4314e1
mov eax, dword [ebp - 0xa0]
xor ebx, ebx
test al, 1
je 0x43156b
or ebx, 1
test al, 2
je 0x431572
or ebx, 2
test al, 4
je 0x431579
or ebx, 4
mov edx, eax
and edx, 0x10
test edx, edx
je 0x431585
or ebx, 0x10
test al, 0x20
je 0x43158c
or ebx, 0x20
test edx, edx
je 0x431598
or ebx, 0x40000000
jmp 0x43159e
or ebx, 0x80000000
or ebx, 0x1000000
test al, 1
jne 0x4315ae
or ebx, 0x800000
push 0
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_GetFileSize
mov esi, eax
cmp esi, 0x28
jbe 0x431675
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 0x431675
mov ecx, dword [ebp - 0x64]
add ecx, 0x34
cmp esi, ecx
jbe 0x431675
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 0x43166f
mov eax, dword [ebp - 0x68]
cmp eax, 0x454e
je 0x43166f
mov edx, dword [ebp - 0x68]
cmp edx, 0x454c
je 0x43166f
mov ecx, dword [ebp - 0x68]
cmp ecx, 0x4550
jne 0x431675
or ebx, 0x400000
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x431681
mov edx, dword [ebp + 0xc]
mov dword [edx], ebx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x43168d
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x4316e1
push dword [ebp - 0x90]
push dword [ebp - 0x94]
call fcn.00431318
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
push dword [ebp - 0x88]
push dword [ebp - 0x8c]
call fcn.00431318
add esp, 8
mov ecx, dword [ebp + 0x14]
mov dword [ecx + 4], eax
push dword [ebp - 0x98]
push dword [ebp - 0x9c]
call fcn.00431318
add esp, 8
mov edx, dword [ebp + 0x14]
mov dword [edx + 8], eax
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x43170e
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