Function at 0x1394960
Capabilities:
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [0x11bff00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor esi, esi
mov dword [ebp - 0x810], eax
mov dword [ebp - 0x818], ecx
xor edi, edi
nop
push ebx
mov dword [ebp + edi*4 - 0x404], edi
call fcn.013b2610
mov ecx, eax
xor edx, edx
mov eax, edi
div ecx
inc edi
add esp, 4
movzx edx, byte [edx + ebx]
mov dword [ebp + edi*4 - 0x808], edx
cmp edi, 0x100
jl 0x1394990
xor edi, edi
xor eax, eax
mov edx, dword [ebp + eax - 0x404]
mov ecx, dword [ebp + eax - 0x804]
add ecx, edx
add ecx, esi
and ecx, 0x800000ff
jns 0x13949e2
dec ecx
or ecx, 0xffffff00
inc ecx
mov esi, dword [ebp + ecx*4 - 0x404]
mov dword [ebp + eax - 0x404], esi
mov esi, dword [ebp + eax - 0x800]
mov dword [ebp + ecx*4 - 0x404], edx
mov edx, dword [ebp + eax - 0x400]
add esi, edx
add ecx, esi
and ecx, 0x800000ff
jns 0x1394a19
dec ecx
or ecx, 0xffffff00
inc ecx
mov esi, dword [ebp + ecx*4 - 0x404]
mov dword [ebp + eax - 0x400], esi
mov esi, dword [ebp + eax - 0x7fc]
mov dword [ebp + ecx*4 - 0x404], edx
mov edx, dword [ebp + eax - 0x3fc]
add esi, edx
add ecx, esi
and ecx, 0x800000ff
jns 0x1394a50
dec ecx
or ecx, 0xffffff00
inc ecx
mov esi, dword [ebp + ecx*4 - 0x404]
mov dword [ebp + eax - 0x3fc], esi
mov esi, dword [ebp + eax - 0x7f8]
mov dword [ebp + ecx*4 - 0x404], edx
mov edx, dword [ebp + eax - 0x3f8]
add esi, edx
add esi, ecx
and esi, 0x800000ff
jns 0x1394a87
dec esi
or esi, 0xffffff00
inc esi
mov ecx, dword [ebp + esi*4 - 0x404]
mov dword [ebp + eax - 0x3f8], ecx
add eax, 0x10
mov dword [ebp + esi*4 - 0x404], edx
cmp eax, 0x400
jl 0x13949c0
mov ebx, dword [ebp - 0x810]
push ebx
call fcn.013b2610
inc eax
push eax
call fcn.013bb829
push ebx
mov dword [ebp - 0x80c], eax
xor esi, esi
mov dword [ebp - 0x808], edi
call fcn.013b2610
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x80c]
jle 0x1394ba5
sub eax, ebx
mov dword [ebp - 0x814], eax
lea ebx, [ebx]
inc esi
and esi, 0x800000ff
jns 0x1394b01
dec esi
or esi, 0xffffff00
inc esi
mov eax, dword [ebp + esi*4 - 0x404]
add edi, eax
and edi, 0x800000ff
jns 0x1394b1a
dec edi
or edi, 0xffffff00
inc edi
mov ecx, dword [ebp + edi*4 - 0x404]
mov dword [ebp + esi*4 - 0x404], ecx
mov dword [ebp + edi*4 - 0x404], eax
add eax, dword [ebp + esi*4 - 0x404]
and eax, 0x800000ff
jns 0x1394b44
dec eax
or eax, 0xffffff00
inc eax
mov cl, byte [ebx]
movzx edx, cl
cmp dword [ebp + eax*4 - 0x404], edx
lea eax, [ebp + eax*4 - 0x404]
jne 0x1394b64
mov eax, dword [ebp - 0x814]
mov byte [eax + ebx], cl
jmp 0x1394b71
mov dl, byte [eax]
mov eax, dword [ebp - 0x814]
xor dl, cl
mov byte [eax + ebx], dl
mov ecx, dword [ebp - 0x810]
inc dword [ebp - 0x808]
push ecx
inc ebx
call fcn.013b2610
add esp, 4
cmp dword [ebp - 0x808], eax
jl 0x1394af0
mov eax, dword [ebp - 0x80c]
mov edx, dword [ebp - 0x808]
mov byte [eax + edx], 0
jmp 0x1394baa
mov edx, esi
mov byte [eax + edx], dl
mov ecx, dword [ebp - 0x818]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.013bc42a
mov esp, ebp
pop ebp
ret