Function at 0x401300
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
add edx, 0x18
mov dword [ebp - 0x24], edx
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x6c], eax
push 0x40
push 0x3000
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x38]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x401359
xor eax, eax
jmp 0x4016a6
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x3c]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.00406fe0
add esp, 0xc
mov eax, dword [ebp - 0x28]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp - 0x28]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x18], eax
xor ecx, ecx
mov word [ebp - 0x14], cx
jmp 0x401395
mov dx, word [ebp - 0x14]
add dx, 1
mov word [ebp - 0x14], dx
movzx eax, word [ebp - 0x14]
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 6]
cmp eax, edx
jge 0x4013e1
movzx eax, word [ebp - 0x14]
imul ecx, eax, 0x28
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx + 0x10]
push eax
movzx ecx, word [ebp - 0x14]
imul edx, ecx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + edx + 0x14]
push ecx
movzx edx, word [ebp - 0x14]
imul eax, edx, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
add edx, dword [ecx + eax + 0xc]
push edx
call fcn.00406fe0
add esp, 0xc
jmp 0x401389
mov eax, 8
shl eax, 0
mov ecx, dword [ebp - 0x24]
lea edx, [ecx + eax + 0x60]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
cmp dword [eax], 0
je 0x4014ef
mov ecx, dword [ebp - 0x38]
cmp dword [ecx + 4], 0x14
jbe 0x4014ef
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x10]
add eax, dword [edx]
mov dword [ebp - 0x1c], eax
jmp 0x401422
mov ecx, dword [ebp - 0x1c]
add ecx, 0x14
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0xc], 0
je 0x4014ef
push str.LoadLibraryA
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
add ecx, dword [eax + 0xc]
mov dword [ebp - 0x5c], ecx
mov edx, dword [ebp - 0x5c]
push edx
call dword [ebp - 0x60]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x4014ea
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
add ecx, dword [eax]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
add eax, dword [edx + 0x10]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x1c]
cmp dword [ecx], 0
jne 0x40148e
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x20], edx
jmp 0x4014a2
mov eax, dword [ebp - 0x20]
add eax, 4
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x30]
add ecx, 4
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x20]
cmp dword [edx], 0
je 0x4014ea
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
and ecx, 0x80000000
je 0x4014c6
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
and eax, 0xffff
mov dword [ebp - 0x40], eax
jmp 0x4014d5
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x10]
lea ecx, [eax + edx + 2]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
jmp 0x401490
jmp 0x401419
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
sub eax, dword [edx + 0x1c]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x10]
push edx
call fcn.004011f0
add esp, 8
lea eax, [ebp - 8]
push eax
push 2
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + 0x3c]
push edx
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor ecx, ecx
mov word [ebp - 0xc], cx
jmp 0x401536
mov dx, word [ebp - 0xc]
add dx, 1
mov word [ebp - 0xc], dx
movzx eax, word [ebp - 0xc]
mov ecx, dword [ebp - 0x28]
movzx edx, word [ecx + 6]
cmp eax, edx
jge 0x40164a
movzx eax, word [ebp - 0xc]
imul ecx, eax, 0x28
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
add eax, dword [edx + ecx + 0xc]
mov dword [ebp - 0x54], eax
movzx ecx, word [ebp - 0xc]
imul edx, ecx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + edx + 0x24]
and ecx, 0x2000000
je 0x401593
push 0x4000
movzx edx, word [ebp - 0xc]
imul eax, edx, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + eax + 8]
push edx
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x40152a
movzx ecx, word [ebp - 0xc]
imul edx, ecx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + edx + 0x24]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
and edx, 0x20000000
je 0x4015b8
mov dword [ebp - 0x48], 1
jmp 0x4015bf
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x34]
and eax, 0x40000000
je 0x4015d2
mov dword [ebp - 0x4c], 1
jmp 0x4015d9
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x34]
and ecx, 0x80000000
je 0x4015ed
mov dword [ebp - 0x50], 1
jmp 0x4015f4
mov dword [ebp - 0x50], 0
mov edx, dword [ebp - 0x48]
shl edx, 4
mov eax, dword [ebp - 0x4c]
lea ecx, [edx + eax*8 + 0x41b8c0]
mov edx, dword [ebp - 0x50]
mov eax, dword [ecx + edx*4]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x34]
and ecx, 0x4000000
je 0x401624
mov edx, dword [ebp - 0x3c]
or edx, 0x200
mov dword [ebp - 0x3c], edx
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
movzx edx, word [ebp - 0xc]
imul eax, edx, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + eax + 8]
push edx
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x40152a
mov ecx, 8
imul edx, ecx, 9
mov eax, dword [ebp - 0x24]
lea ecx, [eax + edx + 0x60]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x58]
cmp dword [edx + 4], 0
je 0x4016a3
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x10]
add ecx, dword [eax]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x68]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x2c], eax
jmp 0x401684
mov ecx, dword [ebp - 0x2c]
add ecx, 4
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0
je 0x4016a3
mov edx, dword [ebp - 0x2c]
cmp dword [edx], 0
je 0x4016a3
push 0
push 1
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx]
call edx
jmp 0x40167b
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404704
mov esp, ebp
pop ebp
ret