Function at 0x52ae29
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
and dword [ebp - 4], 0
push ebx
push esi
push edi
mov esi, dword [ebp - 4]
xor edx, edx
shl esi, 5
mov eax, esi
or eax, edx
xor ecx, ecx
shl eax, 5
mov edi, eax
or edi, ecx
xor ebx, ebx
inc ecx
cmp ecx, 0x20
mov word [edi*2 + 0xb71ba8], bx
jl 0x52ae47
inc edx
cmp edx, 0x20
jl 0x52ae3e
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x20
jl 0x52ae36
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
and dword [ebp - 0x10], 0
shl eax, 6
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
push 0x1f
cdq
pop ecx
idiv ecx
mov esi, dword [ebp - 0x20]
or esi, dword [ebp - 0x10]
and dword [ebp - 0xc], 0
shl esi, 5
and dword [ebp - 0x18], 0
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], eax
jmp 0x52aea7
mov esi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
push 0x1f
cdq
pop ecx
idiv ecx
or esi, dword [ebp - 0xc]
and dword [ebp - 8], 0
shl esi, 5
and dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
and edi, 0x1f
and eax, 0x1f
shl edi, 5
or edi, eax
mov eax, dword [ebp - 0x14]
cdq
push 0x1f
pop ebx
idiv ebx
shl edi, 5
mov ecx, esi
or ecx, dword [ebp - 8]
push 0x20
add ecx, ecx
and eax, ebx
or edi, eax
inc dword [ebp - 8]
movzx eax, di
mov word [ecx + 0xb71ba8], ax
mov word [ecx + 0xb81ba8], ax
mov eax, dword [ebp - 4]
add dword [ebp - 0x14], eax
pop edi
cmp dword [ebp - 8], edi
jl 0x52aec1
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], edi
jl 0x52aea4
inc dword [ebp - 0x10]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], edi
jl 0x52ae82
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x52ae71
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
xor esi, esi
shl eax, 5
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
or eax, esi
xor edx, edx
shl eax, 5
mov ecx, edx
or ecx, eax
movzx ecx, cx
movzx ebx, cx
or ebx, 0x1f0000
inc edx
cmp edx, edi
mov word [ebx*2 + 0xb71ba8], cx
jl 0x52af4a
inc esi
cmp esi, edi
jl 0x52af40
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], edi
jl 0x52af35
and dword [ebp - 0x10], 0
mov esi, dword [ebp - 0x10]
xor edx, edx
shl esi, 6
mov eax, esi
or eax, edx
xor ecx, ecx
shl eax, 5
mov edi, eax
or edi, ecx
xor ebx, ebx
inc ecx
cmp ecx, 0x20
mov word [edi*2 + 0x771ba8], bx
jl 0x52af89
inc edx
cmp edx, 0x40
jl 0x52af80
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x52af78
mov dword [ebp - 4], 1
mov eax, dword [ebp - 4]
and dword [ebp - 8], 0
shl eax, 5
and dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x14]
push 0x1f
cdq
pop ecx
idiv ecx
mov esi, dword [ebp - 0x2c]
or esi, dword [ebp - 8]
and dword [ebp - 0xc], 0
shl esi, 6
and dword [ebp - 0x18], 0
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x18]
push 0x1f
cdq
pop ecx
idiv ecx
and dword [ebp - 0x10], 0
mov ecx, esi
or ecx, dword [ebp - 0xc]
shl ecx, 5
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], eax
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
and eax, 0x3f
shl edi, 6
or edi, eax
mov eax, dword [ebp - 0x1c]
cdq
push 0x1f
pop ebx
idiv ebx
shl edi, 5
and eax, ebx
or edi, eax
mov eax, ecx
or eax, dword [ebp - 0x10]
inc dword [ebp - 0x10]
mov word [eax*2 + 0x771ba8], di
mov eax, dword [ebp - 4]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], 0x20
jl 0x52affd
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], 0x40
jl 0x52afe1
inc dword [ebp - 8]
add dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0x20
jl 0x52afc4
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x52afb3
and dword [ebp - 0x10], 0
mov edi, dword [ebp - 0x10]
xor esi, esi
shl edi, 6
mov eax, edi
or eax, esi
xor edx, edx
shl eax, 5
mov ecx, edx
or ecx, eax
movzx ecx, cx
movzx ebx, cx
or ebx, 0x1f0000
inc edx
cmp edx, 0x20
mov word [ebx*2 + 0x771ba8], cx
jl 0x52b074
inc esi
cmp esi, 0x40
jl 0x52b06b
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x52b063
xor edi, edi
mov ecx, 0x100
and dword [ebp - 0x1c], 0
lea esi, [edi + 0xf71ba8]
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x1c]
cdq
mov ebx, 0xff
idiv ebx
add dword [ebp - 0x1c], edi
mov byte [esi], al
add esi, ecx
dec dword [ebp - 0x18]
jne 0x52b0b5
inc edi
cmp edi, ecx
jl 0x52b0a8
pop edi
pop esi
pop ebx
leave
ret