Function at 0x1801508f0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
mov rdi, rdx
movzx edx, byte [rcx + 0x40]
test edx, edx
je 0x180150aed
sub edx, 1
je 0x180150a71
cmp edx, 1
jne 0x180150a65
mov rsi, qword [rdi + 8]
mov qword [rsp + 0x10], rbp
mov rbp, qword [r8 + 8]
cmp rbp, rsi
je 0x180150a60
mov r10, qword [rcx + 8]
xor r9d, r9d
mov rdx, qword [rdi + 8]
mov rax, qword [rdi]
mov rax, qword [rax]
mov r8d, dword [rax + rdx*4 - 4]
mov edx, r8d
and edx, 0x3ffff
mov eax, edx
and edx, 0x7ff
shr rax, 0xb
mov rax, qword [r10 + rax*8]
mov ebx, dword [rax + rdx*4]
mov eax, r8d
shr eax, 0x12
and ebx, 0x3ffff
inc eax
cmp eax, 0x3fff
sete r9b
and r8d, 0x3ffff
add r9d, eax
shl r9d, 0x12
or r8d, r9d
mov edx, r8d
and edx, 0x3ffff
mov eax, edx
and edx, 0x7ff
shr rax, 0xb
mov rax, qword [r10 + rax*8]
lea rdx, [rax + rdx*4]
mov eax, dword [rdx]
and eax, 0x3ffff
or eax, r9d
mov dword [rdx], eax
mov edx, eax
mov rax, qword [rcx + 0x20]
and edx, 0x3ffff
mov dword [rax + rdx*4], r8d
xor eax, eax
mov r9, qword [rcx + 0x48]
cmp rbx, r9
setb al
sub r9, rax
mov qword [rcx + 0x48], r9
mov rax, qword [rcx + 0x20]
mov r8d, dword [rax + rbx*4]
lea r11, [rax + r9*4]
xor r9d, r8d
lea r10, [rax + rbx*4]
mov rax, qword [rcx + 8]
and r9d, 0x3ffff
xor r9d, r8d
and r8d, 0x3ffff
mov edx, r8d
and r8d, 0x7ff
shr rdx, 0xb
mov rax, qword [rax + rdx*8]
mov dword [rax + r8*4], r9d
mov r9d, dword [r11]
mov eax, r9d
mov rdx, qword [rcx + 8]
and r9d, 0x3ffff
and eax, 0xfffc0000
mov r8d, r9d
or eax, ebx
shr r8, 0xb
and r9d, 0x7ff
dec rsi
mov qword [rdi + 8], rsi
mov rdx, qword [rdx + r8*8]
mov dword [rdx + r9*4], eax
mov eax, dword [r10]
mov edx, dword [r11]
mov dword [r10], edx
mov dword [r11], eax
cmp rsi, rbp
jne 0x180150932
mov rbp, qword [rsp + 0x10]
mov rbx, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
pop rdi
ret
mov r10, qword [rdi + 8]
mov r11, qword [r8 + 8]
cmp r11, r10
je 0x180150a65
nop
mov rdx, qword [rdi + 8]
mov rax, qword [rdi]
mov rax, qword [rax]
mov r8d, dword [rax + rdx*4 - 4]
mov rax, qword [rcx + 8]
and r8d, 0x3ffff
mov edx, r8d
and r8d, 0x7ff
shr rdx, 0xb
mov rax, qword [rax + rdx*8]
mov r9d, dword [rax + r8*4]
and r9d, 0x3ffff
mov dword [rax + r8*4], 0xffffffff
mov rdx, qword [rcx + 0x48]
or edx, 0xfffc0000
mov qword [rcx + 0x48], r9
mov rax, qword [rcx + 0x20]
dec r10
mov qword [rdi + 8], r10
mov dword [rax + r9*4], edx
cmp r10, r11
jne 0x180150a80
mov rbx, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
pop rdi
ret
mov rbx, qword [rdi + 8]
mov rsi, qword [r8 + 8]
cmp rsi, rbx
je 0x180150a65
nop
mov r9, qword [rcx + 8]
mov rdx, qword [rdi + 8]
mov rax, qword [rdi]
mov rax, qword [rax]
mov r8d, dword [rax + rdx*4 - 4]
and r8d, 0x3ffff
mov eax, r8d
and r8d, 0x7ff
shr rax, 0xb
mov rax, qword [r9 + rax*8]
mov r10d, dword [rax + r8*4]
lea r11, [rax + r8*4]
mov rax, qword [rcx + 0x28]
mov r8d, dword [rax - 4]
mov eax, r8d
xor eax, r10d
and r10d, 0x3ffff
and eax, 0x3ffff
xor eax, r8d
and r8d, 0x3ffff
mov edx, r8d
and r8d, 0x7ff
shr rdx, 0xb
mov rdx, qword [r9 + rdx*8]
mov dword [rdx + r8*4], eax
mov rax, qword [rcx + 0x28]
mov rdx, qword [rcx + 0x20]
mov eax, dword [rax - 4]
mov dword [rdx + r10*4], eax
mov dword [r11], 0xffffffff
add qword [rcx + 0x28], 0xfffffffffffffffc
dec rbx
mov qword [rdi + 8], rbx
cmp rbx, rsi
jne 0x180150b00
mov rbx, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
pop rdi
ret