Function at 0x10217960
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x64
mov dword [ebp - 0x68], edx
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x18]
mov eax, dword [0x1038100c]
xor eax, ebp
mov dword [ebp - 0x10], eax
movzx esi, byte [ecx + edx*4]
mov dword [ebp - 0x60], esi
and esi, 0xfffffff8
shl esi, 8
movzx edi, byte [ecx + edx*4 + 1]
mov dword [ebp - 0x5c], edi
and edi, 0xfffffffc
lea eax, [esi + edi*8]
movzx esi, byte [ecx + edx*4 + 2]
mov edx, esi
shr edx, 3
or edx, eax
mov eax, dword [ebp + 0x14]
movzx ebx, byte [ecx + eax*4]
mov dword [ebp - 0x54], ebx
and ebx, 0xfffffff8
shl ebx, 8
movzx eax, byte [ecx + eax*4 + 1]
mov edi, eax
and edi, 0xfffffffc
lea edi, [ebx + edi*8]
mov ebx, dword [ebp + 0x14]
movzx ecx, byte [ecx + ebx*4 + 2]
mov ebx, ecx
shr ebx, 3
or ebx, edi
mov dword [ebp - 0x6c], edx
cmp dx, bx
mov edi, ebx
jne 0x10217b2c
xor eax, eax
mov bl, byte [ebp + 0x1c]
test bl, bl
je 0x10217d2d
mov ebx, dword [ebp - 0x68]
mov eax, dword [ebx]
mov dword [ebp - 0x64], edi
mov edx, dword [ebx + 4]
xor ecx, ecx
mov edi, dword [ebp + 0xc]
cmp byte [edi + eax*4 + 3], 0
sete cl
xor eax, eax
cmp byte [edi + edx*4 + 3], 0
mov edx, 0xc
cmovne edx, eax
mov esi, dword [ebx + 8]
cmp byte [edi + esi*4 + 3], 0
mov esi, 0x30
cmovne esi, eax
or esi, edx
lea ecx, [ecx + ecx*2]
or esi, ecx
mov ecx, dword [ebx + 0xc]
cmp byte [edi + ecx*4 + 3], 0
mov ecx, 0xc0
cmovne ecx, eax
mov edx, dword [ebx + 0x10]
cmp byte [edi + edx*4 + 3], 0
mov edx, edi
mov edi, 0x300
cmovne edi, eax
or edi, ecx
mov ecx, dword [ebx + 0x14]
cmp byte [edx + ecx*4 + 3], 0
mov edx, 0xc00
cmovne edx, eax
or edx, edi
or edx, esi
mov ecx, dword [ebx + 0x18]
mov edi, dword [ebp + 0xc]
cmp byte [edi + ecx*4 + 3], 0
mov ecx, 0x3000
cmovne ecx, eax
mov esi, dword [ebx + 0x1c]
cmp byte [edi + esi*4 + 3], 0
mov esi, 0xc000
cmovne esi, eax
or esi, ecx
mov ecx, dword [ebx + 0x20]
cmp byte [edi + ecx*4 + 3], 0
mov edi, 0x30000
cmovne edi, eax
or edi, esi
mov ecx, dword [ebx + 0x24]
mov esi, dword [ebp + 0xc]
cmp byte [esi + ecx*4 + 3], 0
mov ecx, 0xc0000
cmovne ecx, eax
or ecx, edi
or ecx, edx
mov edx, dword [ebx + 0x28]
mov edi, esi
cmp byte [esi + edx*4 + 3], 0
mov edx, 0x300000
cmovne edx, eax
mov esi, dword [ebx + 0x2c]
cmp byte [edi + esi*4 + 3], 0
mov esi, 0xc00000
cmovne esi, eax
or esi, edx
mov edx, dword [ebx + 0x30]
cmp byte [edi + edx*4 + 3], 0
mov edx, 0x3000000
cmovne edx, eax
or edx, esi
mov esi, dword [ebx + 0x34]
cmp byte [edi + esi*4 + 3], 0
mov esi, 0xc000000
cmovne esi, eax
or esi, edx
mov edx, dword [ebx + 0x38]
cmp byte [edi + edx*4 + 3], 0
mov edx, 0x30000000
cmovne edx, eax
or edx, esi
or edx, ecx
mov ecx, dword [ebx + 0x3c]
mov bl, byte [ebp + 0x1c]
xor eax, eax
cmp byte [edi + ecx*4 + 3], 0
setne al
shl eax, 0x1e
add eax, 0xc0000000
or eax, edx
jmp 0x10217d2a
mov dword [ebp - 0x64], edi
mov ebx, dword [ebp - 0x60]
mov edx, ebx
sub edx, dword [ebp - 0x54]
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x58], edi
sub dword [ebp - 0x58], eax
imul ebx, edx
imul edi, dword [ebp - 0x58]
add edi, ebx
mov ebx, esi
sub ebx, ecx
imul esi, ebx
add esi, edi
mov dword [ebp - 0x60], edx
mov edi, dword [ebp - 0x54]
imul edi, edx
imul eax, dword [ebp - 0x58]
add eax, edi
mov dword [ebp - 0x54], ebx
imul ecx, ebx
add ecx, eax
mov dword [ebp - 0x5c], ecx
sub esi, ecx
cvtsi2ss xmm0, esi
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
cmp byte [ebp + 0x1c], 0
je 0x10217bf8
movss xmm1, dword [0x102bf860]
xor edx, edx
mov esi, dword [ebp + 0xc]
cmp dword [ebx + edx*4], 0
jle 0x10217bee
cmp byte [esi + edx*4 + 3], 0
je 0x10217be5
movzx eax, byte [esi + edx*4]
imul eax, dword [ebp - 0x60]
movzx ecx, byte [esi + edx*4 + 1]
imul ecx, dword [ebp - 0x58]
sub eax, dword [ebp - 0x5c]
add eax, ecx
movzx ecx, byte [esi + edx*4 + 2]
imul ecx, dword [ebp - 0x54]
add eax, ecx
xorps xmm2, xmm2
cvtsi2ss xmm2, eax
divss xmm2, xmm0
addss xmm2, xmm2
addss xmm2, xmm1
cvttss2si eax, xmm2
xor ecx, ecx
cmp eax, 1
sete cl
inc ecx
test eax, eax
mov eax, 0
cmovle ecx, eax
jmp 0x10217bea
mov ecx, 3
mov dword [ebp + edx*4 - 0x50], ecx
inc edx
cmp edi, edx
jne 0x10217b8b
jmp 0x10217c7a
xor edx, edx
movss xmm1, dword [0x102f84dc]
movss xmm2, dword [0x102bf860]
cmp dword [ebx + edx*4], 0
jle 0x10217c75
mov esi, ebx
mov ebx, edi
mov edi, dword [ebp + 0xc]
movzx eax, byte [edi + edx*4]
imul eax, dword [ebp - 0x60]
movzx ecx, byte [edi + edx*4 + 1]
imul ecx, dword [ebp - 0x58]
sub eax, dword [ebp - 0x5c]
add eax, ecx
movzx ecx, byte [edi + edx*4 + 2]
imul ecx, dword [ebp - 0x54]
add eax, ecx
xorps xmm3, xmm3
cvtsi2ss xmm3, eax
divss xmm3, xmm0
mulss xmm3, xmm1
addss xmm3, xmm2
cvttss2si ecx, xmm3
cmp ecx, 3
jl 0x10217c59
mov ecx, 3
xor edi, edi
test ecx, ecx
jns 0x10217c61
xor ecx, ecx
cmp ecx, 2
ja 0x10217c6d
mov edi, dword [ecx*4 + 0x102f8900]
mov dword [ebp + edx*4 - 0x50], edi
mov edi, ebx
mov ebx, esi
inc edx
cmp edi, edx
jne 0x10217c0a
mov esi, dword [ebp - 0x68]
mov eax, dword [esi + 0x3c]
mov eax, dword [ebp + eax*4 - 0x50]
mov ecx, dword [esi + 0x38]
mov ecx, dword [ebp + ecx*4 - 0x50]
shl eax, 4
shl ecx, 2
or ecx, eax
mov eax, dword [esi + 0x34]
or ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [esi + 0x30]
mov eax, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl eax, 2
or eax, ecx
mov ecx, dword [esi + 0x2c]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [esi + 0x28]
mov ecx, dword [ebp + ecx*4 - 0x50]
shl eax, 4
shl ecx, 2
or ecx, eax
mov eax, dword [esi + 0x24]
or ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [esi + 0x20]
mov eax, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl eax, 2
or eax, ecx
mov ecx, dword [esi + 0x1c]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [esi + 0x18]
mov ecx, dword [ebp + ecx*4 - 0x50]
shl eax, 4
shl ecx, 2
or ecx, eax
mov eax, dword [esi + 0x14]
or ecx, dword [ebp + eax*4 - 0x50]
mov eax, dword [esi + 0x10]
mov edx, dword [ebp + eax*4 - 0x50]
shl ecx, 4
shl edx, 2
or edx, ecx
mov eax, dword [esi + 0xc]
or edx, dword [ebp + eax*4 - 0x50]
mov eax, dword [esi + 8]
mov eax, dword [ebp + eax*4 - 0x50]
shl edx, 4
shl eax, 2
or eax, edx
mov ecx, dword [esi + 4]
or eax, dword [ebp + ecx*4 - 0x50]
mov ecx, dword [esi]
shl eax, 2
or eax, dword [ebp + ecx*4 - 0x50]
mov bl, byte [ebp + 0x1c]
mov edi, dword [ebp - 0x64]
mov esi, dword [ebp - 0x6c]
cmp si, di
jae 0x10217d4d
mov ecx, eax
shr ecx, 1
not ecx
mov edx, 0x55555555
and ecx, edx
test bl, bl
cmove ecx, edx
xor eax, ecx
mov ecx, edi
jmp 0x10217d51
mov ecx, esi
mov esi, edi
test bl, bl
mov edx, ecx
cmovne edx, esi
cmovne esi, ecx
mov ecx, dword [ebp - 0x70]
mov word [ecx], dx
mov word [ecx + 2], si
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1021e470
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret