Function at 0x180129470
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x178], rbx
mov rax, qword [0x18028f9a8]
xor rax, rsp
mov qword [rbp + 0x18], rax
mov rbx, r8
mov rsi, rdx
mov qword [rbp - 0x68], rdx
mov rdi, rcx
mov qword [rsp + 0x30], rcx
mov rax, qword [rdx]
mov rcx, qword [rdx + 8]
sub rcx, rax
cmp rcx, r8
jae 0x1801294e2
lea r8, str.gold
lea rdx, str.finish
lea rcx, str.Offset_is_sane
call fcn.180044fb0
int3
lea rdx, [r8 + rax]
xor eax, eax
mov byte [rsp + 0x20], al
mov r9, qword [rdi + 0x40]
mov r8, qword [rdi + 0x38]
mov rcx, rsi
call fcn.18008e660
mov rax, qword [rsi]
mov r14, qword [rsi + 8]
sub r14, rax
sub r14, rbx
lea r12, [rbx + rax]
mov qword [rsp + 0x50], r12
cmp r14, qword [rdi + 8]
jae 0x180129542
mov dword [rsp + 0x20], 0xde
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
mov rax, qword [rdi + 0x58]
sub rax, qword [rdi + 0x50]
test al, 0xf
je 0x180129569
lea r8, str.gold
lea rdx, str.finish
lea rcx, str.AD_is_block_size_multiple
call fcn.180044fb0
int3
mov r13, qword [rdi + 0x18]
mov edx, 0x10
lea rcx, [rsp + 0x60]
call fcn.1800360e0
nop
mov r8, r14
sub r8, qword [rdi + 8]
lea rdx, [rsp + 0x78]
mov rcx, rdi
call fcn.180129fd0
nop
mov rsi, qword [rax]
mov rbx, qword [rax + 8]
sub rbx, rsi
mov rdi, qword [r13]
mov rcx, r13
call qword [rdi + 0x28]
mov rcx, rax
xor edx, edx
mov rax, rbx
div rcx
mov r9, rax
mov r15, qword [rsp + 0x60]
mov r8, r15
mov rdx, rsi
mov rcx, r13
call qword [rdi + 0x40]
nop
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1801295e3
mov rdx, qword [rbp - 0x78]
sub rdx, rcx
mov r8d, 1
call fcn.180033660
nop
xor esi, esi
mov rcx, qword [rsp + 0x30]
mov rax, qword [rcx + 0x58]
cmp rax, qword [rcx + 0x50]
je 0x180129659
mov rdi, qword [rsp + 0x68]
sub rdi, r15
mov r12, rcx
nop
mov rax, qword [r12 + 0x50]
mov rcx, qword [rsi + rax + 8]
mov rdx, qword [r15]
xor rdx, qword [rsi + rax]
xor qword [r15 + 8], rcx
mov qword [r15], rdx
mov rbx, qword [r13]
mov rcx, r13
call qword [rbx + 0x28]
mov rcx, rax
xor edx, edx
mov rax, rdi
div rcx
mov r9, rax
mov r8, r15
mov rdx, r15
mov rcx, r13
call qword [rbx + 0x40]
add rsi, 0x10
mov rax, qword [r12 + 0x58]
sub rax, qword [r12 + 0x50]
cmp rsi, rax
jne 0x180129600
mov r12, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
lea rdx, [rsp + 0x38]
call fcn.18012a0a0
nop
mov edx, 0x10
lea rcx, [rsp + 0x78]
call fcn.1800360e0
nop
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
sub rbx, rsi
mov rdi, qword [r13]
mov rcx, r13
call qword [rdi + 0x28]
mov rcx, rax
xor edx, edx
mov rax, rbx
div rcx
mov r9, rax
mov r8, qword [rsp + 0x78]
mov rdx, rsi
mov rcx, r13
call qword [rdi + 0x40]
xor ecx, ecx
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
sub rax, rdx
je 0x1801296e3
nop dword [rax + rax]
sub rax, rcx
inc byte [rax + rdx - 1]
cmp byte [rax + rdx - 1], 0
jne 0x1801296e3
inc rcx
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
sub rax, rdx
cmp rcx, rax
jne 0x1801296c0
mov edx, 0x10
lea rcx, [rbp - 0x60]
call fcn.1800360e0
nop
mov rsi, r12
mov rdi, qword [rsp + 0x30]
sub rsi, qword [rdi + 8]
add rsi, r14
mov qword [rsp + 0x58], rsi
mov r14, qword [rbp - 0x60]
cmp r12, rsi
je 0x1801298d7
mov rax, qword [rsp + 0x68]
sub rax, r15
mov qword [rbp - 0x70], rax
lea rdx, [0x18022a218]
nop word [rax + rax]
mov rcx, rsi
sub rcx, r12
mov qword [rsp + 0x50], rcx
lea rax, [rsp + 0x50]
cmp rcx, 0x10
cmovae rax, rdx
mov r14, qword [rax]
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
sub rbx, rsi
mov rdi, qword [r13]
mov rcx, r13
call qword [rdi + 0x28]
mov rcx, rax
xor edx, edx
mov rax, rbx
div rcx
mov r9, rax
mov rbx, qword [rbp - 0x60]
mov r8, rbx
mov rdx, rsi
mov rcx, r13
call qword [rdi + 0x40]
mov r9, r14
mov r8, rbx
mov rdx, r12
cmp r14, 0x10
jb 0x1801297d0
mov r11, rbx
sub r11, r12
mov r10, r14
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, r14
nop dword [rax]
nop word [rax + rax]
mov rcx, qword [rdx + r11 + 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 r10, 1
jne 0x1801297b0
test r9, r9
je 0x1801297f1
sub r8, rdx
nop dword [rax + rax]
movzx eax, byte [rdx + r8]
xor byte [rdx], al
lea rdx, [rdx + 1]
sub r9, 1
jne 0x1801297e0
xor ecx, ecx
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
sub rax, rdx
je 0x180129825
sub rax, rcx
inc byte [rax + rdx - 1]
cmp byte [rax + rdx - 1], 0
jne 0x180129825
inc rcx
mov rax, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x38]
sub rax, rdx
cmp rcx, rax
jne 0x180129802
mov r9, r14
mov r8, r12
mov rax, r15
cmp r14, 0x10
jb 0x18012986d
mov r11, r12
sub r11, r15
mov r10, r14
shr r10, 4
imul r9, r10, 0xfffffffffffffff0
add r9, r14
nop dword [rax + rax]
mov rcx, qword [r8]
mov rdx, qword [rax + r11 + 8]
xor qword [rax], rcx
xor qword [rax + 8], rdx
add rax, 0x10
add r8, 0x10
sub r10, 1
jne 0x180129850
test r9, r9
je 0x180129891
sub r8, rax
nop word [rax + rax]
movzx ecx, byte [rax + r8]
xor byte [rax], cl
lea rax, [rax + 1]
sub r9, 1
jne 0x180129880
mov rbx, qword [r13]
mov rcx, r13
call qword [rbx + 0x28]
mov rcx, rax
xor edx, edx
mov rax, qword [rbp - 0x70]
div rcx
mov r9, rax
mov r8, r15
mov rdx, r15
mov rcx, r13
call qword [rbx + 0x40]
add r12, r14
mov rsi, qword [rsp + 0x58]
cmp r12, rsi
lea rdx, [0x18022a218]
jne 0x180129730
mov rdi, qword [rsp + 0x30]
mov r14, qword [rbp - 0x60]
mov rax, qword [rsp + 0x68]
sub rax, r15
mov rbx, qword [rbp - 0x80]
mov r12, qword [rsp + 0x78]
sub rbx, r12
cmp rax, rbx
jae 0x180129902
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.180036440
mov r15, qword [rsp + 0x60]
mov r9, r12
mov r8, r15
cmp rbx, 0x10
jb 0x18012994d
mov r10, r12
sub r10, r15
mov rdx, rbx
shr rdx, 4
imul rax, rdx, 0xfffffffffffffff0
add rbx, rax
nop dword [rax]
nop word [rax + rax]
mov rax, qword [r9]
mov rcx, qword [r8 + r10 + 8]
xor qword [r8], rax
xor qword [r8 + 8], rcx
add r8, 0x10
add r9, 0x10
sub rdx, 1
jne 0x180129930
test rbx, rbx
je 0x180129972
sub r9, r8
nop word [rax + rax]
movzx eax, byte [r8 + r9]
xor byte [r8], al
lea r8, [r8 + 1]
sub rbx, 1
jne 0x180129960
mov r8, qword [rdi + 8]
mov rdx, rsi
mov rcx, r15
call fcn.180033620
test al, al
jne 0x1801299cd
mov qword [rbp - 0x28], 0xf
mov qword [rbp - 0x30], 0
mov byte [rbp - 0x40], al
mov r8d, 0x14
lea rdx, str.CCM_tag_check_failed
lea rcx, [rbp - 0x40]
call fcn.180035950
nop
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x20]
call fcn.180034040
lea rdx, [0x18028c620]
lea rcx, [rbp - 0x20]
call fcn.1801a3720
nop
mov rcx, qword [rbp - 0x68]
mov rdx, qword [rcx + 8]
sub rdx, qword [rcx]
sub rdx, qword [rdi + 8]
call fcn.180036440
nop
test r14, r14
je 0x1801299fd
mov rdx, qword [rbp - 0x50]
sub rdx, r14
mov r8d, 1
mov rcx, r14
call fcn.180033660
nop
test r12, r12
je 0x180129a18
mov rdx, qword [rbp - 0x78]
sub rdx, r12
mov r8d, 1
mov rcx, r12
call fcn.180033660
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x180129a47
mov rdx, qword [rsp + 0x48]
sub rdx, rcx
mov r8d, 1
call fcn.180033660
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], 0
test r15, r15
je 0x180129a63
mov rdx, qword [rsp + 0x70]
sub rdx, r15
mov r8d, 1
mov rcx, r15
call fcn.180033660
nop
mov rcx, qword [rbp + 0x18]
xor rcx, rsp
call fcn.180186840
mov rbx, qword [rsp + 0x178]
add rsp, 0x120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret