Function at 0x14012d340
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 0x14012d609
cmp rcx, r9
jb 0x14012d609
cmp dword [rsi + 0x174], 0
mov qword [rsp + 0x50], rbp
mov qword [rsi + 0x38], rcx
mov qword [rsp + 0x48], r13
je 0x14012d3be
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 0x14012d440
test rdi, rdi
je 0x14012d42b
mov ecx, ebp
add ebp, 1
add r14, 1
movzx eax, byte [rcx + rsi + 0x10]
add r12, 1
sub rdi, 1
xor al, byte [r12 - 1]
mov byte [r14 - 1], al
xor byte [rcx + rsi + 0x40], al
and ebp, 0xf
mov dword [rsp + 0x80], ebp
jne 0x14012d3f5
jmp 0x14012d433
test ebp, ebp
jne 0x14012d5ec
lea rdx, [rsi + 0x60]
lea rcx, [rsi + 0x40]
call fcn.14012c530
cmp rdi, 0xc00
mov r10, qword [rsp + 0xa0]
mov qword [rsp + 0x88], rbx
mov qword [rsp + 0x40], r15
jb 0x14012d50e
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
mov rdi, qword [rsp + 0x30]
mov r9, rdi
mov r8d, 0xc0
mov rdx, r14
mov rcx, r12
mov qword [rsp + 0x20], rsi
call r10
add r13d, 0xc0
lea rdx, [rsi + 0x60]
mov eax, r13d
lea rcx, [rsi + 0x40]
mov r9d, 0xc00
shr eax, 0x18
mov r8, r14
mov byte [rsi + 0xf], r13b
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
call fcn.14012c680
mov r10, qword [rsp + 0xa0]
add r14, 0xc00
add r12, 0xc00
sub rbx, 1
jne 0x14012d490
mov rdi, qword [rsp + 0x98]
mov ebp, dword [rsp + 0x80]
mov r15, rdi
and r15, 0xfffffffffffffff0
je 0x14012d572
mov r9, qword [rsp + 0x30]
mov rbx, r15
mov rdx, r14
shr rbx, 4
mov rcx, r12
mov qword [rsp + 0x20], rsi
mov r8, rbx
call r10
add r13d, ebx
lea rdx, [rsi + 0x60]
mov eax, r13d
lea rcx, [rsi + 0x40]
mov r9, r15
shr eax, 0x18
mov r8, r14
mov byte [rsi + 0xf], r13b
mov byte [rsi + 0xc], al
mov eax, r13d
add r12, r15
shr eax, 0x10
sub rdi, r15
mov byte [rsi + 0xd], al
mov eax, r13d
shr eax, 8
mov byte [rsi + 0xe], al
call fcn.14012c680
add r14, r15
test rdi, rdi
mov r15, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x88]
je 0x14012d5ec
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 rcx, [rax + rsi + 0x40]
lea rdx, [rax + r14]
nop
nop
movzx eax, byte [r12 + rdx]
add rcx, 1
add rdx, 1
xor al, byte [rcx - 0x31]
mov byte [rdx - 1], al
xor byte [rcx - 1], al
sub rdi, 1
jne 0x14012d5d0
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