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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
cmp byte [0x40a110], 0
jne 0x401823
mov dword [ebp - 0x14], 0
mov ebx, dword [ebp - 0x14]
inc ebx
mov eax, 0x84210843
imul ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
lea edx, [ebx + ecx]
sar edx, 4
mov eax, ebx
sar eax, 0x1f
sub edx, eax
mov eax, edx
shl eax, 5
sub eax, edx
mov ecx, ebx
sub ecx, eax
mov eax, 0x7a3eed0c
sar eax, cl
mov edx, dword [ebp - 0x14]
mov ecx, 0x409020
xor al, byte [ecx + edx*4]
mov byte [edx + 0x40a110], al
mov dword [ebp - 0x14], ebx
cmp ebx, 0xff
jle 0x4017d4
mov ebx, 7
movzx eax, byte [edi + 3]
mov dword [esp + 4], eax
movzx eax, byte [esi + 3]
mov dword [esp], eax
call fcn.00403ae9
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 7]
mov dword [esp], eax
call fcn.00403ae9
mov byte [esi + 7], al
movzx eax, byte [edi]
mov dword [esp + 4], eax
movzx eax, byte [esi]
mov dword [esp], eax
call fcn.00404b8e
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 4]
mov dword [esp], eax
call fcn.00403ae9
mov byte [esi + 4], al
movzx eax, byte [edi + 2]
mov dword [esp + 4], eax
movzx eax, byte [esi + 2]
mov dword [esp], eax
call fcn.00404b8e
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 6]
mov dword [esp], eax
call fcn.00404b8e
mov byte [esi + 6], al
movzx eax, byte [edi + 1]
mov dword [esp + 4], eax
movzx eax, byte [esi + 1]
mov dword [esp], eax
call fcn.00403ae9
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 5]
mov dword [esp], eax
call fcn.00404b8e
mov byte [esi + 5], al
add edi, 4
movzx eax, byte [edi]
mov dword [esp + 4], eax
inc edi
movzx eax, byte [esi + 4]
mov dword [esp], eax
call fcn.00404b8e
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 1]
mov dword [esp], eax
call fcn.00403ae9
mov byte [esi + 1], al
movzx eax, byte [esi + 5]
mov dword [esp + 4], eax
movzx eax, byte [esi + 4]
mov dword [esp], eax
call fcn.00404b8e
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 2]
mov dword [esp], eax
call fcn.00403ae9
mov byte [esi + 2], al
movzx eax, byte [edi]
mov dword [esp + 4], eax
inc edi
movzx eax, byte [esi + 6]
mov dword [esp], eax
call fcn.00404b8e
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi + 3]
mov dword [esp], eax
call fcn.00403ae9
mov byte [esi + 3], al
movzx eax, byte [edi]
mov dword [esp + 4], eax
inc edi
movzx eax, byte [esi + 7]
mov dword [esp], eax
call fcn.00404b8e
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
movzx eax, byte [esi]
mov dword [esp], eax
call fcn.00403ae9
mov byte [esi], al
dec ebx
cmp ebx, 0xffffffff
jne 0x401828
mov dword [ebp - 0x14], 0
movzx eax, byte [edi]
mov dword [esp + 4], eax
inc edi
mov edx, dword [ebp - 0x14]
movzx eax, byte [edx + esi]
mov dword [esp], eax
call fcn.00403ae9
movzx eax, al
movzx eax, byte [eax + 0x40a110]
mov dword [esp + 4], eax
mov ecx, dword [ebp - 0x14]
movzx eax, byte [esi + ecx + 4]
mov dword [esp], eax
call fcn.00404b8e
mov edx, dword [ebp - 0x14]
mov byte [esi + edx + 4], al
inc edx
mov dword [ebp - 0x14], edx
cmp edx, 3
jle 0x4019c0
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret