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

Disassembly:
sub esp, 0x58
mov eax, dword [0x4c3014]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x5c]
push ebx
push ebp
mov dword [esp + 0x1c], eax
mov ebp, ecx
mov eax, dword [esp + 0x68]
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x70]
push edi
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
push ebp
mov dword [esp + 0x28], edx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x464ef9
mov eax, 0x200
jmp 0x4650c0
mov ebx, dword [esp + 0x30]
mov edi, 0x41000000
mov esi, ebx
mov eax, ebx
and esi, 1
mov ecx, esi
or ecx, 2
and al, 2
mov eax, ebx
cmove ecx, esi
mov edx, ecx
or edx, 4
and al, 4
cmove edx, ecx
mov ecx, ebx
and ecx, 0x10
mov eax, edx
or eax, 0x10
mov dword [esp + 0x14], ecx
test ecx, ecx
cmove eax, edx
mov edx, 0x81000000
mov ecx, eax
or ecx, 0x20
and bl, 0x20
cmove ecx, eax
mov eax, dword [esp + 0x14]
test eax, eax
cmove edi, edx
or edi, ecx
test esi, esi
jne 0x464f62
test eax, eax
mov edi, 0x41800000
mov edx, 0x81800000
cmove edi, edx
or edi, ecx
xor ebx, ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0x28
jbe 0x465010
push ebx
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebp
call ebx
push 0
lea eax, [esp + 0x1c]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0
push 0x24
push ebp
call ebx
push 0
lea eax, [esp + 0x1c]
push eax
push 4
lea eax, [esp + 0x20]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [esp + 0x10], ax
jne 0x465010
mov ecx, dword [esp + 0x14]
lea eax, [ecx + 0x34]
cmp esi, eax
jbe 0x465010
push 0
push 0
push ecx
push ebp
call ebx
push 0
lea eax, [esp + 0x1c]
push eax
push 4
lea eax, [esp + 0x28]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
cmp eax, 0x5a4d
je 0x46500a
cmp eax, 0x454e
je 0x46500a
cmp eax, 0x454c
je 0x46500a
cmp eax, 0x4550
jne 0x465010
or edi, 0x400000
mov eax, dword [esp + 0x20]
test eax, eax
je 0x46501a
mov dword [eax], edi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x465024
mov dword [eax], esi
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x46508e
mov ecx, dword [esp + 0x3c]
mov ebp, 0xd53e8000
mov eax, dword [esp + 0x40]
sub ecx, ebp
push 0
mov edi, 0x19db1de
mov esi, 0x989680
push esi
sbb eax, edi
push eax
push ecx
call fcn.004a0290
mov ecx, dword [esp + 0x44]
mov dword [ebx], eax
sub ecx, ebp
mov eax, dword [esp + 0x48]
push 0
push esi
sbb eax, edi
mov dword [ebx + 4], edx
push eax
push ecx
call fcn.004a0290
mov ecx, dword [esp + 0x34]
mov dword [ebx + 8], eax
sub ecx, ebp
mov eax, dword [esp + 0x38]
push 0
push esi
sbb eax, edi
mov dword [ebx + 0xc], edx
push eax
push ecx
call fcn.004a0290
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], edx
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x4650be
push dword [esp + 0x48]
lea edx, [esp + 0x18]
push dword [esp + 0x48]
lea ecx, [esp + 0x18]
call fcn.00464e40
movzx eax, word [esp + 0x1c]
pop ecx
pop ecx
movzx ecx, word [esp + 0x10]
shl ecx, 0x10
or ecx, eax
mov dword [esi], ecx
xor eax, eax
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047c71d
add esp, 0x58
ret