Function at 0x518fe2
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 + 0xb52668], bx
jl 0x519000
inc edx
cmp edx, 0x20
jl 0x518ff7
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x20
jl 0x518fef
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 0x519060
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 + 0xb52668], ax
mov word [ecx + 0xb62668], ax
mov eax, dword [ebp - 4]
add dword [ebp - 0x14], eax
pop edi
cmp dword [ebp - 8], edi
jl 0x51907a
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], edi
jl 0x51905d
inc dword [ebp - 0x10]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], edi
jl 0x51903b
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x51902a
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 + 0xb52668], cx
jl 0x519103
inc esi
cmp esi, edi
jl 0x5190f9
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], edi
jl 0x5190ee
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 + 0x752668], bx
jl 0x519142
inc edx
cmp edx, 0x40
jl 0x519139
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x519131
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 + 0x752668], di
mov eax, dword [ebp - 4]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], 0x20
jl 0x5191b6
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], 0x40
jl 0x51919a
inc dword [ebp - 8]
add dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0x20
jl 0x51917d
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x51916c
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 + 0x752668], cx
jl 0x51922d
inc esi
cmp esi, 0x40
jl 0x519224
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x51921c
xor edi, edi
mov ecx, 0x100
and dword [ebp - 0x1c], 0
lea esi, [edi + 0xf52668]
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 0x51926e
inc edi
cmp edi, ecx
jl 0x519261
pop edi
pop esi
pop ebx
leave
ret