Function at 0x180107d30
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x60
mov rax, rdx
mov rbx, r9
sub rax, rcx
mov rbp, r8
and rax, 0xfffffffffffffff8
mov r13, rdx
mov rsi, rcx
cmp rax, 0x100
jle 0x180107e08
movzx edi, byte [rsp + 0xc0]
nop dword [rax]
test rbp, rbp
jle 0x180107e81
mov r9, rbx
mov byte [rsp + 0x20], dil
mov r8, r13
lea rcx, [rsp + 0x48]
mov rdx, rsi
call fcn.180108bc0
mov r15, qword [rsp + 0x48]
mov rcx, rbp
mov r14, qword [rsp + 0x50]
mov rax, r15
sar rcx, 2
sub rax, rsi
sar rbp, 1
and rax, 0xfffffffffffffff8
add rbp, rcx
mov byte [rsp + 0x20], dil
mov rcx, r13
mov r9, rbx
sub rcx, r14
mov r8, rbp
and rcx, 0xfffffffffffffff8
cmp rax, rcx
jge 0x180107ddc
mov rdx, r15
mov rcx, rsi
call fcn.180107d30
mov rsi, r14
jmp 0x180107df2
mov rdx, r13
mov rcx, r14
call fcn.180107d30
mov r13, r15
mov qword [rsp + 0xa8], r15
mov rax, r13
sub rax, rsi
and rax, 0xfffffffffffffff8
cmp rax, 0x100
jg 0x180107d70
cmp rsi, r13
je 0x180107e72
lea r15, [rsi + 8]
cmp r15, r13
je 0x180107e72
nop word [rax + rax]
mov rbp, qword [r15]
lea r14, [r15 - 8]
mov r8, qword [r14]
mov rdx, rbp
mov rcx, rbx
mov rdi, r15
call fcn.1801055c0
test al, al
je 0x180107e66
nop dword [rax]
mov rax, qword [r14]
mov qword [rdi], rax
sub rdi, 8
cmp rdi, rsi
je 0x180107e66
mov r8, qword [r14 - 8]
sub r14, 8
mov rdx, rbp
mov rcx, rbx
call fcn.1801055c0
test al, al
jne 0x180107e40
add r15, 8
mov qword [rdi], rbp
cmp r15, r13
jne 0x180107e20
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0xb0], r12
mov r15, r13
sub r15, rsi
sar r15, 3
mov r12, r15
mov qword [rsp + 0x40], r15
sar r12, 1
test r12, r12
jle 0x180107f9c
lea rdx, [r15 - 1]
mov rdi, rdx
mov qword [rsp + 0x48], rdx
sar rdi, 1
nop word [rax + rax]
mov r14, qword [rsi + r12*8 - 8]
dec r12
mov qword [rsp + 0xa0], r14
mov r13, r12
mov rcx, r12
cmp r12, rdi
jge 0x180107f35
nop dword [rax + rax]
lea rbp, [rcx + rcx]
mov rcx, rbx
lea r15, [rbp + 2]
mov rdx, qword [rsi + r15*8]
lea r15, [rsi + r15*8]
mov r8, qword [r15 - 8]
lea r14, [r15 - 8]
call fcn.1801055c0
movzx eax, al
test al, al
cmovne r15, r14
xor rax, 1
lea rcx, [rax + 1]
mov rax, qword [r15]
add rcx, rbp
mov qword [rsi + r13*8], rax
mov r13, rcx
cmp rcx, rdi
jl 0x180107ee0
mov r14, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x48]
cmp r13, rdi
jne 0x180107f4c
test r15b, 1
jne 0x180107f4c
mov rax, qword [rsi + r15*8 - 8]
mov qword [rsi + r13*8], rax
mov r13, rdx
cmp r12, r13
jge 0x180107f7b
lea rbp, [r13 - 1]
mov r8, r14
sar rbp, 1
mov rcx, rbx
mov rdx, qword [rsi + rbp*8]
call fcn.1801055c0
test al, al
je 0x180107f7b
mov rax, qword [rsi + rbp*8]
mov qword [rsi + r13*8], rax
mov r13, rbp
cmp r12, rbp
jl 0x180107f51
mov qword [rsi + r13*8], r14
lea rdx, [r15 - 1]
test r12, r12
jg 0x180107ec0
movzx edi, byte [rsp + 0xc0]
mov r13, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xb0]
cmp r15, 2
jl 0x180107e72
mov r15d, 8
lea r14, [r13 - 8]
sub r15, rsi
nop dword [rax + rax]
mov rax, qword [r14]
lea r9, [rsp + 0xa8]
mov qword [rsp + 0xa8], rax
mov r8, r14
mov rax, qword [rsi]
sub r8, rsi
mov byte [rsp + 0x30], dil
xor edx, edx
sar r8, 3
mov rcx, rsi
mov byte [rsp + 0x28], dil
mov qword [r14], rax
mov qword [rsp + 0x20], rbx
call fcn.18010a9d0
sub r14, 8
lea rax, [r15 + r14]
and rax, 0xfffffffffffffff8
cmp rax, 0x10
jge 0x180107fc0
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret