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

Disassembly:
mov eax, dword [edi + 8]
sub esp, 0x1c
push ebx
push ebp
push esi
test eax, eax
jne 0x641a75
cmp dword [esp + 0x30], eax
je 0x641a46
mov eax, dword [edi + 0x10]
mov byte [edi + 4], 6
mov dword [edi + 8], 0x40
mov ecx, dword [eax]
push 0x100
call ecx
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x641a4f
mov dword [edi + 8], eax
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret
push 0x100
push 0
push eax
call fcn.0046a480
mov edx, dword [esp + 0x38]
add esp, 0xc
call fcn.006419e0
mov edx, dword [edi + 8]
mov esi, eax
dec edx
and esi, edx
jmp 0x641c96
mov ecx, dword [esp + 0x2c]
mov al, byte [ecx]
mov dword [esp + 0x10], 0
mov byte [esp + 0xf], al
test al, al
je 0x641aab
jmp 0x641a90
mov edx, dword [esp + 0x10]
imul edx, edx, 0xf4243
movzx eax, al
xor edx, eax
mov al, byte [ecx + 1]
inc ecx
mov dword [esp + 0x10], edx
test al, al
jne 0x641a90
mov ebp, dword [edi + 8]
mov esi, dword [esp + 0x10]
mov edx, dword [edi]
dec ebp
and esi, ebp
xor bl, bl
cmp dword [edx + esi*4], 0
mov dword [esp + 0x14], edx
je 0x641b22
mov ecx, dword [edx + esi*4]
mov eax, dword [ecx]
mov cl, byte [esp + 0xf]
cmp cl, byte [eax]
jne 0x641aeb
mov edx, dword [esp + 0x2c]
sub edx, eax
test cl, cl
je 0x641bcc
mov cl, byte [edx + eax + 1]
inc eax
cmp cl, byte [eax]
je 0x641ad6
mov edx, dword [esp + 0x14]
test bl, bl
jne 0x641b08
movzx ecx, byte [edi + 4]
mov ebx, ebp
not ebx
and ebx, dword [esp + 0x10]
dec ecx
shr ebx, cl
mov ecx, ebp
shr ecx, 2
and bl, cl
or bl, 1
movzx eax, bl
cmp esi, eax
jae 0x641b18
mov ecx, dword [edi + 8]
sub ecx, eax
add esi, ecx
jmp 0x641b1a
sub esi, eax
mov eax, dword [edi]
cmp dword [eax + esi*4], 0
jne 0x641ac3
cmp dword [esp + 0x30], 0
je 0x641a46
mov al, byte [edi + 4]
mov edx, dword [edi + 0xc]
movzx ecx, al
dec ecx
shr edx, cl
test edx, edx
je 0x641c96
inc al
movzx ecx, al
mov esi, 1
shl esi, cl
mov byte [esp + 0xf], al
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x10]
mov edx, dword [ecx]
lea eax, [esi*4]
push eax
mov dword [esp + 0x18], esi
lea ebp, [esi - 1]
call edx
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x641a46
lea eax, [esi*4]
push eax
push 0
push ebx
call fcn.0046a480
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x18], ecx
cmp dword [edi + 8], ecx
jbe 0x641c34
lea ebx, [ebx]
mov eax, dword [edi]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
je 0x641c26
mov eax, dword [eax]
mov edx, dword [eax]
mov dword [esp + 0x24], eax
call fcn.006419e0
mov ecx, eax
mov edx, ecx
and edx, ebp
xor al, al
cmp dword [ebx + edx*4], 0
mov dword [esp + 0x20], ecx
je 0x641c1b
jmp 0x641be4
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + esi*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
mov ecx, dword [esp + 0x20]
test al, al
jne 0x641c02
mov esi, dword [esp + 0x14]
mov eax, ebp
not eax
and eax, ecx
mov ecx, dword [esp + 0x1c]
dec ecx
shr eax, cl
mov ecx, ebp
shr ecx, 2
and al, cl
or al, 1
movzx ecx, al
cmp edx, ecx
jae 0x641c13
sub esi, ecx
add edx, esi
mov esi, dword [esp + 0x14]
jmp 0x641c15
sub edx, ecx
cmp dword [ebx + edx*4], 0
jne 0x641be0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov dword [ebx + edx*4], eax
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [edi + 8]
jb 0x641ba0
mov ecx, dword [edi + 0x10]
mov edx, dword [edi]
mov eax, dword [ecx + 8]
push edx
call eax
mov edx, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
mov dword [edi + 8], esi
mov esi, edx
mov byte [edi + 4], cl
and esi, ebp
add esp, 4
mov dword [edi], ebx
xor cl, cl
cmp dword [ebx + esi*4], 0
je 0x641c96
mov edi, edi
test cl, cl
jne 0x641c7b
mov ecx, dword [esp + 0x1c]
mov eax, ebp
dec ecx
not eax
and eax, edx
shr eax, cl
mov ecx, ebp
shr ecx, 2
and cl, al
or cl, 1
movzx eax, cl
cmp esi, eax
jae 0x641c8c
mov ebx, dword [esp + 0x14]
sub ebx, eax
add esi, ebx
jmp 0x641c8e
sub esi, eax
mov eax, dword [edi]
cmp dword [eax + esi*4], 0
jne 0x641c60
mov edx, dword [edi + 0x10]
mov ebx, dword [esp + 0x30]
mov eax, dword [edx]
push ebx
call eax
mov ecx, dword [edi]
mov dword [ecx + esi*4], eax
mov edx, dword [edi]
lea eax, [edx + esi*4]
add esp, 4
cmp dword [eax], 0
je 0x641a46
mov eax, dword [eax]
push ebx
push 0
push eax
call fcn.0046a480
mov ecx, dword [edi]
mov edx, dword [ecx + esi*4]
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [edx], eax
mov ecx, dword [edi]
inc dword [edi + 0xc]
mov eax, dword [ecx + esi*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret