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

Disassembly:
jmp 0x402f03
push 0x180
push 0x40c138
call fcn.0040be64
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x68], esi
push esi
push esi
push 3
push esi
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403025
push esi
lea eax, [ebp - 0x64]
push eax
push 0x40
lea eax, [ebp - 0x5c]
push eax
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
je 0x40301e
cmp dword [ebp - 0x64], 0x40
jne 0x40301e
mov eax, 0x5a4d
cmp word [ebp - 0x5c], ax
jne 0x40301e
push esi
push esi
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x20]
jne 0x40301e
push esi
lea eax, [ebp - 0x64]
push eax
push 0xf8
lea eax, [ebp - 0x190]
push eax
push ebx
call edi
test eax, eax
je 0x40301e
cmp dword [ebp - 0x64], 0xf8
jne 0x40301e
cmp dword [ebp - 0x190], 0x4550
jne 0x40301e
cmp word [ebp - 0x18a], si
je 0x40301e
mov eax, dword [ebp - 0x108]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x104]
mov dword [ebp - 0x70], ecx
cmp eax, esi
je 0x40301e
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x64], eax
push 4
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x60], eax
cmp eax, esi
je 0x40301e
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
lea eax, [ebp - 0x64]
push eax
push dword [ebp - 0x64]
push dword [ebp - 0x60]
push ebx
call edi
test eax, eax
jne 0x40302d
push 0x8000
push esi
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
call fcn.0040beac
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], esi
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x60]
lea edi, [ecx + eax]
mov ebx, dword [ebp - 0x74]
mov ecx, edi
call fcn.00402e95
add eax, dword [ebp - 0x60]
lea edx, [eax + 0x10]
movzx ecx, word [eax + 0xe]
movzx ebx, word [eax + 0xc]
add ecx, ebx
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x80], edx
mov ebx, ecx
dec ecx
mov dword [ebp - 0x78], ecx
test ebx, ebx
je 0x403141
test dword [edx], 0x80000000
jne 0x403152
cmp word [edx], 0xa
jne 0x403152
mov ecx, dword [edx + 4]
and ecx, 0x7fffffff
add ecx, eax
lea ebx, [ecx + 0x10]
movzx edx, word [ecx + 0xe]
movzx ecx, word [ecx + 0xc]
add edx, ecx
mov dword [ebp - 0x7c], edx
mov dword [ebp - 0x6c], ebx
mov ecx, edx
dec edx
mov dword [ebp - 0x7c], edx
test ecx, ecx
je 0x403141
mov ecx, 0x360
cmp word [ebx], cx
jne 0x40314a
mov ecx, dword [ebx + 4]
test ecx, ecx
jns 0x4030d4
and ecx, 0x7fffffff
add ecx, eax
mov esi, dword [ecx + 0x14]
add esi, eax
jmp 0x4030d7
lea esi, [ecx + eax]
xor eax, eax
mov dword [edi + 0x58], eax
mov dword [edi + 0x98], eax
mov dword [edi + 0x9c], eax
mov dword [ebp - 0x98], 0x18
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x94], eax
mov ebx, dword [ebp - 0x74]
mov ecx, edi
call fcn.00402e95
mov dword [ebp - 0x90], eax
mov eax, 0x402d08
mov dword [ebp - 0x8c], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x84], eax
mov ebx, dword [esi]
mov ecx, edi
call fcn.00402e95
add eax, dword [ebp - 0x60]
mov dword [ebp - 0x88], eax
lea ecx, [ebp - 0x98]
call fcn.00403186
mov dword [ebp - 0x68], eax
xor esi, esi
mov dword [ebp - 4], 0xfffffffe
jmp 0x40316a
add ebx, 8
jmp 0x40309f
add edx, 8
jmp 0x40305d
cmp dword [ebp - 0x60], esi
je 0x40317e
push 0x8000
push esi
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x68]
jmp 0x403027