Function at 0x516480
Capabilities:
Encrypt data using rc4 prga

Disassembly:
lea r12, [rsp - 0x18]
cmp r12, qword [r14 + 0x10]
jbe 0x5167ad
sub rsp, 0x98
mov qword [rsp + 0x90], rbp
lea rbp, [rsp + 0x90]
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0xf0], rbx
mov qword [rsp + 0xf8], rcx
movups xmmword [rsp + 0xa0], xmm15
movups xmmword [rsp + 0xa4], xmm15
movups xmmword [rsp + 0xb4], xmm15
movups xmmword [rsp + 0xc4], xmm15
movups xmmword [rsp + 0xd4], xmm15
jmp 0x5164ed
mov rdx, qword [rsp + 0xf0]
mov qword [rsp + 0x40], rdx
test rdx, rdx
setne byte [rsp + 0x17]
jne 0x516506
jmp 0x51652f
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
test rcx, rcx
ja 0x516525
nop dword [rax + rax]
jmp 0x5167a5
cmp byte [rdx], 0
sete byte [rsp + 0x17]
jmp 0x516531
jmp 0x516531
cmp byte [rsp + 0x17], 0
jne 0x51653a
jmp 0x516595
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
mov rbx, qword [rsp + 0xf8]
jmp 0x516554
cmp rcx, 1
jae 0x51655f
jmp 0x516797
dec rbx
mov rsi, rbx
neg rbx
sar rbx, 0x3f
and ebx, 1
add rdx, rbx
mov qword [rsp + 0xe8], rdx
lea rdx, [rcx - 1]
mov qword [rsp + 0xf0], rdx
mov qword [rsp + 0xf8], rsi
jmp 0x516590
jmp 0x5164ed
mov rdx, qword [rsp + 0xf0]
mov qword [rsp + 0x20], rdx
movups xmmword [rsp + 0x4c], xmm15
movups xmmword [rsp + 0x50], xmm15
movups xmmword [rsp + 0x60], xmm15
movups xmmword [rsp + 0x70], xmm15
movups xmmword [rsp + 0x80], xmm15
mov byte [rsp + 0x16], 0
mov rdx, qword [rsp + 0x20]
dec rdx
mov qword [rsp + 0x28], rdx
jmp 0x5165d7
cmp qword [rsp + 0x28], 0
jge 0x5165e5
nop
jmp 0x5166fa
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
cmp rcx, rax
ja 0x516605
nop
jmp 0x516792
add rdx, rax
movzx edx, byte [rdx]
movzx ebx, byte [rsp + 0x16]
add edx, ebx
mov word [rsp + 0x1c], dx
mov byte [rsp + 0x15], 0
cmp qword [rsp + 0x28], 0
jg 0x516626
jmp 0x51665a
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
mov rax, qword [rsp + 0x28]
lea rbx, [rax - 1]
nop
cmp rcx, rbx
ja 0x51664a
jmp 0x51678a
lea rbx, [rax - 1]
add rdx, rbx
movzx edx, byte [rdx]
mov byte [rsp + 0x15], dl
jmp 0x51665c
jmp 0x51665c
movzx edx, word [rsp + 0x1c]
shr dx, 1
movzx ebx, byte [rsp + 0x15]
shl ebx, 7
movzx ebx, bl
or edx, ebx
mov word [rsp + 0x1e], dx
movzx ebx, word [rsp + 0x1c]
add ebx, edx
mov word [rsp + 0x18], bx
xor ebx, edx
mov word [rsp + 0x1a], bx
mov rax, qword [rsp + 0x28]
lea rdx, [rax + 1]
mov qword [rsp + 0x38], rdx
movzx ebx, word [rsp + 0x18]
movzx esi, word [rsp + 0x1a]
and ebx, esi
cmp rdx, 0x21
jb 0x5166ae
jmp 0x51677d
lea rdx, [rsp + rax + 0x4d]
mov byte [rdx], bl
mov rax, qword [rsp + 0x28]
lea rdx, [rax + 1]
mov qword [rsp + 0x30], rdx
movzx ebx, word [rsp + 0x1e]
movzx esi, word [rsp + 0x1a]
and ebx, esi
cmp rdx, 0x21
jb 0x5166da
jmp 0x516770
lea rdx, [rsp + rax + 0x70]
mov byte [rdx], bl
movzx edx, word [rsp + 0x18]
shr dx, 8
mov byte [rsp + 0x16], dl
jmp 0x5166f0
dec qword [rsp + 0x28]
jmp 0x5165d7
movzx eax, byte [rsp + 0x16]
mov byte [rsp + 0x4c], al
movzx eax, byte [rsp + 0x16]
dec eax
neg eax
mov byte [rsp + 0x6d], al
mov rax, qword [rsp + 0x20]
inc rax
mov byte [rsp + 0x6e], al
mov rax, qword [rsp + 0x4c]
mov qword [rsp + 0xa0], rax
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [rsp + 0xa4], xmm0
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rsp + 0xb4], xmm0
movups xmm0, xmmword [rsp + 0x70]
movups xmmword [rsp + 0xc4], xmm0
movups xmm0, xmmword [rsp + 0x80]
movups xmmword [rsp + 0xd4], xmm0
mov rbp, qword [rsp + 0x90]
add rsp, 0x98
ret
mov rax, rdx
mov ecx, 0x21
call fcn.00469720
mov rax, rdx
mov ecx, 0x21
call fcn.00469720
mov rax, rbx
call fcn.00469720
call fcn.00469720
mov eax, 1
nop dword [rax]
call fcn.004697e0
xor eax, eax
call fcn.00469720
nop
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rcx
nop dword [rax]
call fcn.004670c0
mov rax, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
jmp fcn.00516480