Function at 0x180018c70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
mov rsi, r9
mov r9, rcx
mov rax, r8
sub rax, rdx
cmp rax, 0x83
jl 0x180018f91
mov r11, qword [rsp + 0xb8]
add r11, 0xffffffffffffffc0
cmp r11, rsi
jle 0x180018f91
add r8, 0xffffffffffffff7f
movzx r15d, byte [rdx]
inc rdx
mov r13b, 1
jmp 0x180018cc7
xor r13b, 1
mov rdx, r12
movzx eax, r15b
lea rcx, [0x18002e400]
movsx rdi, word [rcx + rax*2]
mov rcx, rax
shr rcx, 2
and eax, 3
movzx ebx, byte [rdx + rcx + 1]
movzx r10d, byte [rdx + rax]
movzx ebp, bl
movzx r15d, r10b
cmove r15d, ebp
lea rbx, [rdx + rax + 1]
lea r12, [rdx + rcx + 2]
cmovne r12, rbx
movzx ecx, byte [rdx]
movzx ebx, byte [rdx + 1]
shl ebx, 8
or ebx, ecx
movzx r14d, dil
movabs rcx, 0xffff00ff0000
mov qword [rsp + 0x40], rcx
movzx ebp, word [rsp + rax*2 + 0x40]
and ebp, ebx
mov rcx, rdi
sub rcx, rbp
jg 0x180018d97
add rcx, rsi
sub rcx, r14
js 0x180018ea7
mov rbp, qword [rsp + 0xb0]
add rcx, rbp
test rax, rax
cmove rcx, rdx
movups xmm0, xmmword [rcx]
movups xmm1, xmmword [rcx + 0x10]
movups xmm2, xmmword [rcx + 0x20]
movups xmm3, xmmword [rcx + 0x30]
movups xmmword [rbp + rsi + 0x30], xmm3
movups xmmword [rbp + rsi + 0x20], xmm2
movups xmmword [rbp + rsi + 0x10], xmm1
movups xmmword [rbp + rsi], xmm0
add rsi, r14
test r13b, 1
jne 0x180018cc0
cmp r12, r8
jae 0x180018f8b
cmp rsi, r11
jl 0x180018cc0
jmp 0x180018f8b
test dil, 0x80
jne 0x180018f8e
lea rax, [rcx + rsi]
cmp rax, r14
js 0x180018f8e
mov rbp, r14
sub rbp, rcx
mov rax, qword [rsp + 0xb0]
lea rdi, [rax + rsi]
cmp rbp, 0x10
jae 0x180018edf
cmp r14, rcx
je 0x180018f8e
mov rax, rdi
sub rax, rbp
movzx ecx, byte [rax]
mov byte [rdi], cl
movzx ecx, byte [rax + 1]
mov byte [rdi + 1], cl
movzx ecx, byte [rax + 2]
mov byte [rdi + 2], cl
movzx ecx, byte [rax + 3]
mov byte [rdi + 3], cl
movzx ecx, byte [rax + 4]
mov byte [rdi + 4], cl
movzx ecx, byte [rax + 5]
mov byte [rdi + 5], cl
movzx ecx, byte [rax + 6]
mov byte [rdi + 6], cl
movzx ecx, byte [rax + 7]
mov byte [rdi + 7], cl
movzx ecx, byte [rax + 8]
mov byte [rdi + 8], cl
movzx ecx, byte [rax + 9]
mov byte [rdi + 9], cl
movzx ecx, byte [rax + 0xa]
mov byte [rdi + 0xa], cl
movzx ecx, byte [rax + 0xb]
mov byte [rdi + 0xb], cl
movzx ecx, byte [rax + 0xc]
mov byte [rdi + 0xc], cl
movzx ecx, byte [rax + 0xd]
mov byte [rdi + 0xd], cl
movzx ecx, byte [rax + 0xe]
mov byte [rdi + 0xe], cl
movzx eax, byte [rax + 0xf]
mov byte [rdi + 0xf], al
mov eax, dword [0x18003d018]
mov ecx, dword [0x18003d068]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
cmp eax, dword [rcx + 4]
jg 0x180018f1a
lea rax, [0x18003d008]
movzx eax, byte [rbp + rax]
lea rcx, [rdi + 0x10]
sub rcx, rax
movups xmm0, xmmword [rcx]
movups xmmword [rdi + 0x10], xmm0
lea rcx, [rdi + 0x20]
sub rcx, rax
movups xmm0, xmmword [rcx]
movups xmmword [rdi + 0x20], xmm0
lea rcx, [rdi + 0x30]
sub rcx, rax
movups xmm0, xmmword [rcx]
movups xmmword [rdi + 0x30], xmm0
jmp 0x180018d73
test rax, rax
jne 0x180018f8e
movups xmm0, xmmword [rdx]
movups xmm1, xmmword [rdx + 0x10]
movups xmm2, xmmword [rdx + 0x20]
movups xmm3, xmmword [rdx + 0x30]
mov rax, qword [rsp + 0xb0]
movups xmmword [rax + rsi + 0x30], xmm3
movups xmmword [rax + rsi + 0x20], xmm2
movups xmmword [rax + rsi + 0x10], xmm1
movups xmmword [rax + rsi], xmm0
jmp 0x180018d73
mov rax, rdi
sub rax, rbp
movups xmm0, xmmword [rax]
movups xmmword [rdi], xmm0
lea rax, [rdi + 0x10]
sub rax, rbp
movups xmm0, xmmword [rax]
movups xmmword [rdi + 0x10], xmm0
lea rax, [rdi + 0x20]
sub rax, rbp
movups xmm0, xmmword [rax]
movups xmmword [rdi + 0x20], xmm0
lea rax, [rdi + 0x30]
sub rax, rbp
movups xmm0, xmmword [rax]
movups xmmword [rdi + 0x30], xmm0
jmp 0x180018d73
lea rcx, [0x18003d018]
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], r11
mov rbx, rdi
mov qword [rsp + 0x20], rbp
call fcn.18001ad04
mov rbp, qword [rsp + 0x20]
mov r11, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
cmp dword [0x18003d018], 0xffffffff
jne 0x180018e6c
call fcn.180018fb0
lea rcx, [0x18003d018]
call fcn.18001ad9c
mov rbp, qword [rsp + 0x20]
mov rdi, rbx
mov r11, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
jmp 0x180018e6c
mov rdx, r12
dec rdx
mov qword [r9], rdx
mov qword [r9 + 8], rsi
mov rax, r9
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret