Function at 0x406cc0
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, 0xb0
mov eax, dword [0x414044]
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 0x406cfb
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x3c]
xor edx, edx
mov ecx, 4
div ecx
test edx, edx
je 0x406d00
jmp 0x4070c2
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 0x406d1c
jmp 0x4070c2
mov edx, dword [ebp - 0x24]
add edx, 0x18
mov dword [ebp - 0x20], edx
mov dword [ebp - 0xc], 0
mov eax, dword [0x414008]
mov dword [ebp - 0x68], eax
push 0x40f228
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x68]
push ecx
mov edx, dword [ebp - 0x50]
push edx
call fcn.004083f0
add esp, 8
mov dword [0x414480], eax
mov eax, dword [0x414004]
mov dword [ebp - 0x54], eax
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x54]
push ecx
mov edx, dword [ebp - 0x58]
push edx
call fcn.004083f0
add esp, 8
mov dword [0x41447c], eax
mov eax, dword [0x41447c]
mov dword [ebp - 0x5c], eax
movzx ecx, byte [ebp - 0x2d]
push ecx
push str.ntdll.dll
lea ecx, [ebp - 0x94]
call fcn.00402490
mov ecx, eax
call fcn.00407b30
push eax
call dword [ebp - 0x5c]
mov dword [ebp - 0x60], eax
movzx edx, byte [ebp - 0x2e]
push edx
push str.NtAllocateVirtualMemory
lea ecx, [ebp - 0xb0]
call fcn.00401ac0
mov ecx, eax
call fcn.00407ce0
push eax
mov eax, dword [ebp - 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x50]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x6c], eax
push 0x40
push 0x3000
lea ecx, [ebp - 8]
push ecx
push 0
lea edx, [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 0x6c]
mov dword [ebp - 0x88], eax
cmp dword [ebp - 0xc], 0
jne 0x406e12
jmp 0x4070c2
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp - 0x24]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x3c]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004070e0
add esp, 0xc
xor edx, edx
mov word [ebp - 0x10], dx
jmp 0x406e4e
mov ax, word [ebp - 0x10]
add ax, 1
mov word [ebp - 0x10], ax
movzx ecx, word [ebp - 0x10]
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + 6]
cmp ecx, eax
jge 0x406e9a
movzx ecx, word [ebp - 0x10]
imul edx, ecx, 0x28
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + edx + 0x10]
push ecx
movzx edx, word [ebp - 0x10]
imul eax, edx, 0x28
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
push edx
movzx eax, word [ebp - 0x10]
imul ecx, eax, 0x28
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + ecx + 0xc]
push eax
call fcn.004070e0
add esp, 0xc
jmp 0x406e42
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp - 0x20]
lea eax, [edx + ecx + 0x60]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
cmp dword [ecx], 0
je 0x406f96
mov edx, dword [ebp - 0x3c]
cmp dword [edx + 4], 0x14
jbe 0x406f96
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax]
mov dword [ebp - 0x18], ecx
jmp 0x406edb
mov edx, dword [ebp - 0x18]
add edx, 0x14
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0xc], 0
je 0x406f96
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0xc]
mov dword [ebp - 0x70], edx
mov eax, dword [0x41447c]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x70]
push ecx
call dword [ebp - 0x74]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
je 0x406f91
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
add eax, dword [edx]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x10]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
jne 0x406f35
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], ecx
jmp 0x406f49
mov edx, dword [ebp - 0x1c]
add edx, 4
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x2c]
add eax, 4
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx], 0
je 0x406f91
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
and eax, 0x80000000
je 0x406f6d
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx]
and edx, 0xffff
mov dword [ebp - 0x48], edx
jmp 0x406f7c
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xc]
lea eax, [edx + ecx + 2]
mov dword [ebp - 0x48], eax
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
jmp 0x406f37
jmp 0x406ed2
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
cmp eax, dword [edx + 0x1c]
je 0x40709a
mov ecx, 8
imul edx, ecx, 5
mov eax, dword [ebp - 0x20]
cmp dword [eax + edx + 0x64], 0
je 0x40709a
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0xc]
sub edx, dword [ecx + 0x1c]
mov dword [ebp - 0x7c], 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 0x406fea
mov edx, dword [ebp - 0x40]
cmp dword [edx], 0
jne 0x406fef
jmp 0x4070c2
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 0x40709a
mov eax, dword [ebp - 0x14]
cmp dword [eax + 4], 8
jb 0x407089
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 4]
sub edx, 8
shr edx, 1
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x14]
add eax, 8
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x28], 0
jmp 0x407038
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x78]
jae 0x407089
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x44]
movzx edx, word [ecx + eax*2]
test edx, edx
je 0x407087
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 - 0x7c]
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 0x40702f
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
add ecx, dword [eax + 4]
mov dword [ebp - 0x14], ecx
jmp 0x406ffa
mov edx, dword fs:[0x30]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x80]
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 - 0x84], eax
call dword [ebp - 0x84]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b75e
mov esp, ebp
pop ebp
ret