Function at 0x1020add0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xb0
mov dword [ebp - 0xb0], edx
mov eax, dword [0x1038000c]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov edx, 0x103079d8
mov eax, 0x10307a58
cmp byte [ebp + 0x20], 0
cmovne eax, edx
movzx esi, byte [ecx + 3]
mov edx, esi
and edx, 0x1c
lea edx, [eax + edx*4]
mov dword [ebp - 0xa0], edx
mov dword [ebp - 0xa8], esi
shr esi, 1
and esi, 0xfffffff0
add esi, eax
mov dword [ebp - 0xa4], esi
xor edx, edx
cmp byte [ebp + 0x20], 0
je 0x1020ae3c
cmp edx, 8
jne 0x1020ae3c
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], eax
jmp 0x1020af07
mov eax, dword [ebp - 0xa4]
mov ebx, dword [eax + edx]
mov eax, dword [ebp + 0x10]
lea edi, [ebx + eax]
mov eax, dword [ebp + 0xc]
add eax, ebx
add ebx, dword [ebp + 8]
mov esi, 0xff
cmp ebx, esi
cmovge ebx, esi
test ebx, ebx
mov dword [ebp - 0x9c], edx
mov edx, 0
cmovle ebx, edx
xor edx, edx
cmp eax, esi
cmovge eax, esi
test eax, eax
cmovle eax, edx
cmp edi, esi
cmovge edi, esi
test edi, edi
cmovle edi, edx
shl edi, 0x10
shl eax, 8
or eax, edi
mov edx, 0xff000000
or ebx, edx
or ebx, eax
mov eax, dword [ebp - 0xa0]
mov edx, dword [ebp - 0x9c]
mov eax, dword [eax + edx]
mov edx, dword [ebp + 0x1c]
add edx, eax
mov edi, dword [ebp + 0x18]
add edi, eax
add eax, dword [ebp + 0x14]
cmp eax, esi
cmovge eax, esi
test eax, eax
mov esi, 0
cmovle eax, esi
mov esi, 0xff
cmp edi, esi
cmovge edi, esi
mov esi, dword [ebp - 0x9c]
mov dword [ebp + esi - 0x30], ebx
test edi, edi
mov esi, 0
cmovle edi, esi
mov ebx, 0xff
cmp edx, ebx
cmovge edx, ebx
test edx, edx
cmovle edx, esi
shl edx, 0x10
shl edi, 8
or edi, edx
mov edx, 0xff000000
or eax, edx
mov edx, dword [ebp - 0x9c]
or eax, edi
mov dword [ebp + edx - 0x20], eax
add edx, 4
cmp edx, 0x10
jne 0x1020ae24
xorps xmm0, xmm0
movups xmmword [ebp - 0x80], xmm0
movups xmmword [ebp - 0x90], xmm0
xor eax, eax
mov edx, dword [ebp - 0xa8]
and edx, 1
sete al
mov dword [ebp - 0xa8], edx
add edx, edx
add edx, 2
add eax, eax
add eax, 2
mov dword [ebp - 0xb4], eax
xor eax, eax
lea esi, [ebp - 0x70]
mov dword [ebp - 0xac], ecx
mov dword [ebp - 0xbc], edx
mov dword [ebp - 0xb8], eax
xor edi, edi
mov dword [ebp - 0xa4], esi
mov edx, eax
shr edx, 3
mov esi, dword [ebp - 0xac]
sub esi, edx
movzx ecx, byte [esi + 7]
mov dword [ebp - 0x9c], ecx
mov ecx, eax
and cl, 7
movzx edx, cl
mov dword [ebp - 0xa0], edx
mov ebx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0xa0]
bt ebx, edx
mov edx, 0
setb dl
movzx esi, byte [esi + 5]
shr esi, cl
and esi, 1
lea edx, [edx + esi*2]
mov esi, dword [ebp - 0xa4]
inc dword [ebp + edx*4 - 0x90]
mov dword [esi + edi*4], edx
mov edx, dword [ebp - 0xbc]
inc edi
add eax, 4
cmp edx, edi
jne 0x1020af64
mov eax, dword [ebp - 0xb8]
inc eax
add esi, 0x10
cmp eax, dword [ebp - 0xb4]
jne 0x1020af56
mov eax, dword [ebp - 0xa8]
lea ecx, [eax + eax]
lea edx, [eax*8]
xor edx, 8
mov dword [ebp - 0xa4], edx
shl eax, 5
add eax, ebp
add eax, 0xffffff90
mov ebx, dword [ebp - 0xa4]
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x9c]
lea ecx, [eax + ebx]
mov eax, ecx
shr eax, 3
mov esi, dword [ebp - 0xac]
sub esi, eax
movzx edx, byte [esi + 7]
and cl, 7
movzx edi, cl
xor eax, eax
bt edx, edi
setb al
movzx edx, byte [esi + 5]
shr edx, cl
and edx, 1
lea ecx, [eax + edx*2]
inc dword [ebp + ecx*4 - 0x80]
mov ecx, dword [ebp - 0x9c]
lea eax, [eax + edx*2]
add eax, 4
mov edx, dword [ebp - 0xa0]
mov dword [edx + ebx], eax
mov eax, dword [ebp - 0xa0]
add ebx, 4
cmp ebx, 0x10
jne 0x1020b013
inc ecx
add eax, 0x10
cmp ecx, 4
jne 0x1020b001
lea ebx, [ebp - 0x98]
lea edi, [ebp - 0x94]
mov eax, 8
lea ecx, [ebp - 0x90]
lea esi, [ebp - 0x30]
mov edx, esi
push ebx
push edi
push eax
call fcn.1020a1f0
add esp, 0xc
movzx eax, byte [ebp + 0x20]
lea edx, [ebp - 0x70]
mov ecx, dword [ebp - 0xb0]
push eax
push dword [ebx]
push dword [edi]
mov eax, 8
push eax
push esi
lea eax, [ebp - 0x90]
push eax
call fcn.1020a980
add esp, 0x18
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10212780
add esp, 0xb0
pop esi
pop edi
pop ebx
pop ebp
ret