Function at 0x18007d960
Capabilities:
Encode data using xor
Encrypt data using chaskey

Disassembly:
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rdi
push r12
push r13
push r15
sub rsp, 0x20
mov r15d, r9d
mov r13d, r8d
shr r15d, 8
mov rbx, rdx
movzx r12d, r9b
mov rdi, rcx
mov ebp, 2
cmp r8d, 1
jne 0x18007dad8
lea rbx, [rcx + 0x40]
mov r8d, ebp
mov rdx, rbx
add rcx, 8
sub rdx, rdi
test r15d, r15d
je 0x18007da50
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007d9c0
mov edx, r12d
mov rcx, rdi
call fcn.18007ae30
lea r8, [rbx + 8]
sub rdi, rbx
nop
mov rax, qword [rdi + r8 - 8]
xor qword [r8 - 8], rax
mov rax, qword [rdi + r8]
xor qword [r8], rax
mov rax, qword [rdi + r8 + 8]
xor qword [r8 + 8], rax
mov rax, qword [rdi + r8 + 0x10]
xor qword [r8 + 0x10], rax
lea r8, [r8 + 0x20]
sub rbp, 1
jne 0x18007da00
mov edx, r12d
mov rcx, rbx
mov rbx, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r13
pop r12
pop rdi
pop rbp
jmp fcn.18007ae30
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007da50
mov edx, r12d
mov rcx, rdi
call fcn.18007ac00
lea rdx, [rbx + 8]
sub rdi, rbx
nop
mov rax, qword [rdi + rdx - 8]
xor qword [rdx - 8], rax
mov rax, qword [rdi + rdx]
xor qword [rdx], rax
mov rax, qword [rdi + rdx + 8]
xor qword [rdx + 8], rax
mov rax, qword [rdi + rdx + 0x10]
xor qword [rdx + 0x10], rax
lea rdx, [rdx + 0x20]
sub rbp, 1
jne 0x18007da90
mov edx, r12d
mov rcx, rbx
mov rbx, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r13
pop r12
pop rdi
pop rbp
jmp fcn.18007ac00
mov qword [rsp + 0x50], rsi
cmp r13d, 2
jne 0x18007dd87
lea rsi, [rcx + 0xc0]
mov r8, rbp
mov rdx, rsi
add rcx, 8
sub rdx, rdi
test r15d, r15d
je 0x18007dc50
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [rcx + rdx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007db10
mov edx, r12d
mov rcx, rdi
call fcn.18007ae30
lea rbx, [rdi + 0x40]
mov rdx, rdi
sub rdx, rbx
lea rcx, [rbx + 8]
mov r8, rbp
nop dword [rax + rax]
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007db60
mov edx, r12d
mov rcx, rbx
call fcn.18007ae30
sub rdi, 0xffffffffffffff80
mov rdx, rbx
sub rdx, rdi
mov r8, rbp
lea rcx, [rdi + 8]
nop dword [rax + rax]
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007dbb0
mov edx, r12d
mov rcx, rdi
call fcn.18007ae30
mov r9, rdi
lea r8, [rsi + 8]
sub r9, rsi
nop dword [rax]
nop word [rax + rax]
mov rax, qword [r9 + r8 - 8]
xor qword [r8 - 8], rax
mov rax, qword [r9 + r8]
xor qword [r8], rax
mov rax, qword [r9 + r8 + 8]
xor qword [r8 + 8], rax
mov rax, qword [r9 + r8 + 0x10]
xor qword [r8 + 0x10], rax
lea r8, [r8 + 0x20]
sub rbp, 1
jne 0x18007dc00
mov edx, r12d
mov rcx, rsi
call fcn.18007ae30
mov rdx, rdi
mov rcx, rbx
call fcn.18007b0f0
jmp 0x18007dfaa
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007dc50
mov edx, r12d
mov rcx, rdi
call fcn.18007ac00
lea rbx, [rdi + 0x40]
mov rdx, rdi
sub rdx, rbx
lea rcx, [rbx + 8]
mov r8, rbp
nop dword [rax + rax]
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007dca0
mov edx, r12d
mov rcx, rbx
call fcn.18007ac00
sub rdi, 0xffffffffffffff80
mov rdx, rbx
sub rdx, rdi
mov r8, rbp
lea rcx, [rdi + 8]
nop dword [rax + rax]
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007dcf0
mov edx, r12d
mov rcx, rdi
call fcn.18007ac00
mov r9, rdi
lea r8, [rsi + 8]
sub r9, rsi
nop dword [rax]
nop word [rax + rax]
mov rax, qword [r9 + r8 - 8]
xor qword [r8 - 8], rax
mov rax, qword [r9 + r8]
xor qword [r8], rax
mov rax, qword [r9 + r8 + 8]
xor qword [r8 + 8], rax
mov rax, qword [r9 + r8 + 0x10]
xor qword [r8 + 0x10], rax
lea r8, [r8 + 0x20]
sub rbp, 1
jne 0x18007dd40
mov edx, r12d
mov rcx, rsi
call fcn.18007ac00
mov rdx, rdi
mov rcx, rbx
call fcn.18007b0f0
jmp 0x18007dfaa
lea eax, [r13*2]
xor esi, esi
test eax, eax
je 0x18007ded8
mov qword [rsp + 0x60], r14
nop
test esi, esi
je 0x18007ddfe
mov eax, esi
shl eax, 4
lea rcx, [rdi + rax*4]
lea eax, [rsi - 1]
shl eax, 4
lea rdx, [rcx + 8]
lea r8, [rdi + rax*4]
sub r8, rcx
mov rcx, rbp
nop dword [rax]
nop word [rax + rax]
mov rax, qword [r8 + rdx - 8]
xor qword [rdx - 8], rax
mov rax, qword [r8 + rdx]
xor qword [rdx], rax
mov rax, qword [r8 + rdx + 8]
xor qword [rdx + 8], rax
mov rax, qword [r8 + rdx + 0x10]
xor qword [rdx + 0x10], rax
lea rdx, [rdx + 0x20]
sub rcx, 1
jne 0x18007ddd0
jmp 0x18007de4c
mov eax, r13d
lea rcx, [rdi + 8]
shl eax, 5
mov r8, rbp
sub eax, 0x10
lea rdx, [rdi + rax*4]
sub rdx, rdi
nop word [rax + rax]
mov rax, qword [rdx + rcx - 8]
xor qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
xor qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
xor qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
xor qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007de20
mov eax, esi
mov edx, r12d
shl eax, 4
lea r14, [rax*4]
lea rbx, [r14 + rdi]
mov rcx, rbx
test r15d, r15d
je 0x18007de6f
call fcn.18007ae30
jmp 0x18007de74
call fcn.18007ac00
mov rax, qword [rsp + 0x58]
mov rdx, rbp
add rax, r14
sub rbx, rax
lea rcx, [rax + 8]
nop word [rax + rax]
mov rax, qword [rbx + rcx - 8]
mov qword [rcx - 8], rax
mov rax, qword [rbx + rcx]
mov qword [rcx], rax
mov rax, qword [rbx + rcx + 8]
mov qword [rcx + 8], rax
mov rax, qword [rbx + rcx + 0x10]
mov qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub rdx, 1
jne 0x18007de90
inc esi
lea eax, [r13*2]
cmp esi, eax
jb 0x18007dda0
mov rbx, qword [rsp + 0x58]
mov r14, qword [rsp + 0x60]
test r13d, r13d
je 0x18007dfaa
mov r10, rbx
mov r9, rdi
mov r11, r13
nop word [rax + rax]
mov rdx, r10
lea rcx, [r9 + 8]
sub rdx, r9
mov r8, rbp
nop dword [rax]
mov rax, qword [rdx + rcx - 8]
mov qword [rcx - 8], rax
mov rax, qword [rdx + rcx]
mov qword [rcx], rax
mov rax, qword [rdx + rcx + 8]
mov qword [rcx + 8], rax
mov rax, qword [rdx + rcx + 0x10]
mov qword [rcx + 0x10], rax
lea rcx, [rcx + 0x20]
sub r8, 1
jne 0x18007df00
add r9, 0x40
sub r10, 0xffffffffffffff80
sub r11, 1
jne 0x18007def0
test r13d, r13d
je 0x18007dfaa
mov r9d, r13d
lea r10, [rbx + 0x40]
shl r9d, 4
mov r11, r13
nop dword [rax]
lea rcx, [rdi + r9*4]
mov rdx, r10
lea rax, [rcx + 8]
sub rdx, rcx
mov r8, rbp
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rdx + rax - 8]
mov qword [rax - 8], rcx
mov rcx, qword [rdx + rax]
mov qword [rax], rcx
mov rcx, qword [rdx + rax + 8]
mov qword [rax + 8], rcx
mov rcx, qword [rdx + rax + 0x10]
mov qword [rax + 0x10], rcx
lea rax, [rax + 0x20]
sub r8, 1
jne 0x18007df70
add r9d, 0x10
sub r10, 0xffffffffffffff80
sub r11, 1
jne 0x18007df50
mov rsi, qword [rsp + 0x50]
mov rbx, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r13
pop r12
pop rdi
pop rbp
ret