Function at 0x401019
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
jmp 0x4012e0
sub esp, 0xc
mov eax, dword [esp + 0x18]
push ebx
push esi
mov esi, dword [esp + 0x1c]
mov cl, byte [eax]
mov dl, byte [eax + 1]
xor ebx, ebx
mov byte [esp + 8], cl
test esi, esi
mov byte [esp + 0xc], dl
jle 0x4014d1
mov esi, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::operator___class_std::basic_ostream_char__struct_std::char_traits_char_____char_const__]
push ebp
mov ebp, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
and edi, 0xff
and ebp, 0xff
lea eax, [edi + 1]
mov ecx, 0x384
cdq
idiv ecx
xor eax, eax
mov byte [esp + 0x10], dl
mov edx, dword [0x405954]
mov edi, dword [esp + 0x10]
and edi, 0xff
mov al, byte [edi + edx]
lea ecx, [edi + edx]
add eax, ebp
mov ebp, 0x384
cdq
idiv ebp
mov eax, dword [0x405954]
mov byte [esp + 0x14], dl
mov ebp, dword [esp + 0x14]
and ebp, 0xff
lea edx, [eax + ebp]
push edx
push ecx
call fcn.00401560
mov ecx, dword [0x405954]
xor eax, eax
xor edx, edx
push 0x405964
mov al, byte [ecx + ebp]
mov dl, byte [edi + ecx]
add eax, edx
mov ecx, 0x384
cdq
idiv ecx
mov byte [esp + 0x24], dl
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push edx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push eax
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push ecx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push edx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push eax
call esi
add esp, 0x40
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push ecx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push edx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push eax
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push ecx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push edx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov eax, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
add esp, 0x40
push 0x405964
push eax
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov ecx, dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x405964
push ecx
call esi
push eax
call dword [sym.imp.MSVCP60.dll_class_std::basic_ostream_char__struct_std::char_traits_char______cdecl_std::endl_class_std::basic_ostream_char__struct_std::char_traits_char____]
mov edx, dword [esp + 0x30]
mov eax, dword [0x405954]
and edx, 0xff
add esp, 0x18
mov cl, byte [edx + eax]
mov eax, dword [esp + 0x20]
mov dl, byte [ebx + eax]
xor dl, cl
mov byte [ebx + eax], dl
mov eax, dword [esp + 0x24]
inc ebx
cmp ebx, eax
jl 0x401320
mov eax, dword [esp + 0x28]
mov dl, byte [esp + 0x10]
mov cl, byte [esp + 0x14]
pop edi
pop ebp
pop esi
mov byte [eax], dl
mov byte [eax + 1], cl
pop ebx
add esp, 0xc
ret
pop esi
mov byte [eax], cl
mov byte [eax + 1], dl
pop ebx
add esp, 0xc
ret