Function at 0x4060c0
Capabilities:
Enumerate pe sections
Get file size
Parse pe header
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419320
push 0x40ee54
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x184
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406386
lea ecx, [ebp - 0x16c]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x16c]
test ecx, ecx
jne 0x40637f
cmp eax, 0x5000000
jae 0x40637f
push 0
lea edx, [ebp - 0x120]
push edx
push 0x40
lea eax, [ebp - 0x164]
push eax
push esi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
call edi
test eax, eax
je 0x40637f
cmp word [ebp - 0x164], 0x5a4d
jne 0x40637f
push 0
push 0
mov ecx, dword [ebp - 0x128]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x128]
jne 0x40637f
push 0
lea edx, [ebp - 0x120]
push edx
push 0xf8
lea eax, [ebp - 0x118]
push eax
push esi
call edi
test eax, eax
je 0x40637f
cmp dword [ebp - 0x118], 0x4550
jne 0x40637f
cmp word [ebp - 0x112], 0
je 0x40637f
push 0
push 0
push 0
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
test ebx, ebx
je 0x406386
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 0x11c], edi
push ebx
call esi
xor esi, esi
cmp edi, esi
je 0x406386
mov dword [ebp - 0x168], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x17c], edi
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 0x178], eax
xor ecx, ecx
mov cx, word [eax + 0x14]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x170], edx
xor ecx, ecx
mov cx, word [eax + 6]
lea ecx, [ecx + ecx*4]
lea ecx, [edx + ecx*8 - 0x28]
mov dword [ebp - 0x174], ecx
mov edx, dword [ecx + 0x14]
mov ecx, dword [ecx + 0x10]
lea edx, [edx + ecx + 0x1000]
cmp edx, dword [ebp - 0x20]
jae 0x40633e
mov eax, dword [eax + 0x88]
mov dword [ebp - 0x180], eax
cmp eax, esi
je 0x40633e
push eax
push edi
call fcn.004063a0
add esp, 8
mov esi, eax
add esi, edi
mov dword [ebp - 0x188], esi
lea ecx, [esi + 0x10]
mov dword [ebp - 0x18c], ecx
xor edx, edx
mov dx, word [esi + 0xe]
xor eax, eax
mov ax, word [esi + 0xc]
add edx, eax
mov dword [ebp - 0x184], edx
mov eax, edx
dec edx
mov dword [ebp - 0x184], edx
test eax, eax
je 0x40633e
cmp dword [ebp - 0x168], 0x1e
jae 0x40633e
mov eax, dword [ecx]
test eax, 0x80000000
je 0x40632d
test dword [ecx + 4], 0x80000000
je 0x40632d
and eax, 0x7fffffff
add eax, esi
mov ebx, eax
mov dword [ebp - 0x190], ebx
xor edi, edi
mov dword [ebp - 0x194], edi
cmp edi, 0xa
jae 0x406312
xor ecx, ecx
mov cx, word [ebx]
push ecx
mov edx, dword [edi*4 + 0x41da30]
push edx
lea eax, [ebx + 2]
push eax
call fcn.0040ee12
add esp, 0xc
test eax, eax
jne 0x40633b
add dword [ebp - 0x168], 0xa
cmp dword [ebp - 0x168], 0x14
mov edi, dword [ebp - 0x11c]
jae 0x40633e
mov edx, dword [ebp - 0x184]
mov ecx, dword [ebp - 0x18c]
add ecx, 8
mov dword [ebp - 0x18c], ecx
jmp 0x4062a5
inc edi
jmp 0x4062e2
mov dword [ebp - 4], 0xffffffff
jmp 0x40635d
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [ebp - 0x168], 0x14
sbb eax, eax
inc eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret