Function at 0x401330
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x414480
push 0x404a20
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x416004]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov edi, ecx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x50], eax
xor esi, esi
mov dword [ebp - 0x48], esi
mov eax, dword [edi + 0x3c]
push 0x40
push 0x3000
push dword [eax + edi + 0x50]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x4c], ebx
test ebx, ebx
je 0x401561
mov dword [ebp - 4], esi
mov edx, ebx
mov ecx, edi
call fcn.00401690
mov esi, eax
mov dword [ebp - 0x48], esi
test esi, esi
jne 0x4013b6
mov dword [ebp - 4], 0xfffffffe
jmp 0x401561
mov ecx, ebx
call fcn.00401600
mov esi, eax
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x48], esi
test esi, esi
jne 0x4013d5
mov dword [ebp - 4], 0xfffffffe
jmp 0x401561
mov dword [ebp - 4], 0xfffffffe
mov esi, dword [ebx + 0x3c]
add esi, ebx
movzx eax, word [esi + 0x14]
mov dword [ebp - 0x58], 0
xor ecx, ecx
cmp cx, word [esi + 6]
jae 0x4014f5
lea edi, [esi + 0x3c]
add edi, eax
nop dword [eax]
mov ecx, dword [edi - 0x14]
test ecx, ecx
je 0x40140c
mov dword [ebp - 0x40], ecx
jmp 0x401412
mov eax, dword [esi + 0x38]
mov dword [ebp - 0x40], eax
mov eax, dword [edi - 0x18]
add eax, ebx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x38], 8
mov dword [ebp - 0x34], 2
mov dword [ebp - 0x30], 4
mov dword [ebp - 0x2c], 0x10
mov dword [ebp - 0x28], 0x80
mov dword [ebp - 0x24], 0x20
mov dword [ebp - 0x20], 0x40
mov edx, dword [edi]
mov eax, edx
shr eax, 0x1d
and eax, 1
mov ebx, edx
shr ebx, 0x1e
and ebx, 1
mov dword [ebp - 0x44], edx
shr dword [ebp - 0x44], 0x1f
test edx, 0x2000000
je 0x401490
push 0x4000
push dword [ebp - 0x40]
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4014dc
lea eax, [ebx + eax*2]
mov ebx, dword [ebp - 0x44]
lea eax, [ebx + eax*2]
mov eax, dword [ebp + eax*4 - 0x3c]
mov dword [ebp - 0x40], eax
test edx, 0x4000000
je 0x4014b0
or eax, 0x200
mov dword [ebp - 0x40], eax
test ecx, ecx
jne 0x4014c9
test dl, 0x40
je 0x4014be
mov ecx, dword [esi + 0x20]
jmp 0x4014c5
test dl, dl
jns 0x4014c5
mov ecx, dword [esi + 0x24]
test ecx, ecx
je 0x4014dc
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0x40]
push dword [ebp - 0x64]
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x58]
inc edx
mov dword [ebp - 0x58], edx
add edi, 0x28
movzx eax, word [esi + 6]
cmp edx, eax
mov ebx, dword [ebp - 0x4c]
jb 0x401400
mov edi, dword [ebp - 0x50]
test edi, edi
je 0x40153f
mov eax, dword [esi + 0x28]
add eax, ebx
mov dword [ebp - 0x50], eax
push 0
push 1
push dword [ebp - 0x4c]
call dword [ebp - 0x50]
mov ecx, ebx
call fcn.004012a0
test eax, eax
je 0x40155e
push 0
push 0
push edi
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x40155e
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 1
jmp 0x401561
mov esi, dword [ebp - 0x5c]
test esi, esi
jne 0x401576
test ebx, ebx
je 0x401576
push 0x8000
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00402a1c
mov esp, ebp
pop ebp
ret