Function at 0x5190f6
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 + 0xb5cce8], bx
jl 0x519114
inc edx
cmp edx, 0x20
jl 0x51910b
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x20
jl 0x519103
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 0x519174
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 + 0xb5cce8], ax
mov word [ecx + 0xb6cce8], ax
mov eax, dword [ebp - 4]
add dword [ebp - 0x14], eax
pop edi
cmp dword [ebp - 8], edi
jl 0x51918e
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], edi
jl 0x519171
inc dword [ebp - 0x10]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], edi
jl 0x51914f
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x51913e
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 + 0xb5cce8], cx
jl 0x519217
inc esi
cmp esi, edi
jl 0x51920d
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], edi
jl 0x519202
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 + 0x75cce8], bx
jl 0x519256
inc edx
cmp edx, 0x40
jl 0x51924d
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x519245
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 + 0x75cce8], di
mov eax, dword [ebp - 4]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], 0x20
jl 0x5192ca
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], 0x40
jl 0x5192ae
inc dword [ebp - 8]
add dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0x20
jl 0x519291
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x519280
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 + 0x75cce8], cx
jl 0x519341
inc esi
cmp esi, 0x40
jl 0x519338
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x519330
xor edi, edi
mov ecx, 0x100
and dword [ebp - 0x1c], 0
lea esi, [edi + 0xf5cce8]
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 0x519382
inc edi
cmp edi, ecx
jl 0x519375
pop edi
pop esi
pop ebx
leave
ret