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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [0x5daf20]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x4c]
mov edi, ecx
push eax
push edi
mov dword [ebp - 0x60], edx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x42177f
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00547a0a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4c]
xor esi, esi
mov edx, eax
and edx, 1
mov ecx, 1
cmovne esi, ecx
test al, 2
je 0x421798
or esi, 2
test al, 4
je 0x42179f
or esi, 4
mov ecx, eax
and ecx, 0x10
je 0x4217a9
or esi, 0x10
test al, 0x20
je 0x4217b0
or esi, 0x20
test ecx, ecx
je 0x4217bc
or esi, 0x40000000
jmp 0x4217c2
or esi, 0x80000000
or esi, 0x1000000
test edx, edx
jne 0x4217d2
or esi, 0x800000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x28
jbe 0x42187f
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x54]
push eax
push 2
lea eax, [ebp - 0x50]
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 - 0x54]
push eax
push 4
lea eax, [ebp - 0x68]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [ebp - 0x50], ax
jne 0x42187f
mov ecx, dword [ebp - 0x68]
lea eax, [ecx + 0x34]
cmp ebx, eax
jbe 0x42187f
push 0
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x54]
push eax
push 4
lea eax, [ebp - 0x64]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x64]
cmp eax, 0x5a4d
je 0x421879
cmp eax, 0x454e
je 0x421879
cmp eax, 0x454c
je 0x421879
cmp eax, 0x4550
jne 0x42187f
or esi, 0x400000
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x421888
mov dword [eax], esi
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x421891
mov dword [eax], ebx
mov ebx, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x34]
mov edi, dword [ebp - 0x38]
test ebx, ebx
je 0x421901
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
push 0
sub ecx, 0xd53e8000
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.0054e590
mov dword [ebx], eax
push 0
mov ecx, edi
sub ecx, 0xd53e8000
mov eax, esi
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.0054e590
mov ecx, dword [ebp - 0x48]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x44]
push 0
sub ecx, 0xd53e8000
push 0x989680
sbb eax, 0x19db1de
push eax
push ecx
call fcn.0054e590
mov dword [ebx + 8], eax
mov ebx, dword [ebp - 0x58]
test ebx, ebx
je 0x421960
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x5c]
push eax
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], esi
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x16]
and eax, 0xf
lea ecx, [ecx - 0x3c]
shl ecx, 4
or ecx, eax
mov eax, dword [ebp - 0x12]
shl ecx, 5
and eax, 0x1f
movzx edx, cx
mov ecx, dword [ebp - 0xe]
or edx, eax
mov eax, dword [ebp - 0x10]
shl eax, 6
and ecx, 0x3f
or ecx, eax
shl ecx, 5
movzx eax, cx
shl edx, 0x10
or edx, eax
mov eax, dword [ebp - 0xc]
add eax, eax
and eax, 0x1f
or edx, eax
mov dword [ebx], edx
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00547a0a
mov esp, ebp
pop ebp
ret