Function at 0x10020f40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax + 0x28]
test dword [ebx + 0xc], ecx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], ebx
jne 0x10020f6d
push edi
mov ecx, ebx
call fcn.10020c60
mov eax, dword [ebx + 0x24]
mov edx, dword [ebx + 0xc]
or dword [eax + 0x28], edx
mov eax, dword [ebx + 0x28]
mov ecx, dword [eax + 4]
mov eax, dword [edi]
mov edx, eax
shr edx, 0x16
movsx esi, word [ecx + edx*2]
test esi, esi
mov dword [ebp + 8], ecx
jl 0x10021026
mov ecx, esi
mov edx, eax
mov eax, dword [edi + 4]
and ecx, 0xf
shl edx, cl
sub eax, ecx
mov dword [edi + 4], eax
mov dword [edi], edx
mov edx, eax
jns 0x1002101e
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
cmp eax, ecx
jae 0x10020fda
movzx edx, byte [eax]
movzx ecx, byte [eax + 1]
shl edx, 8
add edx, ecx
mov ecx, dword [edi + 4]
neg ecx
shl edx, cl
mov ecx, dword [edi]
add eax, 2
mov dword [edi + 8], eax
add edx, ecx
mov ecx, dword [edi + 4]
add ecx, 0x10
mov dword [edi], edx
mov dword [edi + 4], ecx
sar esi, 4
jmp 0x1002115d
jne 0x10021001
mov ecx, 8
sub ecx, edx
movzx edx, byte [eax]
shl edx, cl
add edx, dword [edi]
mov ecx, dword [edi + 4]
inc eax
add ecx, 8
mov dword [edi], edx
mov dword [edi + 4], ecx
mov dword [edi + 8], eax
sar esi, 4
jmp 0x1002115d
cmp edx, 0xfffffff0
jge 0x1002101b
mov ecx, dword [edi + 0x10]
test ecx, ecx
jne 0x10021014
mov dword [edi + 0x10], 2
mov dword [edi + 4], 0x7f
mov dword [edi + 8], eax
sar esi, 4
jmp 0x1002115d
mov edx, dword [edi + 4]
shl eax, 0xa
add edx, 0xfffffff6
mov dword [edi], eax
mov dword [edi + 4], edx
mov ebx, edx
jns 0x100210a5
mov edx, dword [edi + 8]
mov ecx, dword [edi + 0xc]
cmp edx, ecx
jae 0x10021067
movzx ebx, byte [edx]
movzx ecx, byte [edx + 1]
shl ebx, 8
add ebx, ecx
mov ecx, dword [edi + 4]
neg ecx
shl ebx, cl
add edx, 2
add ebx, eax
mov eax, dword [edi + 4]
add eax, 0x10
mov dword [edi], ebx
mov dword [edi + 4], eax
jmp 0x1002109f
jne 0x10021085
mov ecx, 8
sub ecx, ebx
movzx ebx, byte [edx]
shl ebx, cl
add ebx, eax
mov eax, dword [edi + 4]
inc edx
add eax, 8
mov dword [edi], ebx
mov dword [edi + 4], eax
jmp 0x1002109f
cmp ebx, 0xfffffff0
jge 0x1002109f
mov eax, dword [edi + 0x10]
test eax, eax
jne 0x10021098
mov dword [edi + 0x10], 2
mov dword [edi + 4], 0x7f
mov ecx, dword [ebp + 8]
mov dword [edi + 8], edx
mov eax, dword [edi]
xor edx, edx
test eax, eax
setl dl
add edx, esi
movsx esi, word [ecx + edx*2 + 0x10000]
test esi, esi
jge 0x100210e4
lea esp, [esp]
mov edx, dword [edi]
mov eax, dword [edi + 4]
shl edx, 1
dec eax
mov dword [edi + 4], eax
xor eax, eax
mov ebx, edx
test ebx, ebx
setl al
mov dword [edi], edx
add eax, esi
movsx esi, word [ecx + eax*2 + 0x10000]
test esi, esi
jl 0x100210c0
mov ecx, dword [edi]
mov eax, dword [edi + 4]
shl ecx, 1
dec eax
mov dword [edi], ecx
mov dword [edi + 4], eax
mov edx, eax
jns 0x1002115a
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
cmp eax, ecx
jae 0x10021122
movzx ebx, byte [eax]
movzx ecx, byte [eax + 1]
shl ebx, 8
add ebx, ecx
mov ecx, edx
neg ecx
shl ebx, cl
mov ecx, dword [edi]
add eax, 2
add ebx, ecx
add edx, 0x10
mov dword [edi], ebx
mov dword [edi + 4], edx
jmp 0x10021157
jne 0x1002113d
movzx ebx, byte [eax]
mov ecx, 8
sub ecx, edx
shl ebx, cl
add ebx, dword [edi]
inc eax
add edx, 8
mov dword [edi], ebx
mov dword [edi + 4], edx
jmp 0x10021157
cmp edx, 0xfffffff0
jge 0x10021157
mov ecx, dword [edi + 0x10]
test ecx, ecx
jne 0x10021150
mov dword [edi + 0x10], 2
mov dword [edi + 4], 0x7f
mov dword [edi + 8], eax
mov ebx, dword [ebp - 4]
mov edx, dword [ebx + 4]
movzx eax, byte [edx + esi]
add eax, dword [0x100b8e98]
push eax
mov ecx, edi
call fcn.10012390
mov ecx, dword [ebx + 0x1c]
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push ecx
mov ecx, dword [0x100b8e98]
mov dword [ebp + 8], eax
sar eax, cl
push esi
mov esi, dword [ebp + 0x10]
call fcn.10020d40
mov edx, dword [esi]
mov ecx, dword [0x100b8e98]
mov ebx, dword [ebp + 8]
shl edx, cl
and ecx, ebx
push 1
lea eax, [edx + ecx + 1]
mov ecx, edi
mov dword [esi], eax
call fcn.100122d0
mov ecx, dword [esi]
neg eax
xor ecx, eax
sub ecx, eax
pop edi
mov dword [esi], ecx
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10