Function at 0x521094
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffec
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov edi, 0x569a98
lea ebp, [esp + 0xc]
mov eax, dword [esp]
mov dword [ebp], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x10], eax
xor ebx, ebx
xor esi, esi
mov eax, dword [esp + 8]
mov ecx, 5
cdq
idiv ecx
test eax, eax
jle 0x5211f6
mov edx, dword [ebp]
movzx edx, byte [edx + ebx]
shr edx, 3
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx]
and dl, 7
and edx, 0xff
shl edx, 2
mov ecx, dword [ebp]
movzx ecx, byte [ecx + ebx + 1]
shr ecx, 6
or edx, ecx
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 1], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx + 1]
and dl, 0x3f
and edx, 0xff
shr edx, 1
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 2], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx + 1]
and dl, 1
and edx, 0xff
shl edx, 4
mov ecx, dword [ebp]
movzx ecx, byte [ecx + ebx + 2]
shr ecx, 4
or edx, ecx
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 3], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx + 2]
and dl, 0xf
and edx, 0xff
add edx, edx
mov ecx, dword [ebp]
movzx ecx, byte [ecx + ebx + 3]
shr ecx, 7
or edx, ecx
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 4], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx + 3]
and dl, 0x7f
and edx, 0xff
shr edx, 2
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 5], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx + 3]
and dl, 3
and edx, 0xff
shl edx, 3
mov ecx, dword [ebp]
movzx ecx, byte [ecx + ebx + 4]
shr ecx, 5
or edx, ecx
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 6], dl
mov edx, dword [ebp]
mov dl, byte [edx + ebx + 4]
and dl, 0x1f
and edx, 0xff
mov dl, byte [edi + edx]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi + 7], dl
add ebx, 5
add esi, 8
dec eax
jne 0x5210d5
mov eax, dword [esp + 8]
mov ecx, 5
cdq
idiv ecx
dec edx
je 0x52121f
dec edx
je 0x5212a7
dec edx
je 0x521357
dec edx
je 0x521421
jmp 0x52150f
mov eax, dword [ebp]
movzx eax, byte [eax + ebx]
shr eax, 3
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi], al
mov eax, dword [ebp]
mov al, byte [eax + ebx]
and al, 7
and eax, 0xff
shl eax, 2
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 1], al
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 2], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 3], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 4], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 5], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 6], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 7], dl
jmp 0x52150f
mov eax, dword [ebp]
movzx eax, byte [eax + ebx]
shr eax, 3
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi], al
mov eax, dword [ebp]
mov al, byte [eax + ebx]
and al, 7
and eax, 0xff
shl eax, 2
mov edx, dword [ebp]
movzx edx, byte [edx + ebx + 1]
shr edx, 6
or eax, edx
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 1], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 1]
and al, 0x3f
and eax, 0xff
shr eax, 1
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 2], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 1]
and al, 1
and eax, 0xff
shl eax, 4
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 3], al
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 4], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 5], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 6], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 7], dl
jmp 0x52150f
mov eax, dword [ebp]
movzx eax, byte [eax + ebx]
shr eax, 3
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi], al
mov eax, dword [ebp]
mov al, byte [eax + ebx]
and al, 7
and eax, 0xff
shl eax, 2
mov edx, dword [ebp]
movzx edx, byte [edx + ebx + 1]
shr edx, 6
or eax, edx
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 1], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 1]
and al, 0x3f
and eax, 0xff
shr eax, 1
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 2], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 1]
and al, 1
and eax, 0xff
shl eax, 4
mov edx, dword [ebp]
movzx edx, byte [edx + ebx + 2]
shr edx, 4
or eax, edx
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 3], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 2]
and al, 0xf
and eax, 0xff
add eax, eax
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 4], al
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 5], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 6], dl
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 7], dl
jmp 0x52150f
mov eax, dword [ebp]
movzx eax, byte [eax + ebx]
shr eax, 3
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi], al
mov eax, dword [ebp]
mov al, byte [eax + ebx]
and al, 7
and eax, 0xff
shl eax, 2
mov edx, dword [ebp]
movzx edx, byte [edx + ebx + 1]
shr edx, 6
or eax, edx
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 1], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 1]
and al, 0x3f
and eax, 0xff
shr eax, 1
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 2], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 1]
and al, 1
and eax, 0xff
shl eax, 4
mov edx, dword [ebp]
movzx edx, byte [edx + ebx + 2]
shr edx, 4
or eax, edx
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 3], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 2]
and al, 0xf
and eax, 0xff
add eax, eax
mov edx, dword [ebp]
movzx edx, byte [edx + ebx + 3]
shr edx, 7
or eax, edx
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 4], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 3]
and al, 0x7f
and eax, 0xff
shr eax, 2
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 5], al
mov eax, dword [ebp]
mov al, byte [eax + ebx + 3]
and al, 3
and eax, 0xff
shl eax, 3
mov al, byte [edi + eax]
mov edx, dword [esp + 0x10]
mov byte [edx + esi + 6], al
mov eax, dword [esp + 0x10]
mov dl, byte [0x569ab8]
mov byte [eax + esi + 7], dl
mov eax, dword [esp + 8]
add eax, 4
mov ecx, 5
cdq
idiv ecx
shl eax, 3
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
ret