Function at 0x14017d0d3
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x48
xor r12d, r12d
test rcx, rcx
je 0x14017d266
mov rdi, r8
test r8, r8
je 0x14017d266
mov rbx, rdx
mov rsi, rcx
test rdx, rdx
je 0x14017d62b
mov rcx, rdi
call fcn.140164e30
mov r14, rax
mov rcx, rbx
call fcn.140164e30
mov r15, rax
mov qword [rsp + 0x40], rax
mov r13, qword [rsi + 0x10]
mov eax, dword [rsi + 0x30]
cmp r13, 0x80
jne 0x14017d41b
mov dword [rsp + 0x20], eax
mov rcx, rbx
mov edx, r15d
mov r8, rdi
mov r9d, r14d
call fcn.14017d687
lea ecx, [r14 + r15]
inc ecx
mov dword [rsp + 0x30], ecx
mov dword [rsp + 0x34], eax
mov r12d, eax
xor eax, eax
mov qword [rsp + 0x38], rax
mov rax, r12
xor edx, edx
div r13
mov r13, rdx
mov rax, qword [rsi + 8]
mov rcx, rdx
shl rcx, 5
cmp dword [rax + rcx + 0x14], 0
mov edx, 0
mov qword [rsp + 0x28], rdx
jne 0x14017d37c
mov rbp, qword [rsi + 0x28]
test rbp, rbp
jne 0x14017d543
mov rbp, qword [rsi + 0x20]
add r15, r14
test rbp, rbp
je 0x14017d2d5
lea edx, [r15 + 1]
xor ecx, ecx
xor eax, eax
mov r12, qword [rbp + 8]
mov r8, qword [rbp + 0x10]
sub r8, r12
cmp r8, rdx
jbe 0x14017d2aa
mov r15d, dword [rsp + 0x40]
mov rcx, r12
mov rdx, rbx
mov r8, r15
call fcn.14013efb0
mov rax, qword [rbp + 8]
add rax, r15
inc rax
mov qword [rbp + 8], rax
mov byte [rax - 1], 0x3a
mov rcx, qword [rbp + 8]
mov ebx, r14d
mov rdx, rdi
mov r8, rbx
call fcn.14013efb0
mov rax, qword [rbp + 8]
add rax, rbx
inc rax
mov qword [rbp + 8], rax
mov byte [rax - 1], 0
inc qword [rbp + 0x20]
test r12, r12
je 0x14017d2a5
cmp qword [rsp + 0x28], 0
jne 0x14017d334
mov rax, qword [rsi + 8]
mov ecx, r13d
shl rcx, 5
mov qword [rax + rcx + 8], r12
mov edx, dword [rsp + 0x30]
mov dword [rax + rcx + 0x10], edx
mov qword [rax + rcx], 0
mov dword [rax + rcx + 0x14], 1
mov edx, dword [rsp + 0x34]
mov dword [rax + rcx + 0x18], edx
inc dword [rsi + 0x18]
cmp dword [rsp + 0x38], 4
jae 0x14017d27a
mov rax, r12
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsi + 0x10]
cmp rax, 0xaaa
ja 0x14017d266
add rax, rax
lea rdx, [rax + rax*2]
mov rcx, rsi
call fcn.140253adc
jmp 0x14017d266
mov rdx, qword [rsi + 0x38]
test rdx, rdx
je 0x14017d2ca
cmp rcx, rdx
jbe 0x14017d2ca
xor r12d, r12d
jmp 0x14017d266
mov r8, qword [rbp + 0x18]
cmp r8, rax
cmova rax, r8
mov r9, qword [rbp]
add rcx, r8
mov rbp, r9
test r9, r9
jne 0x14017d1b6
jmp 0x14017d297
test rax, rax
je 0x14017d2d5
shl rax, 2
jmp 0x14017d2da
mov eax, 0x3e8
lea r15d, [r15*4 + 4]
cmp rax, r15
cmova r15, rax
mov rax, qword [fcn.14003dfb0]
lea rcx, [r15 + 0x30]
call qword [case.0x14017aab5.0]
test rax, rax
je 0x14017d2a5
mov rbp, rax
mov qword [rax + 0x18], r15
mov qword [rax + 0x20], 0
add rax, 0x28
mov qword [rbp + 8], rax
lea rax, [rbp + r15 + 0x28]
mov qword [rbp + 0x10], rax
mov rax, qword [rsi + 0x20]
mov qword [rbp], rax
mov qword [rsi + 0x20], rbp
mov r12, qword [rbp + 8]
jmp 0x14017d1ca
mov rax, qword [fcn.14003dfb0]
mov ecx, 0x20
call qword [case.0x14017aab5.0]
test rax, rax
je 0x14017d2a5
mov qword [rax + 8], r12
mov ecx, dword [rsp + 0x30]
mov dword [rax + 0x10], ecx
mov qword [rax], 0
mov dword [rax + 0x14], 1
mov ecx, dword [rsp + 0x34]
mov dword [rax + 0x18], ecx
mov rcx, qword [rsp + 0x28]
mov qword [rcx], rax
jmp 0x14017d25c
lea rdx, [rax + rcx]
mov qword [rsp + 0x28], rdx
mov rax, qword [rax + rcx]
xor ecx, ecx
mov qword [rsp + 0x38], rcx
test rax, rax
je 0x14017d3cd
xor ecx, ecx
mov qword [rsp + 0x38], rcx
mov ecx, dword [rsp + 0x34]
mov rdx, qword [rsp + 0x28]
cmp dword [rdx + 0x18], ecx
je 0x14017d64c
mov rcx, rax
mov rax, qword [rsp + 0x38]
inc eax
mov qword [rsp + 0x38], rax
mov rax, rcx
mov qword [rsp + 0x28], rcx
mov rax, qword [rcx]
test rax, rax
jne 0x14017d39c
mov eax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + 0x18], eax
jne 0x14017d191
mov eax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
cmp dword [rcx + 0x10], eax
jne 0x14017d191
mov rax, qword [rsp + 0x28]
mov r8, qword [rax + 8]
mov rcx, rbx
mov rdx, rdi
call fcn.140228080
test eax, eax
je 0x14017d191
mov rax, qword [rsp + 0x28]
mov r12, qword [rax + 8]
jmp 0x14017d266
test r15d, r15d
jle 0x14017d449
mov ecx, dword [rsp + 0x40]
xor edx, edx
movzx r8d, byte [rbx + rdx]
add r8d, eax
mov r9d, r8d
shl r9d, 0xa
add r9d, r8d
mov eax, r9d
shr eax, 6
xor eax, r9d
inc rdx
cmp rcx, rdx
jne 0x14017d426
mov ecx, eax
shl ecx, 0xa
add ecx, eax
add ecx, 0xe83a
mov eax, ecx
shr eax, 6
xor eax, ecx
test r14d, r14d
jle 0x14017d48a
mov ecx, r14d
xor edx, edx
movzx r8d, byte [rdi + rdx]
add r8d, eax
mov r9d, r8d
shl r9d, 0xa
add r9d, r8d
mov eax, r9d
shr eax, 6
xor eax, r9d
inc rdx
cmp rcx, rdx
jne 0x14017d467
lea eax, [rax + rax*8]
mov ecx, eax
shr ecx, 0xb
xor ecx, eax
mov eax, ecx
shl eax, 0xf
add eax, ecx
jmp 0x14017d14e
mov ecx, 0x80
mov r13d, dword [rsp + 0x34]
cmp rax, 0x80
je 0x14017d569
mov ecx, dword [rbp + 0x30]
test r15d, r15d
jle 0x14017d4e8
mov edx, dword [rsp + 0x40]
xor r8d, r8d
movzx r9d, byte [rbx + r8]
add r9d, ecx
mov r10d, r9d
shl r10d, 0xa
add r10d, r9d
mov ecx, r10d
shr ecx, 6
xor ecx, r10d
inc r8
cmp rdx, r8
jne 0x14017d4c5
mov edx, ecx
shl edx, 0xa
add edx, ecx
add edx, 0xe83a
mov ecx, edx
shr ecx, 6
xor ecx, edx
test r14d, r14d
jle 0x14017d52a
mov edx, r14d
xor r8d, r8d
movzx r9d, byte [rdi + r8]
add r9d, ecx
mov r10d, r9d
shl r10d, 0xa
add r10d, r9d
mov ecx, r10d
shr ecx, 6
xor ecx, r10d
inc r8
cmp rdx, r8
jne 0x14017d507
lea ecx, [rcx + rcx*8]
mov edx, ecx
shr edx, 0xb
xor edx, ecx
mov r13d, edx
shl r13d, 0xf
add r13d, edx
mov rcx, rax
jmp 0x14017d569
cmp qword [rsi + 0x10], 0x80
mov rax, qword [rbp + 0x10]
je 0x14017d4a0
mov rcx, rax
mov r13d, dword [rsp + 0x34]
cmp rax, 0x80
je 0x14017d606
mov eax, r13d
xor edx, edx
div rcx
mov rax, qword [rbp + 8]
shl rdx, 5
cmp dword [rax + rdx + 0x14], 0
je 0x14017d5d9
lea rbp, [rax + rdx]
mov rax, qword [rax + rdx]
jmp 0x14017d5a1
mov rax, qword [rbp]
mov rbp, rax
mov rax, qword [rsp + 0x38]
inc eax
mov qword [rsp + 0x38], rax
mov rax, qword [rbp]
test rax, rax
je 0x14017d5ca
cmp dword [rbp + 0x18], r13d
jne 0x14017d58e
mov ecx, dword [rsp + 0x30]
cmp dword [rbp + 0x10], ecx
jne 0x14017d58e
mov r8, qword [rbp + 8]
mov rcx, rbx
mov rdx, rdi
call fcn.140228080
test eax, eax
je 0x14017d58a
jmp 0x14017d5fd
cmp dword [rbp + 0x18], r13d
jne 0x14017d5d9
mov eax, dword [rsp + 0x30]
cmp dword [rbp + 0x10], eax
je 0x14017d5ea
mov rax, r12
xor edx, edx
div qword [rsi + 0x10]
mov r13, rdx
jmp 0x14017d19e
mov r8, qword [rbp + 8]
mov rcx, rbx
mov rdx, rdi
call fcn.140228080
test eax, eax
je 0x14017d5d9
mov r12, qword [rbp + 8]
jmp 0x14017d266
mov eax, dword [rbp + 0x30]
mov dword [rsp + 0x20], eax
mov rcx, rbx
mov edx, r15d
mov r8, rdi
mov r9d, r14d
call fcn.14017d687
mov r13d, eax
mov ecx, 0x80
jmp 0x14017d569
mov rcx, rsi
mov rdx, rdi
mov r8d, 0xffffffff
add rsp, 0x48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.1400d37a7
mov ecx, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x28]
cmp dword [rdx + 0x10], ecx
jne 0x14017d3ae
mov rax, qword [rsp + 0x28]
mov r8, qword [rax + 8]
mov rcx, rbx
mov rdx, rdi
call fcn.140228080
test eax, eax
jne 0x14017d40d
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
jmp 0x14017d3ae