Function at 0x14012f470
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push r13
push r15
sub rsp, 0x88
mov rax, qword [0x1401ef010]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r10d, dword [rcx + 0x10ec8]
mov r15, r9
mov r13, r8
mov rsi, rdx
mov rbx, rcx
cmp dword [rcx + 0x10ec4], r10d
je 0x14012f4dc
lea rax, [r10 + 0x628]
imul rcx, rax, 0x2c
mov r8d, dword [rcx + rbx]
mov eax, r8d
sub eax, r10d
mov dword [r9], eax
imul rax, r10, 0x2c
mov ecx, dword [rax + rbx + 0x10ee4]
mov dword [r13], ecx
mov dword [rbx + 0x10ec8], r8d
jmp 0x14012f7c4
cmp dword [rdx + 0x1c], 0
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x78], rdi
mov qword [rsp + 0x68], r14
jne 0x14012f5fe
cmp dword [rcx + 0x10e7c], 0x80
jb 0x14012f509
call fcn.14012d8d0
cmp dword [rbx + 0x10ec0], 0x10
jb 0x14012f5fe
xor edi, edi
lea r14, [rbx + 0x10e80]
lea rbp, [0x14018a290]
nop word [rax + rax]
movzx eax, word [rbx + 0x71ca]
lea r14, [r14 + 4]
shr rax, 4
mov edx, edi
and edx, 1
mov r11d, edi
mov ecx, edx
shr r11d, 1
neg ecx
inc edi
shr rcx, 4
and ecx, 0x7f
lea r8d, [rdx + 2]
xor rcx, rax
mov edx, r11d
and edx, 1
shr r11d, 1
mov eax, edx
neg eax
movzx r10d, byte [rcx + rbp]
movzx ecx, word [rbx + r8*2 + 0x71c8]
lea r9d, [rdx + r8*2]
shr rax, 4
mov edx, r11d
and eax, 0x7f
shr rcx, 4
xor rcx, rax
shr r11d, 1
and edx, 1
and r11d, 1
movzx eax, byte [rcx + rbp]
movzx ecx, word [rbx + r9*2 + 0x71c8]
add r10d, eax
shr rcx, 4
mov eax, edx
neg eax
shr rax, 4
and eax, 0x7f
xor rcx, rax
movzx eax, byte [rcx + rbp]
add r10d, eax
lea eax, [rdx + r9*2]
movzx ecx, word [rbx + rax*2 + 0x71c8]
mov eax, r11d
neg eax
shr rcx, 4
shr rax, 4
and eax, 0x7f
xor rcx, rax
movzx eax, byte [rcx + rbp]
add eax, r10d
mov dword [r14 - 4], eax
cmp edi, 0x10
jb 0x14012f530
mov dword [rbx + 0x10ec0], 0
mov r14d, dword [rsp + 0xd0]
mov r9, r15
mov r8, r13
mov dword [rsp + 0x20], r14d
mov rdx, rsi
mov rcx, rbx
call fcn.14012dbe0
mov ebp, eax
cmp eax, 0xffffffff
je 0x14012f7b2
movups xmm0, xmmword [rbx + 0x2cc]
mov edi, 1
movups xmmword [rsp + 0x48], xmm0
cmp eax, edi
jbe 0x14012f6b9
mov qword [rsp + 0x70], r12
lea r8, [rbx + 0x2dc]
mov rcx, rsi
lea rdx, [rbx + 0xb6c]
call fcn.140130960
mov r9d, dword [rsi + 0x60]
mov dword [rbx + 0xb70], eax
cmp eax, r9d
jae 0x14012f6b4
mov r8d, dword [rsi + 0x18]
lea ecx, [rdi + r14]
mov edx, dword [rsi + 0x24]
mov eax, 0xfff
sub edx, r8d
sub eax, edi
inc edx
cmp edx, eax
cmovae edx, eax
mov rax, qword [rsi]
mov dword [rsp + 0x38], edx
dec rax
mov dword [rsp + 0x30], r9d
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x28], edi
add r8, rax
mov dword [rsp + 0x20], ecx
mov r9d, ebp
mov rcx, rbx
call fcn.14012e360
inc edi
mov ebp, eax
cmp edi, eax
jb 0x14012f641
mov r12, qword [rsp + 0x70]
mov edx, edi
mov dword [rbx + 0x10ec4], edi
lea rax, [rdx + 0x628]
imul rcx, rax, 0x2c
imul rax, rdx, 0x2c
mov r10d, dword [rcx + rbx]
mov r11d, dword [rax + rbx + 0x10ee4]
nop dword [rax]
mov eax, edi
imul r8, rax, 0x2c
add r8, rbx
cmp byte [r8 + 0x10ed0], 0
je 0x14012f75a
mov ecx, r10d
lea edx, [r10 - 1]
imul rax, rcx, 0x2c
mov dword [rax + rbx + 0x10ee4], 0xffffffff
mov byte [rax + rbx + 0x10ed0], 0
lea rax, [rcx + 0x628]
imul rcx, rax, 0x2c
mov dword [rcx + rbx], edx
cmp byte [r8 + 0x10ed1], 0
je 0x14012f75a
mov ecx, edx
imul rdx, rcx, 0x2c
lea rax, [rcx + 0x628]
imul rcx, rax, 0x2c
mov byte [rdx + rbx + 0x10ed0], 0
mov eax, dword [r8 + 0x10ed4]
mov dword [rcx + rbx], eax
mov eax, dword [r8 + 0x10ed8]
mov dword [rdx + rbx + 0x10ee4], eax
mov eax, r10d
mov r9d, r10d
imul rdx, rax, 0x2c
lea rcx, [rax + 0x628]
mov r8d, r11d
imul rax, rcx, 0x2c
mov r11d, dword [rdx + rbx + 0x10ee4]
mov dword [rdx + rbx + 0x10ee4], r8d
mov r10d, dword [rax + rbx]
imul rax, rcx, 0x2c
mov dword [rax + rbx], edi
mov edi, r9d
test r9d, r9d
jne 0x14012f6e0
mov eax, dword [rbx + 0x10ee0]
mov dword [rbx + 0x10ec8], eax
mov dword [r15], eax
mov eax, dword [rbx + 0x10ee4]
mov dword [r13], eax
mov rdi, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
mov r14, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.1401312e0
add rsp, 0x88
pop r15
pop r13
pop rsi
pop rbx
ret