Function at 0x102184f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, edx
imul edx, dword [ebp + 8], 0xb
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0xc], eax
mov esi, ecx
add edx, dword [eax + ebx*4]
mov dword [ebp + 8], edx
cmp ebx, 0x10
jge 0x10218668
movzx eax, byte [edx]
mov edi, dword [esi + 4]
mov dword [ebp - 4], eax
mov eax, dword [esi + 8]
test eax, eax
jns 0x10218555
mov ecx, dword [esi + 0xc]
lea eax, [ecx + 4]
cmp eax, dword [esi + 0x10]
ja 0x1021854b
mov ecx, dword [ecx]
mov eax, dword [esi]
add dword [esi + 0xc], 3
bswap ecx
shr ecx, 8
shl eax, 0x18
or ecx, eax
add dword [esi + 8], 0x18
mov dword [esi], ecx
jmp 0x10218555
mov ecx, esi
call fcn.1022aae0
mov edx, dword [ebp + 8]
mov ecx, dword [esi + 8]
mov eax, edi
imul eax, dword [ebp - 4]
mov dword [ebp - 8], ecx
shr eax, 8
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
mov dword [ebp - 4], eax
shr eax, cl
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
jbe 0x10218595
or eax, 0xffffffff
sub eax, ecx
add edi, eax
lea eax, [ecx + 1]
mov ecx, dword [ebp - 8]
shl eax, cl
sub dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov dword [esi], eax
mov dword [ebp - 4], 1
jmp 0x102185a1
mov edi, ecx
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 8]
cmp edi, 0x7e
ja 0x102185b9
movzx eax, byte [edi + 0x1038bc40]
movzx edi, byte [edi + 0x1038bcc0]
sub ecx, eax
mov dword [esi + 8], ecx
cmp dword [ebp - 4], 0
mov dword [esi + 4], edi
je 0x102187d6
movzx eax, byte [edx + 1]
mov edi, dword [esi + 4]
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 8]
test eax, eax
jns 0x10218605
mov edx, dword [esi + 0xc]
lea eax, [edx + 4]
cmp eax, dword [esi + 0x10]
ja 0x102185fe
mov ecx, dword [edx]
lea eax, [edx + 3]
mov dword [esi + 0xc], eax
mov eax, dword [esi]
bswap ecx
shr ecx, 8
shl eax, 0x18
or ecx, eax
add dword [esi + 8], 0x18
mov dword [esi], ecx
jmp 0x10218605
mov ecx, esi
call fcn.1022aae0
mov eax, dword [esi]
mov edx, edi
imul edx, dword [ebp - 0x10]
mov ecx, dword [esi + 8]
shr eax, cl
shr edx, 8
cmp eax, edx
jbe 0x1021862e
or eax, 0xffffffff
sub eax, edx
add edi, eax
lea eax, [edx + 1]
shl eax, cl
mov edx, 1
sub dword [esi], eax
jmp 0x10218632
mov edi, edx
xor edx, edx
cmp edi, 0x7e
ja 0x1021864a
movzx eax, byte [edi + 0x1038bc40]
movzx edi, byte [edi + 0x1038bcc0]
sub ecx, eax
mov dword [esi + 8], ecx
mov eax, dword [ebp - 0xc]
mov dword [esi + 4], edi
test edx, edx
jne 0x10218674
mov edx, dword [eax + ebx*4 + 4]
inc ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp + 8], edx
cmp ebx, 0x10
jne 0x102185c6
pop edi
pop esi
mov eax, 0x10
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [eax + ebx*4 + 4]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x10], eax
movzx eax, byte [ebx + 2]
mov dword [ebp + 8], eax
mov eax, dword [esi + 8]
test eax, eax
jns 0x102186ba
mov edx, dword [esi + 0xc]
lea eax, [edx + 4]
cmp eax, dword [esi + 0x10]
ja 0x102186b3
mov ecx, dword [edx]
lea eax, [edx + 3]
mov dword [esi + 0xc], eax
mov eax, dword [esi]
bswap ecx
shr ecx, 8
shl eax, 0x18
or ecx, eax
add dword [esi + 8], 0x18
mov dword [esi], ecx
jmp 0x102186ba
mov ecx, esi
call fcn.1022aae0
mov eax, dword [esi]
mov edx, edi
imul edx, dword [ebp + 8]
mov ecx, dword [esi + 8]
shr eax, cl
shr edx, 8
cmp eax, edx
jbe 0x102186df
sub edi, edx
lea eax, [edx + 1]
shl eax, cl
dec edi
sub dword [esi], eax
mov edx, 1
jmp 0x102186e3
mov edi, edx
xor edx, edx
cmp edi, 0x7e
ja 0x102186fb
movzx eax, byte [edi + 0x1038bc40]
movzx edi, byte [edi + 0x1038bcc0]
sub ecx, eax
mov dword [esi + 8], ecx
mov dword [esi + 4], edi
test edx, edx
jne 0x1021870f
mov eax, 1
mov dword [ebp - 8], eax
lea eax, [edx + 0xb]
jmp 0x10218720
mov edx, ebx
mov ecx, esi
call fcn.102187e0
mov dword [ebp - 8], eax
mov eax, 0x16
mov ebx, dword [ebp - 0x10]
mov edi, dword [esi + 8]
add ebx, eax
mov dword [ebp + 8], ebx
test edi, edi
jns 0x1021875f
mov edx, dword [esi + 0xc]
lea eax, [edx + 4]
cmp eax, dword [esi + 0x10]
ja 0x10218758
mov ecx, dword [edx]
lea eax, [edx + 3]
mov dword [esi + 0xc], eax
mov eax, dword [esi]
bswap ecx
shl eax, 0x18
shr ecx, 8
or ecx, eax
lea eax, [edi + 0x18]
mov dword [esi], ecx
mov dword [esi + 8], eax
jmp 0x1021875f
mov ecx, esi
call fcn.1022aae0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov ebx, dword [esi]
mov eax, ebx
shr eax, cl
shr edx, 1
mov edi, edx
sub edi, eax
lea eax, [ecx - 1]
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
sar edi, 0x1f
add eax, edi
or eax, 1
mov dword [esi + 4], eax
lea eax, [edx + 1]
and eax, edi
mov edx, 4
shl eax, cl
mov ecx, dword [ebp - 8]
sub ebx, eax
xor ecx, edi
mov dword [esi], ebx
mov ebx, dword [ebp + 0x10]
xor eax, eax
sub ecx, edi
test ebx, ebx
movsx ecx, cx
cmovg eax, edx
mov edx, dword [ebp + 0xc]
movsx eax, word [eax + edx]
mov edx, dword [ebp + 0x14]
imul ecx, eax
movzx eax, byte [ebx + 0x10389c80]
inc ebx
mov dword [ebp + 0x10], ebx
mov word [edx + eax*2], cx
cmp ebx, 0x10
jge 0x10218668
mov edx, dword [ebp + 8]
jmp 0x10218516
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret