Function at 0x140051550
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x68
mov rax, qword [0x140190028]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov rdi, qword [rdx]
test rdi, rdi
je 0x140051c22
mov rbp, rcx
movabs rsi, 0x7fffffffffffffef
mov rcx, rdi
call fcn.1400c8100
cmp rax, rsi
ja 0x140051c7a
mov rbx, rax
lea r12, [rsp + 0x48]
cmp rax, 0x16
jbe 0x1400515d4
mov r15, rbx
or r15, 0xf
inc r15
mov rcx, r15
call fcn.1400a4810
mov r14, rax
mov qword [rsp + 0x48], rax
add rsi, 0x11
or rsi, r15
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rbx
jmp 0x1400515db
mov byte [rsp + 0x5f], bl
mov r14, r12
cmp r14, rdi
ja 0x1400515ef
mov rax, rbx
add rax, r14
cmp rax, rdi
ja 0x140051c4e
mov rcx, r14
mov rdx, rdi
mov r8, rbx
call fcn.1400a7810
mov byte [r14 + rbx], 0
movzx r8d, byte [rsp + 0x5f]
mov ecx, r8d
and ecx, 0x7f
test r8b, r8b
mov rdx, qword [rsp + 0x48]
mov rax, r12
cmovs rax, rdx
cmovs rcx, qword [rsp + 0x50]
cmp rcx, 0x20
ja 0x14005170e
cmp rcx, 0x10
jbe 0x1400517e7
movabs r9, 0xb492b66fbe98f273
imul r9, qword [rax]
test r8b, r8b
cmovs r12, rdx
mov r10, qword [r12 + 8]
movabs rdx, 0x9ae16a3b2f90404f
imul rdx, qword [rax + rcx - 8]
movabs r11, 0xc3a5c85c97cb3127
imul r11, qword [rax + rcx - 0x10]
movabs rax, 0xc949d7c7509e6557
xor rax, r10
rol rax, 0x2c
add rcx, r9
add rcx, rax
sub r9, r10
rol r9, 0x15
sub rcx, rdx
add r9, r11
rol rdx, 0x22
add rdx, r9
xor rdx, rcx
movabs rax, 0x9ddfea08eb382d69
imul rdx, rax
xor rcx, rdx
shr rdx, 0x2f
xor rdx, rcx
imul rdx, rax
mov rdi, rdx
shr rdi, 0x2f
xor rdi, rdx
imul rdi, rax
mov r15, qword [rbp + 8]
test r15, r15
jne 0x140051890
xor r12d, r12d
test r8b, r8b
jns 0x1400516e8
mov rcx, qword [rsp + 0x48]
call fcn.1400a484c
test r12, r12
setne bl
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400a5d70
mov eax, ebx
add rsp, 0x68
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp rcx, 0x40
ja 0x1400519c1
test r8b, r8b
cmovs r12, rdx
mov r9, qword [r12 + 0x10]
mov rsi, qword [r12 + 0x18]
mov rbx, qword [rax + rcx - 0x10]
lea r10, [rbx + rcx]
movabs rdx, 0xc3a5c85c97cb3127
imul r10, rdx
add r10, qword [rax]
lea r11, [r10 + rsi]
mov r15, r10
add r10, qword [r12 + 8]
mov rdi, r10
add r10, r9
add r9, qword [rax + rcx - 0x20]
mov r14, qword [rax + rcx - 8]
add r14, rsi
lea r12, [r14 + r9]
mov r13, r9
add r9, qword [rax + rcx - 0x18]
rol r11, 0xc
rol r15, 0x1b
rol rdi, 0x39
rol r12, 0xc
rol r13, 0x1b
add rdi, r15
mov rax, r9
rol rax, 0x39
add r9, rbx
add r14, r9
rol r9, 0x21
add r13, rsi
add r13, rax
add r13, r12
add r13, r9
add r13, r10
rol r10, 0x21
add rdi, r11
add r10, rdi
movabs rax, 0x9ae16a3b2f90404f
imul r13, rax
add r14, r10
imul r14, rdx
add r14, r13
mov rcx, r14
shr rcx, 0x2f
xor rcx, r14
imul rcx, rdx
add rcx, r10
mov rdi, rcx
shr rdi, 0x2f
xor rdi, rcx
jmp 0x1400516c5
cmp rcx, 9
jae 0x14005184c
cmp rcx, 4
jae 0x140051985
movabs rdi, 0x9ae16a3b2f90404f
test rcx, rcx
je 0x1400516c9
movzx edx, byte [rax]
mov r9, rcx
shr r9, 1
movzx r9d, byte [rax + r9]
movzx eax, byte [rcx + rax - 1]
shl r9, 8
or r9, rdx
lea rax, [rcx + rax*4]
imul r9, rdi
movabs rcx, 0xc949d7c7509e6557
imul rcx, rax
xor rcx, r9
mov rax, rcx
shr rax, 0x2f
xor rax, rcx
jmp 0x1400516c5
mov rdx, qword [rax + rcx - 8]
lea r9, [rdx + rcx]
ror r9, cl
mov rax, qword [rax]
xor rax, r9
movabs rcx, 0x9ddfea08eb382d69
imul rax, rcx
xor r9, rax
shr rax, 0x2f
xor rax, r9
imul rax, rcx
mov rdi, rax
shr rdi, 0x2f
xor rdi, rax
imul rdi, rcx
xor rdi, rdx
jmp 0x1400516c9
mov rax, r15
shr rax, 1
movabs rcx, 0x5555555555555555
and rcx, rax
mov rax, r15
sub rax, rcx
movabs rcx, 0x3333333333333333
mov rdx, rax
and rdx, rcx
shr rax, 2
and rax, rcx
add rax, rdx
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rax, rcx
movabs r13, 0x101010101010101
imul r13, rax
shr r13, 0x38
cmp r13, 1
jbe 0x140051c8c
mov rbx, rdi
cmp rdi, r15
jb 0x140051909
mov rax, rdi
xor edx, edx
div r15
mov rbx, rdx
mov rax, qword [rbp]
mov rax, qword [rax + rbx*8]
test rax, rax
je 0x1400516d6
mov r12, qword [rax]
test r12, r12
je 0x1400516d6
lea rsi, [r15 - 1]
add rbp, 0x24
lea r14, [rsp + 0x48]
mov rax, qword [r12 + 8]
cmp rdi, rax
je 0x14005196f
cmp r13d, 1
jbe 0x140051c84
cmp rax, r15
jb 0x140051954
xor edx, edx
div r15
mov rax, rdx
cmp rax, rbx
jne 0x140051962
mov r12, qword [r12]
test r12, r12
jne 0x140051933
xor r12d, r12d
mov r8b, byte [rsp + 0x5f]
jmp 0x1400516d9
lea rdx, [r12 + 0x10]
mov rcx, rbp
mov r8, r14
call fcn.14003aea0
test al, al
jne 0x140051965
jmp 0x140051959
mov edx, dword [rax]
mov eax, dword [rax + rcx - 4]
lea rcx, [rcx + rdx*8]
xor rcx, rax
movabs rdx, 0x9ddfea08eb382d69
imul rcx, rdx
xor rax, rcx
shr rcx, 0x2f
xor rcx, rax
imul rcx, rdx
mov rdi, rcx
shr rdi, 0x2f
xor rdi, rcx
imul rdi, rdx
jmp 0x1400516c9
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x38], rbp
movabs rbp, 0xb492b66fbe98f273
movabs r8, 0x9ddfea08eb382d69
mov r14, qword [rax + rcx - 0x28]
mov rdx, qword [rax + rcx - 0x10]
mov r9, qword [rax + rcx - 0x38]
mov r11, qword [rax + rcx - 0x30]
lea r10, [r9 + rdx]
mov rbx, qword [rax + rcx - 0x18]
lea rsi, [r11 + rcx]
xor rsi, rbx
imul rsi, r8
mov rdi, rbx
xor rdi, rsi
shr rsi, 0x2f
xor rsi, rdi
imul rsi, r8
mov rdi, rsi
shr rdi, 0x2f
xor rdi, rsi
imul rdi, r8
mov rsi, qword [rax + rcx - 0x40]
add rsi, rcx
lea r12, [rsi + r14]
add r12, rdi
rol r12, 0x2b
add r11, r9
add r11, rsi
mov r15, r11
rol r15, 0x14
add r15, rsi
add r15, r12
add r11, r14
mov r9, qword [rax + rcx - 0x20]
add r9, r10
mov rsi, qword [rax + rcx - 8]
add r9, rbp
lea r13, [rsi + r14]
add r13, r9
rol r13, 0x2b
add rbx, rdx
add rbx, r9
mov r12, rbx
rol r12, 0x14
add r12, r9
add r12, r13
imul r14, rbp
add r14, qword [rax]
add rbx, rsi
dec rcx
and rcx, 0xffffffffffffffc0
xor r13d, r13d
mov r9, rdi
add r14, r11
add r14, r10
mov rdx, qword [rax + r13 + 8]
mov rbp, qword [rax + r13 + 0x10]
add r14, rdx
rol r14, 0x1b
add r10, r15
mov r8, qword [rax + r13 + 0x30]
mov qword [rsp + 0x40], r8
add r10, r8
rol r10, 0x16
movabs rsi, 0xb492b66fbe98f273
imul r14, rsi
mov r8, r10
imul r8, rsi
mov rdi, r14
xor rdi, r12
mov rsi, qword [rax + r13 + 0x28]
add r11, rsi
mov r10, r11
add r10, r8
add r9, rbx
movabs r8, 0xb492b66fbe98f273
imul r15, r8
mov r8, qword [rax + r13 + 0x18]
add r15, qword [rax + r13]
add rbx, r8
add rbx, r15
add rbx, rdi
rol rbx, 0x2b
add rdx, rbp
add rdx, r15
mov r11, rdx
rol r11, 0x14
add r15, r11
add r15, rbx
rol r9, 0x1f
mov r11, rdx
mov r14, r9
movabs rdx, 0xb492b66fbe98f273
imul r14, rdx
add r11, r8
add r12, r14
mov rdx, qword [rax + r13 + 0x38]
add r12, qword [rax + r13 + 0x20]
add rbp, rdx
add rbp, r10
add rbp, r12
add rsi, qword [rsp + 0x40]
add rsi, r12
mov r8, rsi
rol r8, 0x14
add r12, r8
rol rbp, 0x2b
add r12, rbp
mov rbx, rsi
add rbx, rdx
add r13, 0x40
cmp rcx, r13
jne 0x140051a91
xor r15, r12
movabs r8, 0x9ddfea08eb382d69
imul r15, r8
xor r12, r15
shr r15, 0x2f
xor r15, r12
imul r15, r8
mov rax, r15
shr rax, 0x2f
xor rax, r15
imul rax, r8
add rax, r14
xor r11, rbx
imul r11, r8
xor rbx, r11
shr r11, 0x2f
xor r11, rbx
imul r11, r8
mov rcx, r11
shr rcx, 0x2f
xor rcx, r11
imul rcx, r8
mov rdx, r10
shr rdx, 0x2f
xor rdx, r10
movabs r9, 0xb492b66fbe98f273
imul rdx, r9
add rdx, rdi
add rdx, rcx
xor rdx, rax
imul rdx, r8
xor rax, rdx
shr rdx, 0x2f
xor rdx, rax
imul rdx, r8
mov rdi, rdx
shr rdi, 0x2f
xor rdi, rdx
imul rdi, r8
mov rbp, qword [rsp + 0x38]
mov r8, qword [rsp + 0x30]
jmp 0x1400516c9
lea rax, str.basic_string_const_char__detected_nullptr
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s_n
lea rdx, str....._third_partylibc_srcinclude_string
lea r9, str.__s___nullptr
mov r8d, 0x392
call fcn.1400e7b8d
lea rax, str.char_traits::copy_overlapped_range
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s_n
lea rdx, str....._third_partylibc_srcinclude__stringchar_traits.h
lea r9, str.__s2_____s1____s2_____s1__n
mov r8d, 0x102
call fcn.1400e7b8d
lea rcx, [rsp + 0x48]
call fcn.1400e4950
and rax, rsi
jmp 0x140051954
lea rbx, [r15 - 1]
and rbx, rdi
jmp 0x140051909