Function at 0x10217d80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xb0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov eax, dword [0x1038100c]
xor eax, ebp
mov dword [esp + 0xa8], eax
mov eax, 0x102f8560
mov edx, 0x102f85e0
cmp byte [ebp + 0x20], 0
cmovne edx, eax
movzx eax, byte [ecx + 3]
mov ecx, eax
shr ecx, 1
and ecx, 0xfffffff0
mov dword [esp + 8], eax
and eax, 0x1c
lea eax, [edx + eax*4]
mov dword [esp], eax
add ecx, edx
mov dword [esp + 4], ecx
xor edx, edx
cmp edx, 8
jne 0x10217df6
cmp byte [ebp + 0x20], 0
je 0x10217df6
xor eax, eax
mov dword [esp + 0x90], eax
mov dword [esp + 0xa0], eax
jmp 0x10217ec8
mov eax, dword [esp + 4]
mov eax, dword [eax + edx]
mov ecx, dword [ebp + 0x10]
add ecx, eax
mov edi, dword [ebp + 0xc]
add edi, eax
add eax, dword [ebp + 8]
mov esi, 0xff
cmp eax, esi
cmovge eax, esi
test eax, eax
mov ebx, 0
cmovs eax, ebx
cmp edi, esi
cmovge edi, esi
test edi, edi
cmovs edi, ebx
cmp ecx, esi
cmovge ecx, esi
mov esi, 0xff
test ecx, ecx
cmovs ecx, ebx
shl ecx, 0x10
shl edi, 8
mov ebx, 0xffff
and edi, ebx
and eax, esi
or eax, ecx
or eax, edi
mov ecx, 0xff000000
or eax, ecx
mov ecx, dword [esp]
mov ecx, dword [ecx + edx]
mov edi, dword [ebp + 0x1c]
add edi, ecx
mov ebx, dword [ebp + 0x18]
add ebx, ecx
add ecx, dword [ebp + 0x14]
cmp ecx, esi
cmovge ecx, esi
test ecx, ecx
mov esi, 0
cmovs ecx, esi
mov esi, 0xff
cmp ebx, esi
cmovge ebx, esi
test ebx, ebx
mov esi, 0
cmovs ebx, esi
mov esi, 0xff
cmp edi, esi
cmovge edi, esi
mov esi, 0xff
mov dword [esp + edx + 0x88], eax
test edi, edi
mov eax, 0
cmovs edi, eax
shl edi, 0x10
and ecx, esi
or ecx, edi
shl ebx, 8
mov eax, 0xffff
and ebx, eax
or ecx, ebx
mov eax, 0xff000000
or ecx, eax
mov dword [esp + edx + 0x98], ecx
add edx, 4
cmp edx, 0x10
jne 0x10217dd6
xorps xmm0, xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x20], xmm0
mov ecx, dword [esp + 8]
and ecx, 1
xor eax, eax
test cl, cl
sete al
mov dword [esp + 8], ecx
lea ebx, [ecx + ecx]
add ebx, 2
add eax, eax
add eax, 2
mov dword [esp + 0x14], eax
xor eax, eax
lea edx, [esp + 0x48]
mov dword [esp], edx
mov dword [esp + 4], eax
xor edi, edi
mov ecx, eax
shr ecx, 3
mov esi, dword [esp + 0xc]
sub esi, ecx
movzx edx, byte [esi + 7]
mov ecx, eax
and cl, 7
shr edx, cl
and edx, 1
movzx esi, byte [esi + 5]
shr esi, cl
and esi, 1
lea ecx, [edx + esi*2]
inc dword [esp + ecx*4 + 0x20]
mov edx, dword [esp]
mov dword [edx + edi*4], ecx
inc edi
add eax, 4
cmp ebx, edi
jne 0x10217f11
mov eax, dword [esp + 4]
inc eax
mov edx, dword [esp]
add edx, 0x10
cmp eax, dword [esp + 0x14]
jne 0x10217f08
mov eax, dword [esp + 8]
lea edi, [eax + eax]
lea ecx, [eax*8]
xor ecx, 8
mov dword [esp + 4], ecx
shl eax, 5
add eax, esp
add eax, 0x48
mov edx, dword [esp + 0xc]
mov dword [esp], eax
mov ebx, dword [esp + 4]
lea ecx, [edi + ebx]
mov esi, ecx
shr esi, 3
mov eax, edx
sub eax, esi
movzx esi, byte [eax + 7]
and cl, 7
shr esi, cl
and esi, 1
movzx eax, byte [eax + 5]
shr eax, cl
and eax, 1
lea ecx, [esi + eax*2]
inc dword [esp + ecx*4 + 0x30]
lea eax, [esi + eax*2]
add eax, 4
mov ecx, dword [esp]
mov dword [ecx + ebx], eax
add ebx, 4
cmp ebx, 0x10
jne 0x10217f81
inc edi
mov eax, dword [esp]
add eax, 0x10
cmp edi, 4
jne 0x10217f7a
lea ebx, [esp + 0x18]
lea edi, [esp + 0x1c]
mov eax, 8
lea ecx, [esp + 0x20]
lea esi, [esp + 0x88]
mov edx, esi
push ebx
push edi
push eax
call fcn.10217220
add esp, 0xc
movzx eax, byte [ebp + 0x20]
lea edx, [esp + 0x48]
mov ecx, dword [esp + 0x10]
push eax
push dword [ebx]
push dword [edi]
mov eax, 8
push eax
push esi
lea eax, [esp + 0x34]
push eax
call fcn.10217960
add esp, 0x18
mov ecx, dword [esp + 0xa8]
xor ecx, ebp
call fcn.1021e470
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret