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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x180
mov dword [ebp - 0x24], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x52b848
mov dword [ebp - 0x18], 0x4b6368
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
mov edx, dword fs:[0]
mov dword [ebp - 0x1c], edx
mov dword fs:[0], ecx
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor esi, esi
cmp eax, 0xffffffff
je 0x463509
mov edi, eax
lea ebx, [ebp - 0x30]
lea eax, [ebp - 0x94]
push 0
push ebx
push 0x40
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x463502
cmp dword [ebp - 0x30], 0x40
jne 0x463502
movzx eax, word [ebp - 0x94]
cmp eax, 0x5a4d
jne 0x463502
push 0
push 0
push dword [ebp - 0x58]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x58]
jne 0x463502
lea eax, [ebp - 0x18c]
push 0
push ebx
push 0xf8
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x463502
cmp dword [ebp - 0x30], 0xf8
jne 0x463502
cmp dword [ebp - 0x18c], 0x4550
jne 0x463502
cmp word [ebp - 0x186], 0
je 0x463502
mov eax, dword [ebp - 0x104]
test eax, eax
je 0x463502
mov dword [ebp - 0x2c], eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x463502
push 0
push 0
push 0
push edi
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push ebx
push dword [ebp - 0x30]
mov ebx, dword [ebp - 0x28]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4634f4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], 0
add ecx, ebx
mov dword [ebp - 0x34], ecx
call fcn.00463600
mov edx, dword [ebp - 0x28]
xor esi, esi
movzx ecx, word [eax + edx + 0xe]
movzx ebx, word [eax + edx + 0xc]
mov edi, edx
add ebx, ecx
je 0x4635ab
add eax, edi
lea ecx, [eax + 0x14]
jmp 0x4634b0
dec ebx
add ecx, 8
test ebx, ebx
je 0x4635ab
mov edx, dword [ecx - 4]
test edx, edx
js 0x4634a4
cmp dx, 0xa
jne 0x4634a4
mov ebx, 0x7fffffff
and ebx, dword [ecx]
movzx edx, word [ebx + eax + 0xe]
movzx ecx, word [ebx + eax + 0xc]
add ecx, edx
je 0x4635ab
add ebx, eax
add ebx, 0x14
movzx edx, word [ebx - 4]
cmp edx, 0x360
je 0x46351f
dec ecx
add ebx, 8
test ecx, ecx
jne 0x4634db
jmp 0x4635ab
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x180
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebx]
mov edx, ecx
and edx, 0x7fffffff
test ecx, ecx
lea ecx, [edx + eax + 0x14]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
cmovns ecx, ebx
mov ecx, dword [ecx]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0x58], 0
mov dword [ecx + 0x98], 0
mov dword [ecx + 0x9c], 0
mov dword [ebp - 0x50], 0x18
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x10], 0
call fcn.00463600
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x44], eax
mov eax, dword [ecx + edx + 4]
mov dword [ebp - 0x3c], eax
mov edx, dword [ecx + edx]
mov ecx, dword [ebp - 0x34]
call fcn.00463600
mov ecx, dword [ebp - 0x28]
add ecx, eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x40], ecx
push eax
call fcn.00463680
add esp, 4
mov esi, eax
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x10], 0xffffffff
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x463509