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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20
call fcn.006d13f0
mov edx, dword [ebp + 0xc]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x10]
mov eax, edx
push ebx
mov ebx, dword [ebp + 0x24]
shld ecx, eax, 5
push esi
mov esi, dword [ebp + 8]
shl eax, 5
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
movlpd qword [ebp - 0x20], xmm0
push edi
mov edi, esi
test ecx, ecx
jb 0x664a2f
ja 0x6649cf
test eax, eax
je 0x664a2f
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
nop
movzx eax, byte [edi]
lea edi, [edi + 4]
mov dword [ebx], eax
movzx edx, byte [edi - 3]
shl edx, 8
or edx, eax
mov dword [ebx], edx
movzx ecx, byte [edi - 2]
shl ecx, 0x10
or ecx, edx
mov dword [ebx], ecx
movzx eax, byte [edi - 1]
shl eax, 0x18
or eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebx], eax
mov eax, dword [ebp - 0xc]
add eax, 1
mov dword [ebp - 0xc], eax
adc ecx, 0
add ebx, 4
mov dword [ebp - 0x10], ecx
cmp ecx, dword [ebp - 8]
jb 0x6649e0
ja 0x664a29
cmp eax, esi
jb 0x6649e0
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
xor eax, eax
mov edi, 1
cmp eax, dword [ebp + 0x18]
ja 0x664a85
jb 0x664a42
cmp edi, dword [ebp + 0x14]
jae 0x664a85
mov eax, edx
mov ecx, edx
mov dword [ebp - 0xc], eax
shl ecx, 7
xor esi, esi
mov dword [ebp - 0x18], ecx
push dword [ebp + 0x10]
mov eax, ebx
push edx
sub eax, ecx
push eax
push ebx
call fcn.00664470
mov ecx, dword [ebp - 0x18]
add esp, 0x10
mov edx, dword [ebp + 0xc]
add edi, 1
adc esi, 0
add ebx, ecx
cmp esi, dword [ebp + 0x18]
jb 0x664a51
ja 0x664a7d
cmp edi, dword [ebp + 0x14]
jb 0x664a51
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
jmp 0x664a88
mov dword [ebp - 0xc], edx
mov ebx, dword [ebp + 0x14]
mov eax, ebx
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x1c]
shl eax, 7
add eax, 0xffffff80
imul eax, edx
push edx
add eax, dword [ebp + 0x24]
push eax
push edi
call fcn.00664470
mov ecx, dword [ebp + 0x18]
add esp, 0x10
xorps xmm0, xmm0
movlpd qword [ebp - 0x20], xmm0
test ecx, ecx
jb 0x664b7e
ja 0x664ac7
test ebx, ebx
je 0x664b7e
mov eax, dword [ebp - 0xc]
lea edx, [edi - 0x40]
mov esi, dword [ebp - 0x20]
shl eax, 7
add edx, eax
mov dword [ebp - 0x10], esi
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
push ecx
push ebx
push 0
push dword [edx]
call fcn.006d1870
mov edx, eax
xorps xmm0, xmm0
imul edx, dword [ebp - 0xc]
movlpd qword [ebp - 0x20], xmm0
shl edx, 7
add edx, dword [ebp + 0x24]
cmp dword [ebp - 8], 0
jb 0x664b42
ja 0x664b0e
cmp dword [ebp - 4], 0
je 0x664b3f
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov esi, dword [ebp + 0x1c]
mov eax, dword [esi + ecx*4]
lea edx, [edx + 4]
mov ebx, dword [ebp + 0x20]
xor eax, dword [edx - 4]
mov dword [ebx + ecx*4], eax
add ecx, 1
mov ebx, dword [ebp - 4]
adc edi, 0
cmp edi, dword [ebp - 8]
jb 0x664b17
ja 0x664b3a
cmp ecx, ebx
jb 0x664b17
mov edi, esi
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 0x20]
push edi
call fcn.00664470
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov ecx, dword [ebp + 0x18]
add esi, 1
mov edx, dword [ebp - 0x18]
adc eax, 0
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], eax
cmp eax, ecx
jb 0x664ae1
ja 0x664b7b
cmp esi, ebx
jb 0x664ae1
mov esi, dword [ebp + 8]
cmp dword [ebp - 8], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x20], xmm0
jb 0x664bd3
mov ebx, dword [ebp - 4]
ja 0x664b95
test ebx, ebx
je 0x664bd3
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
nop dword [eax + eax]
mov eax, dword [ebp + 0x1c]
lea esi, [esi + 4]
mov ecx, dword [eax + edx*4]
mov eax, ecx
shr eax, 8
mov byte [esi - 4], cl
mov byte [esi - 3], al
mov eax, ecx
shr eax, 0x10
shr ecx, 0x18
add edx, 1
mov byte [esi - 2], al
adc edi, 0
mov byte [esi - 1], cl
cmp edi, dword [ebp - 8]
jb 0x664ba0
ja 0x664bd3
cmp edx, ebx
jb 0x664ba0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret