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

Disassembly:
push 0x184
push 0x43b2a8
call fcn.004167d8
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x6c], ecx
xor esi, esi
mov dword [ebp - 0x68], esi
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40255f
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 0x402558
cmp dword [ebp - 0x64], 0x40
jne 0x402558
mov eax, 0x5a4d
cmp word [ebp - 0x5c], ax
jne 0x402558
push esi
push esi
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x20]
jne 0x402558
push esi
lea eax, [ebp - 0x64]
push eax
push 0xf8
lea eax, [ebp - 0x194]
push eax
push ebx
call edi
test eax, eax
je 0x402558
cmp dword [ebp - 0x64], 0xf8
jne 0x402558
cmp dword [ebp - 0x194], 0x4550
jne 0x402558
cmp word [ebp - 0x18e], si
je 0x402558
mov eax, dword [ebp - 0x10c]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x108]
mov dword [ebp - 0x70], ecx
cmp eax, esi
je 0x402558
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x64], eax
cmp eax, 0xffffffff
je 0x402558
push 4
push 0x1000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x60], eax
cmp eax, esi
je 0x402558
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 0x402567
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.00416820
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.004022d0
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 - 0x84], edx
mov ebx, ecx
dec ecx
mov dword [ebp - 0x78], ecx
test ebx, ebx
je 0x40267e
test dword [edx], 0x80000000
jne 0x40268f
cmp word [edx], 0xa
jne 0x40268f
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 - 0x80], edx
mov dword [ebp - 0x7c], ebx
mov ecx, edx
dec edx
mov dword [ebp - 0x80], edx
test ecx, ecx
je 0x40267e
mov ecx, 0x360
cmp word [ebx], cx
jne 0x402687
mov ecx, dword [ebx + 4]
test ecx, ecx
jns 0x402611
and ecx, 0x7fffffff
add ecx, eax
mov esi, dword [ecx + 0x14]
add esi, eax
jmp 0x402614
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 - 0x9c], 0x18
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x98], eax
mov ebx, dword [ebp - 0x74]
mov ecx, edi
call fcn.004022d0
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x90], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x88], eax
mov ebx, dword [esi]
mov ecx, edi
call fcn.004022d0
add eax, dword [ebp - 0x60]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x9c]
push eax
call fcn.0040233e
pop ecx
mov dword [ebp - 0x68], eax
xor esi, esi
mov dword [ebp - 4], 0xfffffffe
jmp 0x4026a7
add ebx, 8
jmp 0x4025dc
add edx, 8
jmp 0x402597
cmp dword [ebp - 0x60], esi
je 0x4026bb
push 0x8000
push esi
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x68]
jmp 0x402561