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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov al, byte [edi]
cmp al, 5
jae 0x1323d
movzx ax, al
mov ebx, dword [ebp + 8]
push 0x12
lea eax, [eax + eax*2]
pop ecx
sub ecx, eax
push ecx
push ebx
call fcn.000131a8
mov byte [ebp - 3], al
jmp 0x13255
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 8]
mov eax, dword [eax]
cmp byte [eax + 2], 4
setne al
dec eax
and al, 0xfe
add eax, 3
mov byte [ebp - 3], al
mov al, byte [edi]
and byte [ebp + 0xf], 0
and byte [ebp - 1], 0
push esi
test al, al
jbe 0x133c7
cmp al, 5
jae 0x132cc
movzx ax, byte [ebp - 3]
and byte [ebp - 2], 0
push eax
push ebx
mov word [ebp - 8], ax
call fcn.000131a8
movzx eax, ax
add eax, 3
test eax, eax
jle 0x13317
movzx eax, byte [ebp + 0xf]
xor esi, esi
mov dword [ebp - 0xc], eax
push 0x100
push ebx
call fcn.000131a8
mov ecx, dword [ebp - 0xc]
push dword [ebp - 8]
or al, 4
add ecx, esi
inc byte [ebp - 2]
push ebx
movzx esi, byte [ebp - 2]
mov byte [ebp + ecx - 0xa4], al
call fcn.000131a8
movzx eax, ax
add eax, 3
cmp esi, eax
jl 0x13297
jmp 0x13317
movzx si, byte [ebp - 3]
and byte [ebp - 2], 0
push esi
push ebx
call fcn.000131a8
test ax, ax
jbe 0x13317
push 0x100
push ebx
call fcn.000131a8
movzx edx, byte [ebp - 2]
mov cx, ax
push esi
movzx eax, byte [ebp + 0xf]
add edx, eax
or cl, 4
inc byte [ebp - 2]
push ebx
mov byte [ebp + edx - 0xa4], cl
call fcn.000131a8
movzx cx, byte [ebp - 2]
cmp cx, ax
jb 0x132e1
mov al, byte [ebp + 0xf]
push 8
add al, byte [ebp - 2]
pop ecx
movzx esi, al
mov byte [ebp + 0xf], al
mov eax, esi
cdq
idiv ecx
cmp edx, 7
jne 0x13347
push 0x100
push ebx
call fcn.000131a8
or al, 4
inc byte [ebp + 0xf]
mov byte [ebp + esi - 0xa4], al
cmp byte [edi + 1], 0
jne 0x13377
movzx esi, byte [ebp - 1]
movzx ebx, byte [ebp + 0xf]
push 0x10
push dword [ebp + 8]
call fcn.000131a8
mov cl, byte [edi + esi*2 + 3]
and al, 0xb
shl cl, 4
or al, cl
mov byte [ebp + ebx - 0xa4], al
mov al, byte [edi + esi*2 + 2]
jmp 0x1339e
movzx ebx, byte [ebp + 0xf]
push 0x10
push dword [ebp + 8]
call fcn.000131a8
mov cl, byte [edi + 2]
and al, 0xb
movzx esi, byte [ebp - 1]
shl cl, 4
or al, cl
mov byte [ebp + ebx - 0xa4], al
mov al, byte [esi + edi + 3]
mov byte [ebp + ebx - 0xa3], al
mov al, byte [edi]
movzx ecx, al
dec ecx
cmp esi, ecx
jne 0x133b4
inc byte [ebp + 0xf]
jmp 0x133b8
add byte [ebp + 0xf], 2
inc byte [ebp - 1]
mov ebx, dword [ebp + 8]
cmp byte [ebp - 1], al
jb 0x13268
movzx edi, byte [ebp + 0xf]
push 8
mov eax, edi
pop ecx
cdq
mov esi, ecx
idiv esi
xor esi, esi
cmp edx, esi
mov dword [ebp - 8], edx
je 0x13417
and byte [ebp - 1], 0
mov dword [ebp + 8], ecx
sub dword [ebp + 8], edx
cmp dword [ebp + 8], esi
jle 0x1340f
push 0x100
push ebx
call fcn.000131a8
add esi, edi
or al, 4
inc byte [ebp - 1]
mov byte [ebp + esi - 0xa3], al
movzx esi, byte [ebp - 1]
cmp esi, dword [ebp + 8]
jl 0x133ed
mov al, 8
sub al, byte [ebp - 8]
add byte [ebp + 0xf], al
cmp byte [ebp + 0xf], 0
jbe 0x13448
movzx edi, byte [ebp + 0xf]
lea esi, [ebp - 0xa4]
mov al, byte [esi]
mov cl, al
xor cl, byte [ebx + 0x28]
mov byte [esi], cl
mov cl, al
sub ecx, 0x52
add al, 0x2e
sar ecx, 7
and cl, 1
shl al, 1
xor cl, al
inc esi
dec edi
mov byte [ebx + 0x28], cl
jne 0x13427
mov al, byte [ebp + 0xf]
and byte [ebp - 1], 0
shr al, 3
mov byte [ebp + 0xb], al
pop esi
je 0x13479
movzx eax, byte [ebp - 1]
lea eax, [ebp + eax*8 - 0xa4]
push eax
push dword [ebx + 0x29]
call dword [ebx + 0xa]
test eax, eax
jne 0x13481
inc byte [ebp - 1]
mov al, byte [ebp - 1]
cmp al, byte [ebp + 0xb]
jb 0x13458
xor eax, eax
pop edi
pop ebx
leave
ret 8
push 1
pop eax
jmp 0x1347b