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

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0x98
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x4280b4
mov eax, 0x1000000
jmp 0x4282fc
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x6c]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x4280cf
mov eax, 0x200
jmp 0x4282fc
push ebx
push esi
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov esi, dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea eax, [ebp + 0x28]
push eax
lea eax, [ebp - 0x24]
push eax
call esi
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp - 0x34]
push eax
call esi
push 8
lea eax, [ebp + 0x28]
push eax
lea eax, [ebp + 0x44]
push eax
call fcn.00472880
push 8
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp + 0x3c]
push eax
call fcn.00472880
mov esi, dword [ebp + 0x44]
mov edi, dword [ebp + 0x48]
lea eax, [ebp]
mov dword [ebp + 0x30], eax
add esp, 0x18
sub esi, dword [ebp + 0x3c]
lea eax, [ebp - 8]
sbb edi, dword [ebp + 0x40]
mov dword [ebp + 0x34], eax
lea eax, [ebp - 0x10]
mov dword [ebp + 0x38], eax
xor ebx, ebx
mov eax, dword [ebp + ebx*4 + 0x30]
push 8
push eax
lea eax, [ebp + 0x4c]
push eax
call fcn.00472880
mov eax, dword [ebp + 0x4c]
mov ecx, dword [ebp + 0x50]
sub eax, esi
mov dword [ebp + 0x5c], eax
push 8
lea eax, [ebp + 0x5c]
push eax
push dword [ebp + ebx*4 + 0x30]
sbb ecx, edi
mov dword [ebp + 0x60], ecx
call fcn.00472880
add esp, 0x18
inc ebx
cmp ebx, 3
jl 0x428141
mov ecx, dword [ebp - 0x14]
xor eax, eax
xor edi, edi
mov edx, ecx
inc eax
and edx, eax
mov dword [ebp + 0x60], edi
je 0x42818d
mov dword [ebp + 0x60], eax
test cl, 2
je 0x428196
or dword [ebp + 0x60], 2
test cl, 4
je 0x42819f
or dword [ebp + 0x60], 4
mov eax, ecx
and eax, 0x10
je 0x4281aa
or dword [ebp + 0x60], 0x10
test cl, 0x20
je 0x4281b3
or dword [ebp + 0x60], 0x20
cmp eax, edi
je 0x4281c0
or dword [ebp + 0x60], 0x40000000
jmp 0x4281c7
or dword [ebp + 0x60], 0x80000000
or dword [ebp + 0x60], 0x1000000
cmp edx, edi
jne 0x4281d9
or dword [ebp + 0x60], 0x800000
mov ebx, dword [ebp + 0x6c]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp + 0x50], eax
cmp eax, 0x28
jbe 0x42827b
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
push edi
push edi
push ebx
call esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp + 0x54]
push eax
push 2
lea eax, [ebp + 0x58]
push eax
push ebx
call edi
push 0
push 0
push 0x24
push ebx
call esi
push 0
lea eax, [ebp + 0x54]
push eax
push 4
lea eax, [ebp + 0x40]
push eax
push ebx
call edi
mov eax, 0x54ad
cmp word [ebp + 0x58], ax
jne 0x42827b
mov eax, dword [ebp + 0x40]
lea ecx, [eax + 0x34]
cmp dword [ebp + 0x50], ecx
jbe 0x42827b
push 0
push 0
push eax
push ebx
call esi
push 0
lea eax, [ebp + 0x54]
push eax
push 4
lea eax, [ebp + 0x48]
push eax
push ebx
call edi
mov eax, dword [ebp + 0x48]
cmp eax, 0x5a4d
je 0x428274
cmp eax, 0x454e
je 0x428274
cmp eax, 0x454c
je 0x428274
cmp eax, 0x4550
jne 0x42827b
or dword [ebp + 0x60], 0x400000
mov eax, dword [ebp + 0x70]
test eax, eax
je 0x428287
mov ecx, dword [ebp + 0x60]
mov dword [eax], ecx
mov eax, dword [ebp + 0x74]
test eax, eax
je 0x428293
mov ecx, dword [ebp + 0x50]
mov dword [eax], ecx
mov esi, dword [ebp + 0x78]
test esi, esi
je 0x4282cf
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.00428001
push dword [ebp + 4]
mov dword [esi], eax
push dword [ebp]
mov dword [esi + 4], edx
call fcn.00428001
push dword [ebp - 0xc]
mov dword [esi + 8], eax
push dword [ebp - 0x10]
mov dword [esi + 0xc], edx
call fcn.00428001
add esp, 0x18
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov esi, dword [ebp + 0x7c]
test esi, esi
je 0x4282f7
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx eax, word [ebp + 0x58]
movzx ecx, word [ebp + 0x60]
shl eax, 0x10
or eax, ecx
mov dword [esi], eax
pop edi
pop esi
xor eax, eax
pop ebx
add ebp, 0x64
leave
ret