Function at 0x140012ad0
Capabilities:
Encode data using xor
Encrypt data using xtea

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rsp + 0xb8], rbx
mov rax, qword [0x140050088]
xor rax, rsp
mov qword [rbp - 8], rax
mov rsi, r8
mov r15, rdx
mov rbx, rcx
mov rcx, qword [rdx + 0x10]
movzx eax, cl
and al, 7
cmp al, 1
je 0x140012b1e
mov al, 1
jmp 0x140012f9f
cmp qword [rdx + 0x18], 0x10
jb 0x140012b2a
mov rax, qword [rdx]
jmp 0x140012b2d
mov rax, r15
movsx r12, byte [rax + rcx - 1]
cmp r12, 8
jae 0x140012b17
cmp rbx, r15
je 0x140012b46
mov rcx, rbx
call fcn.140013650
mov rax, qword [rbx + 0x10]
lea rdx, [rax - 1]
cmp rdx, rax
ja 0x140012b6c
mov qword [rbx + 0x10], rdx
cmp qword [rbx + 0x18], 0x10
jb 0x140012b63
mov rax, qword [rbx]
jmp 0x140012b66
mov rax, rbx
mov byte [rax + rdx], 0
jmp 0x140012b7a
sub rdx, rax
xor r8d, r8d
mov rcx, rbx
call fcn.14000f2d0
mov qword [rbp - 0x20], 0xf
xor edi, edi
mov qword [rbp - 0x28], rdi
mov byte [rbp - 0x38], dil
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rsi
lea rcx, [rbp - 0x38]
call fcn.140002d40
nop
mov rax, qword [rbp - 0x28]
lea edx, [rdi + 0x10]
cmp rax, rdx
jb 0x140012bc3
mov qword [rbp - 0x28], rdx
lea rax, [rbp - 0x38]
cmp qword [rbp - 0x20], rdx
cmovae rax, qword [rbp - 0x38]
mov byte [rax + 0x10], dil
jmp 0x140012bd2
sub rdx, rax
xor r8d, r8d
lea rcx, [rbp - 0x38]
call fcn.140012310
lea r9, [rbp - 0x38]
mov r11, qword [rbp - 0x38]
mov r10, qword [rbp - 0x20]
cmp r10, 0x10
cmovae r9, r11
lea r8, [rbp - 0x38]
cmovae r8, r11
lea rcx, [rbp - 0x38]
cmovae rcx, r11
lea rax, [rbp - 0x38]
cmovae rax, r11
movzx edx, byte [rax + 3]
shl edx, 8
movzx eax, byte [rcx + 2]
or edx, eax
shl edx, 8
movzx eax, byte [r8 + 1]
or edx, eax
shl edx, 8
movzx eax, byte [r9]
or edx, eax
mov dword [rbp - 0x18], edx
lea r9, [rbp - 0x38]
cmp r10, 0x10
cmovae r9, r11
lea r8, [rbp - 0x38]
cmovae r8, r11
lea rcx, [rbp - 0x38]
cmovae rcx, r11
lea rax, [rbp - 0x38]
cmovae rax, r11
movzx edx, byte [rax + 7]
shl edx, 8
movzx eax, byte [rcx + 6]
or edx, eax
shl edx, 8
movzx eax, byte [r8 + 5]
or edx, eax
shl edx, 8
movzx eax, byte [r9 + 4]
or edx, eax
mov dword [rbp - 0x14], edx
lea r9, [rbp - 0x38]
cmp r10, 0x10
cmovae r9, r11
lea r8, [rbp - 0x38]
cmovae r8, r11
lea rcx, [rbp - 0x38]
cmovae rcx, r11
lea rax, [rbp - 0x38]
cmovae rax, r11
movzx edx, byte [rax + 0xb]
shl edx, 8
movzx eax, byte [rcx + 0xa]
or edx, eax
shl edx, 8
movzx eax, byte [r8 + 9]
or edx, eax
shl edx, 8
movzx eax, byte [r9 + 8]
or edx, eax
mov dword [rbp - 0x10], edx
lea r9, [rbp - 0x38]
cmp r10, 0x10
cmovae r9, r11
lea r8, [rbp - 0x38]
cmovae r8, r11
lea rcx, [rbp - 0x38]
cmovae rcx, r11
lea rax, [rbp - 0x38]
cmovae rax, r11
movzx edx, byte [rax + 0xf]
shl edx, 8
movzx eax, byte [rcx + 0xe]
or edx, eax
shl edx, 8
movzx eax, byte [r8 + 0xd]
or edx, eax
shl edx, 8
movzx eax, byte [r9 + 0xc]
or edx, eax
mov dword [rbp - 0xc], edx
cmp qword [r15 + 0x10], 7
jbe 0x140012f15
mov r13d, 0x8dde6e40
nop word [rax + rax]
mov rsi, qword [rbx + 0x18]
cmp rsi, 0x10
jb 0x140012d1f
mov r9, qword [rbx]
jmp 0x140012d22
mov r9, rbx
cmp rsi, 0x10
jb 0x140012d2d
mov rdx, qword [rbx]
jmp 0x140012d30
mov rdx, rbx
cmp rsi, 0x10
jb 0x140012d3b
mov rcx, qword [rbx]
jmp 0x140012d3e
mov rcx, rbx
cmp rsi, 0x10
jb 0x140012d49
mov rax, qword [rbx]
jmp 0x140012d4c
mov rax, rbx
movzx r8d, byte [rax + rdi + 3]
shl r8d, 8
movzx eax, byte [rcx + rdi + 2]
or r8d, eax
shl r8d, 8
movzx eax, byte [rdx + rdi + 1]
or r8d, eax
shl r8d, 8
movzx eax, byte [r9 + rdi]
or r8d, eax
cmp rsi, 0x10
jb 0x140012d81
mov r10, qword [rbx]
jmp 0x140012d84
mov r10, rbx
cmp rsi, 0x10
jb 0x140012d8f
mov rdx, qword [rbx]
jmp 0x140012d92
mov rdx, rbx
cmp rsi, 0x10
jb 0x140012d9d
mov rcx, qword [rbx]
jmp 0x140012da0
mov rcx, rbx
cmp rsi, 0x10
jb 0x140012dab
mov rax, qword [rbx]
jmp 0x140012dae
mov rax, rbx
movzx r9d, byte [rax + rdi + 7]
shl r9d, 8
movzx eax, byte [rcx + rdi + 6]
or r9d, eax
shl r9d, 8
movzx eax, byte [rdx + rdi + 5]
or r9d, eax
shl r9d, 8
movzx eax, byte [r10 + rdi + 4]
or r9d, eax
mov r11d, r13d
mov r10, r13
mov r14d, 0x40
nop word [rax + rax]
mov ecx, r8d
shr ecx, 5
mov eax, r8d
shl eax, 4
xor ecx, eax
add ecx, r8d
shr r10, 0xb
and r10d, 3
mov eax, dword [rbp + r10*4 - 0x18]
add eax, r11d
xor ecx, eax
sub r9d, ecx
add r11d, 0x61c88647
mov r10d, r11d
mov edx, r9d
shr edx, 5
mov eax, r9d
shl eax, 4
xor edx, eax
add edx, r9d
mov eax, r11d
and eax, 3
mov ecx, dword [rbp + rax*4 - 0x18]
add ecx, r11d
xor edx, ecx
sub r8d, edx
sub r14, 1
jne 0x140012df0
cmp rsi, 0x10
jb 0x140012e54
mov rax, qword [rbx]
jmp 0x140012e57
mov rax, rbx
mov byte [rax + rdi], r8b
cmp qword [rbx + 0x18], 0x10
jb 0x140012e67
mov rcx, qword [rbx]
jmp 0x140012e6a
mov rcx, rbx
mov eax, r8d
shr eax, 8
mov byte [rcx + rdi + 1], al
cmp qword [rbx + 0x18], 0x10
jb 0x140012e80
mov rcx, qword [rbx]
jmp 0x140012e83
mov rcx, rbx
mov eax, r8d
shr eax, 0x10
mov byte [rcx + rdi + 2], al
cmp qword [rbx + 0x18], 0x10
jb 0x140012e99
mov rax, qword [rbx]
jmp 0x140012e9c
mov rax, rbx
shr r8d, 0x18
mov byte [rax + rdi + 3], r8b
cmp qword [rbx + 0x18], 0x10
jb 0x140012eb1
mov rax, qword [rbx]
jmp 0x140012eb4
mov rax, rbx
mov byte [rax + rdi + 4], r9b
cmp qword [rbx + 0x18], 0x10
jb 0x140012ec5
mov rcx, qword [rbx]
jmp 0x140012ec8
mov rcx, rbx
mov eax, r9d
shr eax, 8
mov byte [rcx + rdi + 5], al
cmp qword [rbx + 0x18], 0x10
jb 0x140012ede
mov rcx, qword [rbx]
jmp 0x140012ee1
mov rcx, rbx
mov eax, r9d
shr eax, 0x10
mov byte [rcx + rdi + 6], al
cmp qword [rbx + 0x18], 0x10
jb 0x140012ef7
mov rax, qword [rbx]
jmp 0x140012efa
mov rax, rbx
shr r9d, 0x18
mov byte [rax + rdi + 7], r9b
add rdi, 8
lea rax, [rdi + 7]
cmp rax, qword [r15 + 0x10]
jb 0x140012d10
mov rax, qword [rbx + 0x10]
mov rdx, rax
sub rdx, r12
cmp rdx, rax
ja 0x140012f38
mov qword [rbx + 0x10], rdx
cmp qword [rbx + 0x18], 0x10
jb 0x140012f32
mov rbx, qword [rbx]
mov byte [rdx + rbx], 0
jmp 0x140012f47
sub rdx, rax
xor r8d, r8d
mov rcx, rbx
call fcn.14000f2d0
nop
mov rax, qword [rbp - 0x20]
cmp rax, 0x10
jb 0x140012f9d
inc rax
mov rcx, qword [rbp - 0x38]
cmp rax, 0x1000
jb 0x140012f98
test cl, 0x1f
je 0x140012f6b
call fcn.14001dcb8
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140012f7a
call fcn.14001dcb8
int3
sub rcx, rax
cmp rcx, 8
jae 0x140012f89
call fcn.14001dcb8
int3
cmp rcx, 0x27
jbe 0x140012f95
call fcn.14001dcb8
int3
mov rcx, rax
call fcn.140016530
xor al, al
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1400164d0
mov rbx, qword [rsp + 0xb8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret