Function at 0x40efc0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
push edi
push esi
push ebx
mov esi, eax
sub esp, 0x4c
mov ebp, dword [0x45b050]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ecx
test ebp, ebp
jle 0x40f1c0
mov eax, dword [0x45b054]
lea edx, [eax + 4]
xor eax, eax
lea esi, [esi]
mov ecx, dword [edx]
cmp esi, ecx
jb 0x40f004
mov ebx, dword [edx + 4]
add ecx, dword [ebx + 8]
cmp esi, ecx
jb 0x40f160
add eax, 1
add edx, 0xc
cmp eax, ebp
jne 0x40eff0
mov dword [esp], esi
call dbg.__mingw_GetSectionForAddress
test eax, eax
mov edi, eax
je 0x40f1e7
lea ebx, [ebp + ebp*2]
mov ebp, dword [0x45b054]
shl ebx, 2
add ebp, ebx
mov dword [ebp + 8], eax
mov dword [ebp], 0
call dbg._GetPEImageBase
add eax, dword [edi + 0xc]
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], ecx
mov dword [ebp + 4], eax
mov eax, dword [0x45b054]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x1c
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov eax, dword [eax + ebx + 4]
mov dword [esp], eax
call ebp
sub esp, 0xc
test eax, eax
mov ecx, dword [esp + 0x1c]
je 0x40f1c7
mov eax, dword [esp + 0x38]
cmp eax, 4
je 0x40f08d
cmp eax, 0x40
jne 0x40f170
add dword [0x45b050], 1
mov dword [esp + 8], 0x1c
mov dword [esp + 4], ecx
mov dword [esp], esi
call ebp
sub esp, 0xc
test eax, eax
je 0x40f1f7
mov eax, dword [esp + 0x38]
cmp eax, 4
je 0x40f0be
cmp eax, 0x40
jne 0x40f0e0
mov eax, dword [esp + 0x18]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call ebx
sub esp, 0x10
mov eax, dword [esp + 0x18]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 4], eax
call sym._memcpy
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x40f0d6
cmp eax, 4
je 0x40f0d6
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call ebx
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ecx, [esp + 0x24]
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualQuery]
jmp 0x40f094
mov eax, dword [esp + 0x30]
add ebx, dword [0x45b054]
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
mov ecx, dword [esp + 0x1c]
jne 0x40f08d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
xor ebp, ebp
jmp 0x40f00e
mov eax, dword [0x45b054]
mov eax, dword [eax + ebx + 4]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
mov dword [esp + 8], esi
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call dbg.__report_error
nop