Function at 0x18012a180
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0xe0
mov qword [rbp - 0x49], 0xfffffffffffffffe
mov qword [rsp + 0x138], rbx
mov rax, qword [0x1802609a8]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov qword [rbp - 0x59], r8
mov qword [rbp - 0x51], rdx
mov r15, rcx
mov r12, qword [rcx + 0x58]
mov rax, qword [rdx]
mov r14, qword [rdx + 8]
sub r14, rax
cmp r14, r8
jae 0x18012a1fe
mov dword [rsp + 0x20], 0x1cc
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 r14, r8
lea rsi, [r8 + rax]
mov qword [rbp - 0x61], rsi
mov rax, qword [rcx + 0x50]
cmp r14, rax
jae 0x18012a23c
mov dword [rsp + 0x20], 0x1d0
lea r9, str.gold
lea r8, str.finish
lea rdx, str.We_have_the_tag
lea rcx, str.sz___tag_size__
call fcn.1800401f0
int3
sub r14, rax
mov qword [rbp - 0x71], r14
mov rdx, r12
lea rcx, [rsp + 0x30]
call fcn.180032ca0
nop
test r14, r14
je 0x18012a371
xor edx, edx
mov rax, r14
div r12
mov rdi, rax
imul rdi, r12
mov rbx, r14
sub rbx, rdi
mov qword [rbp - 0x69], rbx
mov r8, rax
mov rdx, rsi
mov rcx, r15
call fcn.180129f40
mov rdx, qword [r15 + 0x10]
add rdx, 0x40
lea rcx, [rsp + 0x30]
call fcn.1800bfd00
test rbx, rbx
je 0x18012a383
cmp rbx, r12
jb 0x18012a2cb
mov dword [rsp + 0x20], 0x1e0
lea r9, str.gold
lea r8, str.finish
lea rdx, str.Only_a_partial_block_left
lea rcx, str.final_bytes___BS
call fcn.1800401f0
int3
lea r14, [rdi + rsi]
mov rdx, qword [r15 + 0x10]
add rdx, 0x28
lea rcx, [rsp + 0x30]
call fcn.1800bfd00
mov rdx, r12
lea rcx, [rbp - 0x41]
call fcn.180032ca0
nop
mov rsi, qword [r15 + 8]
mov rbx, qword [rsp + 0x38]
mov r13, qword [rsp + 0x30]
sub rbx, r13
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, qword [rbp - 0x41]
mov rdx, r13
mov rcx, rsi
call qword [rdi + 0x40]
mov rbx, qword [rbp - 0x69]
mov r8, rbx
mov rdi, qword [rbp - 0x41]
mov rdx, rdi
mov rcx, r14
call fcn.180020d00
mov r8, rbx
mov rdx, r14
mov rcx, qword [r15 + 0x20]
call fcn.180020d00
mov rax, qword [r15 + 0x20]
xor byte [rax + rbx], 0x80
test rdi, rdi
je 0x18012a36b
mov rdx, qword [rbp - 0x31]
sub rdx, rdi
mov r8d, 1
mov rcx, rdi
call fcn.1800302d0
nop
mov r14, qword [rbp - 0x71]
jmp 0x18012a388
mov rdx, qword [r15 + 0x10]
add rdx, 0x40
lea rcx, [rsp + 0x30]
call fcn.1800379b0
mov r13, qword [rsp + 0x30]
xor r11d, r11d
mov rax, qword [r15 + 0x28]
cmp rax, qword [r15 + 0x20]
je 0x18012a411
nop word [rax + rax]
mov r8, qword [r15 + 0x20]
mov r9, r12
add r8, r11
mov rax, r13
cmp r12, 0x10
jb 0x18012a3e0
mov r10, r12
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, r12
mov rdx, qword [r8 + 8]
mov rcx, qword [rax]
xor rcx, qword [r8]
xor qword [rax + 8], rdx
mov qword [rax], rcx
add rax, 0x10
add r8, 0x10
sub r10, 1
jne 0x18012a3c1
test r9, r9
je 0x18012a401
sub r8, rax
nop dword [rax + rax]
movzx ecx, byte [r8 + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub r9, 1
jne 0x18012a3f0
add r11, r12
mov rax, qword [r15 + 0x28]
sub rax, qword [r15 + 0x20]
cmp r11, rax
jne 0x18012a3a0
mov rbx, qword [r15 + 0x10]
mov rax, qword [rsp + 0x38]
sub rax, r13
mov rdx, qword [rbx + 0x18]
sub rdx, qword [rbx + 0x10]
cmp rax, rdx
jae 0x18012a439
lea rcx, [rsp + 0x30]
call fcn.180033000
mov r13, qword [rsp + 0x30]
mov r8, qword [rbx + 0x10]
mov r9, qword [rbx + 0x18]
sub r9, r8
mov rdx, r13
cmp r9, 0x10
jb 0x18012a47e
mov r11, r8
sub r11, r13
mov r10, r9
shr r10, 4
imul rax, r10, 0xfffffffffffffff0
add r9, rax
mov rax, qword [r8]
mov rcx, qword [rdx + r11 + 8]
xor qword [rdx], rax
xor qword [rdx + 8], rcx
add rdx, 0x10
add r8, 0x10
sub r10, 1
jne 0x18012a461
test r9, r9
je 0x18012a4a1
sub r8, rdx
nop word [rax + rax]
movzx eax, byte [rdx + r8]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x18012a490
mov rdi, qword [r15 + 8]
mov rsi, qword [rsp + 0x38]
sub rsi, r13
mov rbx, qword [rdi]
mov rcx, rdi
call qword [rbx + 0x28]
mov r8, rax
xor edx, edx
mov rax, rsi
div r8
mov r9, rax
mov r8, r13
mov rdx, r13
mov rcx, rdi
call qword [rbx + 0x40]
mov rdx, qword [r15 + 0x40]
sub rdx, qword [r15 + 0x38]
cmp rsi, rdx
jae 0x18012a4ec
lea rcx, [rsp + 0x30]
call fcn.180033000
mov r13, qword [rsp + 0x30]
mov r8, qword [r15 + 0x38]
mov r9, qword [r15 + 0x40]
sub r9, r8
mov rdx, r13
cmp r9, 0x10
jb 0x18012a53d
mov r11, r8
sub r11, r13
mov r10, r9
shr r10, 4
imul rax, r10, 0xfffffffffffffff0
add r9, rax
nop dword [rax]
nop dword [rax + rax]
mov rax, qword [r8]
mov rcx, qword [rdx + r11 + 8]
xor qword [rdx], rax
xor qword [rdx + 8], rcx
add rdx, 0x10
add r8, 0x10
sub r10, 1
jne 0x18012a520
test r9, r9
je 0x18012a561
sub r8, rdx
nop word [rax + rax]
movzx eax, byte [rdx + r8]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x18012a550
mov rcx, qword [r15 + 0x20]
mov r8, qword [r15 + 0x28]
sub r8, rcx
je 0x18012a575
xor edx, edx
call fcn.18017cc00
xor ebx, ebx
mov qword [r15 + 0x18], rbx
mov rdx, qword [rbp - 0x61]
add rdx, r14
mov r8, qword [r15 + 0x50]
mov rcx, r13
call fcn.180030290
test al, al
jne 0x18012a5d4
mov qword [rbp - 0x29], 0xf
mov qword [rbp - 0x31], rbx
mov byte [rbp - 0x41], bl
lea r8d, [rbx + 0x14]
lea rdx, str.OCB_tag_check_failed
lea rcx, [rbp - 0x41]
call fcn.1800325c0
nop
lea rdx, [rbp - 0x41]
lea rcx, [rbp - 0x21]
call fcn.180030cb0
lea rdx, [0x18025d9c8]
lea rcx, [rbp - 0x21]
call fcn.18017b8e8
nop
mov rdx, qword [rbp - 0x59]
add rdx, r14
mov rcx, qword [rbp - 0x51]
call fcn.180033000
nop
test r13, r13
je 0x18012a600
mov rdx, qword [rbp - 0x79]
sub rdx, r13
mov r8d, 1
mov rcx, r13
call fcn.1800302d0
nop
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.18015e5e0
mov rbx, qword [rsp + 0x138]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret