Function at 0x18012a630
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov qword [rax - 0x68], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov r12, rdx
mov r14, rcx
mov rbp, qword [rcx + 0x58]
mov rax, qword [rdx]
mov rbx, qword [rdx + 8]
sub rbx, rax
cmp rbx, r8
jae 0x18012a69b
mov dword [rsp + 0x20], 0x177
lea r9, str.gold
lea r8, str.finish
lea rdx, str.Offset_is_sane
lea rcx, str.buffer.size_____offset
call fcn.1800401f0
int3
sub rbx, r8
lea r13, [rax + r8]
mov rdx, rbp
lea rcx, [rsp + 0x38]
call fcn.180032ca0
nop
test rbx, rbx
je 0x18012a7dc
xor edx, edx
mov rax, rbx
div rbp
mov rcx, rax
imul rcx, rbp
mov r12, rbx
sub r12, rcx
mov r8, rax
mov rdx, r13
mov rcx, r14
call fcn.18012a040
mov rdx, qword [r14 + 0x10]
add rdx, 0x40
lea rcx, [rsp + 0x38]
call fcn.1800379b0
test r12, r12
je 0x18012a7d2
cmp r12, rbp
jb 0x18012a726
mov dword [rsp + 0x20], 0x187
lea r9, str.gold
lea r8, str.finish
lea rdx, str.Only_a_partial_block_left
lea rcx, str.remainder_bytes___BS
call fcn.1800401f0
int3
sub r13, r12
add r13, rbx
mov r8, r12
mov rdx, r13
mov rcx, qword [r14 + 0x20]
call fcn.180020d00
mov rax, qword [r14 + 0x20]
xor byte [rax + r12], 0x80
mov rdx, qword [r14 + 0x10]
add rdx, 0x28
lea rcx, [rsp + 0x38]
call fcn.1800bfd00
mov rdx, rbp
lea rcx, [rsp + 0x50]
call fcn.180032ca0
nop
mov rsi, qword [r14 + 8]
mov rbx, qword [rsp + 0x40]
mov r15, qword [rsp + 0x38]
sub rbx, r15
mov rdi, qword [rsi]
mov rcx, rsi
call qword [rdi + 0x28]
mov r9, rax
xor edx, edx
mov rax, rbx
div r9
mov r9, rax
mov rbx, qword [rsp + 0x50]
mov r8, rbx
mov rdx, r15
mov rcx, rsi
call qword [rdi + 0x40]
mov r8, r12
mov rdx, rbx
mov rcx, r13
call fcn.180020d00
nop
test rbx, rbx
je 0x18012a7c8
mov rdx, qword [rsp + 0x60]
sub rdx, rbx
mov r8d, 1
mov rcx, rbx
call fcn.1800302d0
nop
mov r12, qword [rsp + 0xa8]
jmp 0x18012a7f3
mov r12, qword [rsp + 0xa8]
jmp 0x18012a7ee
mov rdx, qword [r14 + 0x10]
add rdx, 0x40
lea rcx, [rsp + 0x38]
call fcn.1800379b0
mov r15, qword [rsp + 0x38]
xor r11d, r11d
mov rax, qword [r14 + 0x28]
cmp rax, qword [r14 + 0x20]
je 0x18012a871
mov r8, qword [r14 + 0x20]
mov r9, rbp
add r8, r11
mov rax, r15
cmp rbp, 0x10
jb 0x18012a83d
mov r10, rbp
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, rbp
mov rcx, qword [r8]
mov rdx, qword [r8 + 8]
xor qword [rax], rcx
xor qword [rax + 8], rdx
add rax, 0x10
add r8, 0x10
sub r10, 1
jne 0x18012a821
test r9, r9
je 0x18012a861
sub r8, rax
nop word [rax + rax]
movzx ecx, byte [r8 + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub r9, 1
jne 0x18012a850
add r11, rbp
mov rax, qword [r14 + 0x28]
sub rax, qword [r14 + 0x20]
cmp r11, rax
jne 0x18012a800
mov rax, qword [r14 + 0x10]
mov r8, qword [rax + 0x10]
mov r9, rbp
mov rdx, r15
cmp rbp, 0x10
jb 0x18012a8c4
mov r11, r8
sub r11, r15
mov r10, rbp
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, rbp
nop dword [rax]
mov rcx, qword [rdx]
xor rcx, qword [r8]
mov rax, qword [rdx + 8]
xor rax, qword [r11 + rdx + 8]
mov qword [rdx], rcx
mov qword [rdx + 8], rax
add rdx, 0x10
add r8, 0x10
sub r10, 1
jne 0x18012a8a0
test r9, r9
je 0x18012a8e1
sub r8, rdx
nop dword [rax]
movzx eax, byte [r8 + rdx]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x18012a8d0
mov rsi, qword [r14 + 8]
mov rbx, qword [rsp + 0x40]
sub rbx, r15
mov rdi, qword [rsi]
mov rcx, rsi
call qword [rdi + 0x28]
mov r8, rax
xor edx, edx
mov rax, rbx
div r8
mov r9, rax
mov r8, r15
mov rdx, r15
mov rcx, rsi
call qword [rdi + 0x40]
mov r8, qword [r14 + 0x38]
mov rdx, r15
cmp rbp, 0x10
jb 0x18012a951
mov r10, r8
sub r10, r15
mov r9, rbp
shr r9, 4
imul rax, r9, 0xfffffffffffffff0
add rbp, rax
mov rcx, qword [rdx + r10 + 8]
mov rax, qword [rdx]
xor rax, qword [r8]
xor qword [rdx + 8], rcx
mov qword [rdx], rax
add rdx, 0x10
add r8, 0x10
sub r9, 1
jne 0x18012a931
test rbp, rbp
je 0x18012a971
sub r8, rdx
nop dword [rax]
movzx eax, byte [rdx + r8]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub rbp, 1
jne 0x18012a960
mov rdi, qword [r14 + 0x50]
mov rbx, qword [r12 + 8]
sub rbx, qword [r12]
lea rdx, [rbx + rdi]
mov rcx, r12
call fcn.180033000
test rdi, rdi
je 0x18012a9a1
mov rcx, qword [r12]
add rcx, rbx
mov r8, rdi
mov rdx, r15
call fcn.18017c7f0
mov rcx, qword [r14 + 0x20]
mov r8, qword [r14 + 0x28]
sub r8, rcx
je 0x18012a9b5
xor edx, edx
call fcn.18017cc00
mov qword [r14 + 0x18], 0
test r15, r15
je 0x18012a9d9
mov rdx, qword [rsp + 0x48]
sub rdx, r15
mov r8d, 1
mov rcx, r15
call fcn.1800302d0
nop
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret