Function at 0x14018ba90
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push r12
push rsi
push rbx
movsxd rbx, dword [rcx]
mov r9, qword [rcx + 8]
mov eax, dword [rcx + 4]
mov r12, rbx
mov r11, rdx
test r9, r9
je 0x14018bae0
test rbx, rbx
je 0x14018bae0
movzx edx, byte [r9]
and eax, 0x100
jne 0x14018bb48
cmp rdx, 0x7f
jbe 0x14018bb68
lea rsi, [rbx + 1]
xor r10d, r10d
mov r12d, esi
mov rcx, rsi
jmp 0x14018baf2
xor ecx, ecx
mov r12d, 1
xor r10d, r10d
mov esi, 1
xor ebx, ebx
test r11, r11
je 0x14018bb3d
mov r8, qword [r11]
test r8, r8
je 0x14018bb3d
mov eax, r10d
sub rcx, rbx
mov byte [r8], r10b
lea rdx, [rbx - 1]
and eax, 1
add r8, rcx
movzx eax, al
test rbx, rbx
je 0x14018bb3a
nop word [rax + rax]
movzx ecx, byte [r9 + rdx]
xor ecx, r10d
movzx ecx, cl
add eax, ecx
mov byte [r8 + rdx], al
shr eax, 8
sub rdx, 1
jae 0x14018bb20
add qword [r11], rsi
mov eax, r12d
pop rbx
pop rsi
pop r12
ret
cmp rdx, 0x80
jbe 0x14018bb80
lea rsi, [rbx + 1]
mov r10d, 0xffffffff
mov r12d, esi
jmp 0x14018bad1
mov rsi, rbx
test eax, eax
jne 0x14018bb48
xor r10d, r10d
jmp 0x14018bad1
mov rsi, rbx
mov r10d, 0xffffffff
jne 0x14018bad1
cmp rbx, 1
je 0x14018bb6f
lea rax, [rbx - 2]
lea rcx, [rbx - 1]
cmp rax, 0xe
jbe 0x14018bd59
mov rdx, rcx
pxor xmm3, xmm3
pxor xmm4, xmm4
mov rax, r9
and rdx, 0xfffffffffffffff0
pxor xmm2, xmm2
add rdx, r9
movdqu xmm0, xmmword [rax + 1]
add rax, 0x10
movdqa xmm1, xmm0
punpckhbw xmm0, xmm4
movdqa xmm5, xmm0
punpcklbw xmm1, xmm4
punpcklwd xmm0, xmm2
punpckhwd xmm5, xmm2
por xmm0, xmm5
movdqa xmm5, xmm1
punpcklwd xmm1, xmm2
punpckhwd xmm5, xmm2
por xmm1, xmm5
por xmm0, xmm1
por xmm3, xmm0
cmp rdx, rax
jne 0x14018bbc0
movdqa xmm0, xmm3
mov r8, rcx
psrldq xmm0, 8
and r8, 0xfffffffffffffff0
por xmm3, xmm0
lea rdx, [r8 + 1]
movdqa xmm0, xmm3
psrldq xmm0, 4
por xmm3, xmm0
movd eax, xmm3
cmp rcx, r8
je 0x14018bd41
movzx ecx, byte [r9 + rdx]
or eax, ecx
lea rcx, [rdx + 1]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 1]
or eax, ecx
lea rcx, [rdx + 2]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 2]
or eax, ecx
lea rcx, [rdx + 3]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 3]
or eax, ecx
lea rcx, [rdx + 4]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 4]
or eax, ecx
lea rcx, [rdx + 5]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 5]
or eax, ecx
lea rcx, [rdx + 6]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 6]
or eax, ecx
lea rcx, [rdx + 7]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 7]
or eax, ecx
lea rcx, [rdx + 8]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 8]
or eax, ecx
lea rcx, [rdx + 9]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 9]
or eax, ecx
lea rcx, [rdx + 0xa]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 0xa]
or eax, ecx
lea rcx, [rdx + 0xb]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 0xb]
or eax, ecx
lea rcx, [rdx + 0xc]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 0xc]
or eax, ecx
lea rcx, [rdx + 0xd]
cmp rbx, rcx
jbe 0x14018bd41
movzx ecx, byte [r9 + rdx + 0xd]
or eax, ecx
lea rcx, [rdx + 0xe]
cmp rbx, rcx
jbe 0x14018bd41
movzx edx, byte [r9 + rdx + 0xe]
or eax, edx
neg eax
mov rsi, rbx
sbb r10b, r10b
cmp r10b, 1
sbb rsi, 0xffffffffffffffff
mov r12d, esi
jmp 0x14018bad1
xor eax, eax
mov edx, 1
jmp 0x14018bc34