Function at 0x14002af50
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push r12
push r13
push r15
sub rsp, 0x38
mov rax, qword gs:[0x58]
mov r15, rcx
mov qword [rsp + 0x68], rsi
mov rbx, r9
mov ecx, 4
xor esi, esi
mov qword [rsp + 0x70], rdi
mov r12, rdx
mov rax, qword [rax]
mov rdi, r8
mov eax, dword [rcx + rax]
cmp dword [0x1404e0754], eax
jle 0x14002afcf
lea rcx, [0x1404e0754]
call fcn.1401f6548
cmp dword [0x1404e0754], 0xffffffff
jne 0x14002afcf
lea rcx, [0x140244490]
mov qword [0x1404e0768], rsi
mov qword [0x1404e0770], rsi
call fcn.1401f6374
lea rcx, [0x1404e0754]
call fcn.1401f64dc
movzx r13d, byte [rdi]
cmp r13b, 0x15
jne 0x14002b1b4
mov rbx, qword [0x1404e0770]
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x30], r14
test rbx, rbx
je 0x14002b00c
mov rcx, rbx
mov qword [0x1404e0768], rsi
call fcn.14002d590
mov rbx, rsi
mov qword [0x1404e0770], rbx
movzx esi, byte [rdi + 1]
lea r14, [rdi + 1]
mov ecx, dword [0x1404e0768]
mov ebp, 8
test sil, sil
je 0x14002b0d2
nop dword [rax + rax]
mov r8d, dword [0x1404e076c]
xor sil, 0x15
cmp ecx, r8d
jne 0x14002b0a6
lea edi, [rcx + 1]
test r8d, r8d
je 0x14002b055
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
add eax, r8d
jmp 0x14002b057
mov eax, ebp
cmp eax, edi
cmovg edi, eax
cmp edi, r8d
jle 0x14002b0a6
movsxd rcx, edi
call fcn.14002d570
mov rdx, qword [0x1404e0770]
mov rbx, rax
test rdx, rdx
je 0x14002b093
movsxd r8, dword [0x1404e0768]
mov rcx, rax
call fcn.140230d70
mov rcx, qword [0x1404e0770]
call fcn.14002d590
mov ecx, dword [0x1404e0768]
mov qword [0x1404e0770], rbx
mov dword [0x1404e076c], edi
movsxd rax, ecx
inc r14
mov byte [rax + rbx], sil
mov ecx, dword [0x1404e0768]
mov rbx, qword [0x1404e0770]
inc ecx
mov dword [0x1404e0768], ecx
movzx esi, byte [r14]
test sil, sil
jne 0x14002b030
mov r8d, dword [0x1404e076c]
mov r14, qword [rsp + 0x30]
cmp ecx, r8d
jne 0x14002b146
lea edi, [rcx + 1]
test r8d, r8d
je 0x14002b0f7
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
lea ebp, [r8 + rax]
cmp ebp, edi
cmovg edi, ebp
cmp edi, r8d
jle 0x14002b146
movsxd rcx, edi
call fcn.14002d570
mov rdx, qword [0x1404e0770]
mov rbx, rax
test rdx, rdx
je 0x14002b133
movsxd r8, dword [0x1404e0768]
mov rcx, rax
call fcn.140230d70
mov rcx, qword [0x1404e0770]
call fcn.14002d590
mov ecx, dword [0x1404e0768]
mov qword [0x1404e0770], rbx
mov dword [0x1404e076c], edi
movsxd rax, ecx
mov byte [rax + rbx], 0
inc dword [0x1404e0768]
call fcn.1400158a0
mov r9, qword [0x1404e0770]
xor edi, edi
mov r8, r12
mov rdx, r15
mov rcx, qword [rax]
mov rax, qword [rsp + 0x78]
or rcx, 1
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
call fcn.140200658
mov rcx, qword [0x1404e0770]
mov ebx, eax
mov rbp, qword [rsp + 0x60]
test ebx, ebx
mov eax, 0xffffffff
cmovs ebx, eax
test rcx, rcx
je 0x14002b1e4
mov qword [0x1404e0768], rdi
call fcn.14002d590
mov qword [0x1404e0770], rdi
jmp 0x14002b1e4
call fcn.1400158a0
mov qword [rsp + 0x28], rbx
mov r9, rdi
mov r8, r12
mov qword [rsp + 0x20], rsi
mov rdx, r15
mov rcx, qword [rax]
or rcx, 1
call fcn.140200658
mov ebx, eax
mov eax, 0xffffffff
test ebx, ebx
cmovs ebx, eax
mov rdi, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x68]
test r15, r15
je 0x14002b236
cmp r13b, 0x15
jne 0x14002b21f
movzx eax, byte [r15]
mov rcx, r15
test al, al
je 0x14002b21f
nop dword [rax]
nop dword [rax + rax]
xor al, 0x15
mov byte [rcx], al
lea rcx, [rcx + 1]
movzx eax, byte [rcx]
test al, al
jne 0x14002b210
cmp ebx, 0xffffffff
je 0x14002b229
cmp ebx, r12d
jl 0x14002b22e
lea ebx, [r12 - 1]
movsxd rax, ebx
mov byte [rax + r15], 0
mov eax, ebx
add rsp, 0x38
pop r15
pop r13
pop r12
pop rbx
ret