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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 8], ebx
mov eax, dword [esi + 0x1f0]
mov ecx, dword [esi + 0xaa0]
and ecx, dword [ebp + 0x10]
shl eax, 4
add eax, 0x3556
mov dword [ebp - 4], ecx
add eax, ecx
lea edx, [esi + eax*2]
mov eax, dword [esi + 0x18]
cmp edi, 0xffffffff
jne 0x4a6d3d
mov edi, dword [ebx]
mov ecx, dword [ebx + 0x14]
mov dword [esi + eax*4 + 0x20], 0
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
mov eax, edi
mov edx, dword [ebx + 0x18]
sub eax, edx
inc dword [esi + 0x18]
mov dword [ebp + 8], edx
movzx edx, byte [eax + ecx - 1]
mov ecx, 8
sub cl, byte [esi + 0xaa4]
mov eax, dword [esi + 0xaa8]
and eax, dword [ebp + 0x10]
shr edx, cl
mov ecx, dword [esi + 0xaa4]
shl eax, cl
lea ecx, [esi + 0xaac]
add edx, eax
imul eax, edx, 0x600
mov edx, dword [ebx + 0x14]
add ecx, eax
mov eax, edi
sub eax, dword [ebx + 0x18]
cmp dword [esi + 0x1f0], 7
mov dword [ebp + 0x10], ecx
movzx edx, byte [eax + edx]
jge 0x4a6c8e
push edx
mov edx, ecx
mov ecx, esi
push 8
call fcn.004a6530
add esp, 8
jmp 0x4a6cec
sub edi, dword [esi + 0x1f4]
sub edi, dword [ebp + 8]
mov eax, dword [ebx + 0x14]
mov ebx, 0x100
add edx, ebx
movzx edi, byte [edi + eax - 1]
mov eax, dword [esi + 0x18]
mov ecx, edx
shr ecx, 7
add edi, edi
and ecx, 1
mov dword [esi + eax*4 + 0x20], ecx
mov ecx, ebx
and ecx, edi
mov eax, edx
shr eax, 8
add ecx, ebx
add eax, ecx
add edx, edx
mov ecx, dword [ebp + 0x10]
lea ecx, [ecx + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
mov eax, edi
inc dword [esi + 0x18]
xor eax, edx
not eax
and ebx, eax
cmp edx, 0x10000
jb 0x4a6ca6
mov ebx, dword [ebp - 8]
mov eax, dword [esi + 0x1f0]
cmp eax, 3
jg 0x4a6d0c
xor eax, eax
pop edi
mov dword [esi + 0x1f0], eax
mov eax, dword [ebp + 0xc]
sub dword [ebx + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 9
jg 0x4a6d27
add eax, 0xfffffffd
pop edi
mov dword [esi + 0x1f0], eax
mov eax, dword [ebp + 0xc]
sub dword [ebx + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add eax, 0xfffffffa
pop edi
mov dword [esi + 0x1f0], eax
mov eax, dword [ebp + 0xc]
sub dword [ebx + 0x18], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + eax*4 + 0x20], 1
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
lea edx, [esi + eax*4]
mov eax, dword [esi + 0x1f0]
add eax, 0x3616
lea eax, [esi + eax*2]
mov dword [ebp + 0x10], eax
cmp edi, 4
jae 0x4a6f1b
mov dword [edx + 0x20], 1
mov eax, dword [esi + 0x18]
mov edx, dword [ebp + 0x10]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
mov eax, dword [esi + 0x18]
lea edx, [esi + eax*4]
test edi, edi
jne 0x4a6de9
mov eax, dword [esi + 0x1f0]
add eax, 0x3622
mov dword [edx + 0x20], edi
mov edi, dword [ebp + 0xc]
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
mov eax, dword [esi + 0x1f0]
mov edx, dword [esi + 0x18]
shl eax, 4
add eax, 0x3646
add eax, dword [ebp - 4]
lea ecx, [esi + eax*2]
xor eax, eax
cmp edi, 1
setne al
mov dword [esi + edx*4 + 0x20], eax
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
jmp 0x4a6eb3
mov eax, dword [esi + edi*4 + 0x1f4]
mov dword [ebp + 0x10], eax
mov eax, dword [esi + 0x1f0]
add eax, 0x3622
mov dword [edx + 0x20], 1
lea ecx, [esi + eax*2]
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], ecx
inc dword [esi + 0x18]
mov edx, dword [esi + 0x1f0]
mov eax, dword [esi + 0x18]
add edx, 0x362e
lea ecx, [esi + eax*4]
lea edx, [esi + edx*2]
cmp edi, 1
jne 0x4a6e45
mov dword [ecx + 0x20], 0
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
jmp 0x4a6e9b
mov dword [ecx + 0x20], 1
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
mov eax, dword [esi + 0x1f0]
mov ecx, dword [esi + 0x18]
add eax, 0x363a
lea edx, [esi + eax*2]
lea eax, [edi - 2]
mov dword [esi + ecx*4 + 0x20], eax
mov eax, dword [esi + 0x18]
mov dword [esi + eax*4 + 0x108], edx
inc dword [esi + 0x18]
cmp edi, 3
jne 0x4a6e8f
mov eax, dword [esi + 0x1fc]
mov dword [esi + 0x200], eax
mov eax, dword [esi + 0x1f8]
mov dword [esi + 0x1fc], eax
mov eax, dword [esi + 0x1f4]
mov edi, dword [ebp + 0xc]
mov dword [esi + 0x1f8], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x1f4], eax
cmp edi, 1
jne 0x4a6edb
xor eax, eax
cmp dword [esi + 0x1f0], 7
setge al
sub dword [ebx + 0x18], edi
pop edi
lea eax, [eax*2 + 9]
mov dword [esi + 0x1f0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, byte [esi + 0xa9c]
lea edx, [esi + 0xb958]
push eax
push edi
push dword [ebp - 4]
mov ecx, esi
call fcn.004a69a0
add esp, 0xc
mov eax, 0xb
cmp dword [esi + 0x1f0], 7
mov ecx, 8
cmovl eax, ecx
sub dword [ebx + 0x18], edi
pop edi
mov dword [esi + 0x1f0], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0xc]
mov dword [edx + 0x20], 0
mov eax, dword [esi + 0x18]
mov edx, dword [ebp + 0x10]
push edi
mov dword [esi + eax*4 + 0x108], edx
mov edx, ecx
mov eax, dword [ebp + 8]
mov ecx, esi
inc dword [esi + 0x18]
add eax, 0xfffffffc
push eax
call fcn.004a6a80
add esp, 8
sub dword [ebx + 0x18], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret