Function at 0x402f60
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x40a024]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
movzx edx, word [ecx]
cmp edx, 0x5a4d
jne 0x402f9b
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x3c]
xor edx, edx
mov ecx, 4
div ecx
test edx, edx
je 0x402fa0
jmp 0x4032f6
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
cmp dword [ecx], 0x4550
je 0x402fbc
jmp 0x4032f6
mov edx, dword [ebp - 0x24]
add edx, 0x18
mov dword [ebp - 0x20], edx
mov dword [ebp - 0xc], 0
movzx eax, byte [ebp - 0x2d]
push eax
push str.ntdll.dll
lea ecx, [ebp - 0x7c]
call fcn.00401330
mov ecx, eax
call fcn.00403890
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x50], eax
movzx ecx, byte [ebp - 0x2e]
push ecx
push str.NtAllocateVirtualMemory
lea ecx, [ebp - 0x98]
call fcn.00401050
mov ecx, eax
call fcn.00403920
push eax
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x50]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x58], edx
push 0x40
push 0x3000
lea eax, [ebp - 8]
push eax
push 0
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x58]
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0xc], 0
jne 0x403051
jmp 0x4032f6
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 0x24]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x3c]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00403310
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x10], cx
jmp 0x40308d
mov dx, word [ebp - 0x10]
add dx, 1
mov word [ebp - 0x10], dx
movzx eax, word [ebp - 0x10]
mov ecx, dword [ebp - 0x24]
movzx edx, word [ecx + 6]
cmp eax, edx
jge 0x4030d9
movzx eax, word [ebp - 0x10]
imul ecx, eax, 0x28
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + ecx + 0x10]
push eax
movzx ecx, word [ebp - 0x10]
imul edx, ecx, 0x28
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx + 0x14]
push ecx
movzx edx, word [ebp - 0x10]
imul eax, edx, 0x28
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + eax + 0xc]
push edx
call fcn.00403310
add esp, 0xc
jmp 0x403081
mov eax, 8
shl eax, 0
mov ecx, dword [ebp - 0x20]
lea edx, [ecx + eax + 0x60]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
cmp dword [eax], 0
je 0x4031d0
mov ecx, dword [ebp - 0x3c]
cmp dword [ecx + 4], 0x14
jbe 0x4031d0
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0xc]
add eax, dword [edx]
mov dword [ebp - 0x18], eax
jmp 0x40311a
mov ecx, dword [ebp - 0x18]
add ecx, 0x14
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
cmp dword [edx + 0xc], 0
je 0x4031d0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0xc]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x4031cb
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x18]
cmp dword [ecx], 0
jne 0x40316f
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
jmp 0x403183
mov eax, dword [ebp - 0x1c]
add eax, 4
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x2c]
add ecx, 4
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x1c]
cmp dword [edx], 0
je 0x4031cb
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
and ecx, 0x80000000
je 0x4031a7
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
and eax, 0xffff
mov dword [ebp - 0x48], eax
jmp 0x4031b6
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx + 2]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
jmp 0x403171
jmp 0x403111
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
cmp eax, dword [edx + 0x1c]
je 0x4032d4
mov ecx, 8
imul edx, ecx, 5
mov eax, dword [ebp - 0x20]
cmp dword [eax + edx + 0x64], 0
je 0x4032d4
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
sub edx, dword [ecx + 0x1c]
mov dword [ebp - 0x64], edx
mov eax, 8
imul ecx, eax, 5
mov edx, dword [ebp - 0x20]
lea eax, [edx + ecx + 0x60]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
cmp dword [ecx + 4], 0
je 0x403224
mov edx, dword [ebp - 0x40]
cmp dword [edx], 0
jne 0x403229
jmp 0x4032f6
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
cmp dword [edx], 0
je 0x4032d4
mov eax, dword [ebp - 0x14]
cmp dword [eax + 4], 8
jb 0x4032c3
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
sub edx, 8
shr edx, 1
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x14]
add eax, 8
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x28], 0
jmp 0x403272
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x60]
jae 0x4032c3
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x44]
movzx edx, word [ecx + eax*2]
test edx, edx
je 0x4032c1
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x44]
movzx edx, word [eax + edx*2]
and edx, 0xfff
mov eax, dword [ecx + edx]
add eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x44]
movzx ecx, word [edx + ecx*2]
and ecx, 0xfff
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp - 0xc]
add esi, dword [edx]
mov dword [esi + ecx], eax
jmp 0x403269
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 4]
mov dword [ebp - 0x14], ecx
jmp 0x403234
mov edx, dword fs:[0x30]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 8], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x6c], eax
call dword [ebp - 0x6c]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040454d
mov esp, ebp
pop ebp
ret