Function at 0x5146b9
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 + 0xb53de0], bx
jl 0x5146d7
inc edx
cmp edx, 0x20
jl 0x5146ce
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x20
jl 0x5146c6
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 0x514737
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 + 0xb53de0], ax
mov word [ecx + 0xb63de0], ax
mov eax, dword [ebp - 4]
add dword [ebp - 0x14], eax
pop edi
cmp dword [ebp - 8], edi
jl 0x514751
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], edi
jl 0x514734
inc dword [ebp - 0x10]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], edi
jl 0x514712
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x514701
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 + 0xb53de0], cx
jl 0x5147da
inc esi
cmp esi, edi
jl 0x5147d0
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], edi
jl 0x5147c5
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 + 0x753de0], bx
jl 0x514819
inc edx
cmp edx, 0x40
jl 0x514810
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x514808
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 + 0x753de0], di
mov eax, dword [ebp - 4]
add dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], 0x20
jl 0x51488d
inc dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp dword [ebp - 0xc], 0x40
jl 0x514871
inc dword [ebp - 8]
add dword [ebp - 0x14], eax
cmp dword [ebp - 8], 0x20
jl 0x514854
inc dword [ebp - 4]
cmp dword [ebp - 4], ebx
jl 0x514843
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 + 0x753de0], cx
jl 0x514904
inc esi
cmp esi, 0x40
jl 0x5148fb
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0x20
jl 0x5148f3
xor edi, edi
mov ecx, 0x100
and dword [ebp - 0x1c], 0
lea esi, [edi + 0xf53de0]
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 0x514945
inc edi
cmp edi, ecx
jl 0x514938
pop edi
pop esi
pop ebx
leave
ret