Function at 0x1400460b5
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x38
mov ebx, r8d
mov rdi, rdx
mov rsi, rcx
mov r14, qword [rdx]
lea rcx, [rdx + 8]
call fcn.140046e37
test rax, rax
jne 0x14004643d
inc bl
and bl, 1
test r14, r14
movzx ecx, bl
mov eax, 2
cmove eax, ecx
mov rbx, qword [rdi + 0x18]
test al, al
je 0x14004613a
movzx eax, al
cmp eax, 2
jne 0x140046112
xor ebp, ebp
mov dword [rsp + 0x34], 0
jmp 0x140046166
mov rax, qword [rdi + 0x10]
xor ecx, ecx
cmp rbx, rcx
je 0x140046130
movzx edx, byte [rax + rcx]
cmp edx, 0x20
je 0x14004613a
inc rcx
cmp edx, 9
jne 0x140046118
jmp 0x14004613a
test rbx, rbx
je 0x14004613a
mov bpl, 1
jmp 0x140046108
mov r14, qword [rsi + 0x10]
cmp r14, qword [rsi]
jne 0x14004614b
mov rcx, rsi
call fcn.140049efe
mov rax, qword [rsi + 8]
mov word [rax + r14*2], 0x22
inc r14
mov qword [rsi + 0x10], r14
mov bpl, 1
mov al, 1
mov dword [rsp + 0x34], eax
mov r13, qword [rdi + 0x10]
add rbx, r13
xor r15d, r15d
xor edi, edi
test r15w, r15w
jne 0x14004625e
cmp r13, rbx
je 0x14004638d
movzx r15d, byte [r13]
test r15b, r15b
js 0x140046197
inc r13
jmp 0x14004625e
mov eax, r15d
not al
or al, 0x1f
add al, r15b
inc al
movzx eax, al
movzx edx, byte [r13 + 1]
and edx, 0x3f
cmp r15b, 0xdf
jbe 0x140046229
mov cl, byte [r13 + 2]
shl edx, 6
mov r8d, ecx
xor r8b, 0xc0
and r8b, cl
movzx r8d, r8b
mov ecx, edx
xor ecx, r8d
not r8d
and r8d, edx
add ecx, edx
sub ecx, r8d
cmp r15b, 0xf0
jb 0x140046245
mov r8b, byte [r13 + 3]
add r13, 4
shl eax, 0x12
mov edx, eax
xor edx, 0x3e00000
and edx, eax
shl ecx, 6
mov eax, r8d
xor al, 0xc0
and al, r8b
movzx eax, al
mov r15d, ecx
xor r15d, eax
not eax
and eax, ecx
add r15d, ecx
sub r15d, eax
mov eax, r15d
not eax
or r15d, edx
not edx
and edx, eax
not r15d
or r15d, edx
not r15d
jmp 0x140046251
add r13, 2
shl eax, 6
mov ecx, eax
not ecx
or eax, edx
not edx
and edx, ecx
not eax
or eax, edx
not eax
mov r15d, eax
jmp 0x14004625e
add r13, 3
shl eax, 0xc
or ecx, eax
mov r15d, ecx
cmp r15d, 0xffff
ja 0x140046359
xor r14d, r14d
test bpl, bpl
je 0x140046325
cmp r15w, 0x22
je 0x140046286
movzx eax, r15w
cmp eax, 0x5c
jne 0x140046323
inc rdi
jmp 0x140046325
mov rax, rdi
inc rax
je 0x140046454
mov rax, qword [rsi]
mov rdx, qword [rsi + 0x10]
movabs rcx, 0xa645094c543718e0
sub rax, rcx
sub rax, rdx
add rax, rcx
cmp rax, rdi
ja 0x1400462ee
mov eax, edi
and eax, 1
mov r8, rdi
or r8, 1
add r8, rax
mov qword [rsp + 0x20], 2
mov r9d, 2
mov rcx, rsi
call fcn.1400195e9
movabs rcx, 0x8000000000000001
cmp rax, rcx
jne 0x140046451
mov rdx, qword [rsi + 0x10]
mov rax, qword [rsi + 8]
test rdi, rdi
je 0x140046316
xor ecx, ecx
mov r8d, ecx
and r8d, 1
xor rcx, 1
lea rcx, [rcx + r8*2]
mov word [rax + rdx*2], 0x5c
inc rdx
cmp rcx, rdi
jne 0x1400462f9
mov word [rax + rdx*2], 0x5c
inc rdx
mov qword [rsi + 0x10], rdx
xor edi, edi
mov r12, qword [rsi + 0x10]
cmp r12, qword [rsi]
jne 0x140046336
mov rcx, rsi
call fcn.140049efe
mov rax, qword [rsi + 8]
mov word [rax + r12*2], r15w
mov eax, r12d
and eax, 1
xor r12, 1
lea rax, [r12 + rax*2]
mov qword [rsi + 0x10], rax
mov r15d, r14d
jmp 0x140046172
lea eax, [r15 + 0xff0000]
shr eax, 0xa
mov ecx, eax
xor ecx, 0xffffd800
add ecx, eax
and eax, 0x27ff
sub ecx, eax
or r15d, 0xdc00
and r15d, 0xdfff
mov r14d, r15d
mov r15d, ecx
jmp 0x140046261
cmp byte [rsp + 0x34], 0
je 0x14004643b
mov rax, qword [rsi]
mov rbx, qword [rsi + 0x10]
movabs rcx, 0x5c8ca98790925a78
sub rax, rcx
sub rax, rbx
add rax, rcx
cmp rax, rdi
jae 0x1400463ed
mov qword [rsp + 0x20], 2
mov r9d, 2
mov rcx, rsi
mov rdx, rbx
mov r8, rdi
call fcn.1400195e9
movabs rcx, 0x8000000000000001
cmp rax, rcx
jne 0x140046451
mov rax, qword [rsi + 8]
mov rbx, qword [rsi + 0x10]
jmp 0x1400463f6
mov rax, qword [rsi + 8]
test rdi, rdi
je 0x140046409
xor ecx, ecx
inc rcx
mov word [rax + rbx*2], 0x5c
inc rbx
dec rdi
jne 0x1400463f8
mov qword [rsi + 0x10], rbx
cmp rbx, qword [rsi]
jne 0x14004641e
mov rcx, rsi
call fcn.140049efe
mov rax, qword [rsi + 8]
mov word [rax + rbx*2], 0x22
movabs rax, 0x64df4a13923ae324
sub rbx, rax
add rax, rbx
inc rax
mov qword [rsi + 0x10], rax
xor edx, edx
mov rax, rdx
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test rax, rax
ud2