Function at 0x14012d620
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
push r12
push r14
mov eax, 0x58
call fcn.140189b00
sub rsp, rax
mov rax, qword [rcx + 0x180]
mov rsi, rcx
mov rdi, r9
mov qword [rsp + 0x30], rax
mov rax, qword [rcx + 0x38]
mov r14, r8
lea rcx, [r9 + rax]
movabs rax, 0xfffffffe0
mov r12, rdx
cmp rcx, rax
ja 0x14012d8ec
cmp rcx, r9
jb 0x14012d8ec
cmp dword [rsi + 0x174], 0
mov qword [rsp + 0x50], rbp
mov qword [rsi + 0x38], rcx
mov qword [rsp + 0x48], r13
je 0x14012d69e
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.14012c530
mov dword [rsi + 0x174], 0
movzx eax, byte [rsi + 0xd]
mov ebp, dword [rsi + 0x170]
movzx r13d, byte [rsi + 0xc]
shl r13d, 8
mov dword [rsp + 0x80], ebp
or r13d, eax
movzx eax, byte [rsi + 0xe]
shl r13d, 8
or r13d, eax
movzx eax, byte [rsi + 0xf]
shl r13d, 8
or r13d, eax
test ebp, ebp
je 0x14012d722
test rdi, rdi
je 0x14012d70d
movzx edx, byte [r12]
mov ecx, ebp
add ebp, 1
movzx eax, byte [rcx + rsi + 0x10]
add r14, 1
add r12, 1
xor al, dl
sub rdi, 1
mov byte [r14 - 1], al
xor byte [rcx + rsi + 0x40], dl
and ebp, 0xf
mov dword [rsp + 0x80], ebp
jne 0x14012d6d5
jmp 0x14012d715
test ebp, ebp
jne 0x14012d8cf
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.14012c530
cmp rdi, 0xc00
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x40], r15
mov r15, qword [rsp + 0xa0]
jb 0x14012d7e8
movabs rax, 0xaaaaaaaaaaaaaaab
mul rdi
mov rbx, rdx
shr rbx, 0xb
mov rax, rbx
imul rax, rax, 0xfffffffffffff400
add rdi, rax
mov qword [rsp + 0x98], rdi
nop
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
mov r9d, 0xc00
mov r8, r12
call fcn.14012c680
mov r9, qword [rsp + 0x30]
mov r8d, 0xc0
mov rdx, r14
mov rcx, r12
mov qword [rsp + 0x20], rsi
call r15
add r13d, 0xc0
add r14, 0xc00
mov eax, r13d
add r12, 0xc00
mov byte [rsi + 0xf], r13b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r13d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
sub rbx, 1
mov byte [rsi + 0xe], al
jne 0x14012d770
mov rdi, qword [rsp + 0x98]
mov ebp, dword [rsp + 0x80]
mov r15, rdi
and r15, 0xfffffffffffffff0
je 0x14012d850
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
mov rbx, r15
mov r9, r15
mov r8, r12
shr rbx, 4
call fcn.14012c680
mov r9, qword [rsp + 0x30]
mov r8, rbx
mov rdx, r14
mov rcx, r12
mov qword [rsp + 0x20], rsi
call qword [rsp + 0xa0]
add r13d, ebx
add r14, r15
mov eax, r13d
add r12, r15
mov byte [rsi + 0xf], r13b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r13d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
sub rdi, r15
mov byte [rsi + 0xe], al
test rdi, rdi
mov r15, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x88]
je 0x14012d8cf
mov r8, qword [rsp + 0x30]
lea rdx, [rsi + 0x10]
mov rcx, rsi
call qword [rsi + 0x178]
add r13d, 1
sub r12, r14
mov eax, r13d
mov byte [rsi + 0xf], r13b
shr eax, 0x18
mov byte [rsi + 0xc], al
mov eax, r13d
shr eax, 0x10
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
mov byte [rsi + 0xe], al
movsxd rax, ebp
add ebp, edi
lea r8, [rax + r14]
lea rdx, [rax + rsi + 0x40]
nop
nop
movzx ecx, byte [r12 + r8]
movzx eax, byte [rdx - 0x30]
add r8, 1
xor byte [rdx], cl
xor al, cl
add rdx, 1
sub rdi, 1
mov byte [r8 - 1], al
jne 0x14012d8b0
mov r13, qword [rsp + 0x48]
mov dword [rsi + 0x170], ebp
mov rbp, qword [rsp + 0x50]
xor eax, eax
add rsp, 0x58
pop r14
pop r12
pop rdi
pop rsi
ret
or eax, 0xffffffff
add rsp, 0x58
pop r14
pop r12
pop rdi
pop rsi
ret