Function at 0x587580
Capabilities:
Encrypt data using rc4 prga

Disassembly:
lea r12, [rsp - 0x18]
cmp r12, qword [r14 + 0x10]
jbe 0x5878ad
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 0x5875ed
mov rdx, qword [rsp + 0xf0]
mov qword [rsp + 0x40], rdx
test rdx, rdx
setne byte [rsp + 0x17]
jne 0x587606
jmp 0x58762f
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
test rcx, rcx
ja 0x587625
nop dword [rax + rax]
jmp 0x5878a5
cmp byte [rdx], 0
sete byte [rsp + 0x17]
jmp 0x587631
jmp 0x587631
cmp byte [rsp + 0x17], 0
jne 0x58763a
jmp 0x587695
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
mov rbx, qword [rsp + 0xf8]
jmp 0x587654
cmp rcx, 1
jae 0x58765f
jmp 0x587897
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 0x587690
jmp 0x5875ed
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 0x5876d7
cmp qword [rsp + 0x28], 0
jge 0x5876e5
nop
jmp 0x5877fa
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
cmp rcx, rax
ja 0x587705
nop
jmp 0x587892
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 0x587726
jmp 0x58775a
mov rcx, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0xe8]
mov rax, qword [rsp + 0x28]
lea rbx, [rax - 1]
nop
cmp rcx, rbx
ja 0x58774a
jmp 0x58788a
lea rbx, [rax - 1]
add rdx, rbx
movzx edx, byte [rdx]
mov byte [rsp + 0x15], dl
jmp 0x58775c
jmp 0x58775c
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 0x5877ae
jmp 0x58787d
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 0x5877da
jmp 0x587870
lea rdx, [rsp + rax + 0x70]
mov byte [rdx], bl
movzx edx, word [rsp + 0x18]
shr dx, 8
mov byte [rsp + 0x16], dl
jmp 0x5877f0
dec qword [rsp + 0x28]
jmp 0x5876d7
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.004694e0
mov rax, rdx
mov ecx, 0x21
call fcn.004694e0
mov rax, rbx
call fcn.004694e0
call fcn.004694e0
mov eax, 1
nop dword [rax]
call fcn.004695a0
xor eax, eax
call fcn.004694e0
nop
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x60], rcx
nop dword [rax]
call fcn.00466e80
mov rax, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
jmp fcn.00587580