Function at 0x18012d510
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 [0x18028f9a8]
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 0x18012d58e
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.180043540
int3
sub r14, r8
lea rsi, [r8 + rax]
mov qword [rbp - 0x61], rsi
mov rax, qword [rcx + 0x50]
cmp r14, rax
jae 0x18012d5cc
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.180043540
int3
sub r14, rax
mov qword [rbp - 0x71], r14
mov rdx, r12
lea rcx, [rsp + 0x30]
call fcn.1800360e0
nop
test r14, r14
je 0x18012d701
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.18012d2d0
mov rdx, qword [r15 + 0x10]
add rdx, 0x40
lea rcx, [rsp + 0x30]
call fcn.1800c3090
test rbx, rbx
je 0x18012d713
cmp rbx, r12
jb 0x18012d65b
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.180043540
int3
lea r14, [rdi + rsi]
mov rdx, qword [r15 + 0x10]
add rdx, 0x28
lea rcx, [rsp + 0x30]
call fcn.1800c3090
mov rdx, r12
lea rcx, [rbp - 0x41]
call fcn.1800360e0
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.180023950
mov r8, rbx
mov rdx, r14
mov rcx, qword [r15 + 0x20]
call fcn.180023950
mov rax, qword [r15 + 0x20]
xor byte [rax + rbx], 0x80
test rdi, rdi
je 0x18012d6fb
mov rdx, qword [rbp - 0x31]
sub rdx, rdi
mov r8d, 1
mov rcx, rdi
call fcn.180033660
nop
mov r14, qword [rbp - 0x71]
jmp 0x18012d718
mov rdx, qword [r15 + 0x10]
add rdx, 0x40
lea rcx, [rsp + 0x30]
call fcn.18003ac90
mov r13, qword [rsp + 0x30]
xor r11d, r11d
mov rax, qword [r15 + 0x28]
cmp rax, qword [r15 + 0x20]
je 0x18012d7a1
nop word [rax + rax]
mov r8, qword [r15 + 0x20]
mov r9, r12
add r8, r11
mov rax, r13
cmp r12, 0x10
jb 0x18012d770
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 0x18012d751
test r9, r9
je 0x18012d791
sub r8, rax
nop dword [rax + rax]
movzx ecx, byte [r8 + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub r9, 1
jne 0x18012d780
add r11, r12
mov rax, qword [r15 + 0x28]
sub rax, qword [r15 + 0x20]
cmp r11, rax
jne 0x18012d730
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 0x18012d7c9
lea rcx, [rsp + 0x30]
call fcn.180036440
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 0x18012d80e
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 0x18012d7f1
test r9, r9
je 0x18012d831
sub r8, rdx
nop word [rax + rax]
movzx eax, byte [rdx + r8]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x18012d820
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 0x18012d87c
lea rcx, [rsp + 0x30]
call fcn.180036440
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 0x18012d8cd
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 0x18012d8b0
test r9, r9
je 0x18012d8f1
sub r8, rdx
nop word [rax + rax]
movzx eax, byte [rdx + r8]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x18012d8e0
mov rcx, qword [r15 + 0x20]
mov r8, qword [r15 + 0x28]
sub r8, rcx
je 0x18012d905
xor edx, edx
call fcn.1801a4970
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.180033620
test al, al
jne 0x18012d964
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.180035950
nop
lea rdx, [rbp - 0x41]
lea rcx, [rbp - 0x21]
call fcn.180034040
lea rdx, [0x18028c620]
lea rcx, [rbp - 0x21]
call fcn.1801a3720
nop
mov rdx, qword [rbp - 0x59]
add rdx, r14
mov rcx, qword [rbp - 0x51]
call fcn.180036440
nop
test r13, r13
je 0x18012d990
mov rdx, qword [rbp - 0x79]
sub rdx, r13
mov r8d, 1
mov rcx, r13
call fcn.180033660
nop
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.180186840
mov rbx, qword [rsp + 0x138]
add rsp, 0xe0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret