Function at 0x140022a40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rbx
push r12
push r14
mov rbp, rsp
sub rsp, 0x78
mov rax, qword [0x14018ef00]
xor rax, rsp
mov qword [rbp - 0x20], rax
xor r12d, r12d
mov qword [rbp - 0x40], rdx
mov rbx, rdx
mov eax, r12d
mov edx, dword [r8 + 8]
mov r14, rcx
cmp edx, dword [0x1401918ec]
cmove rax, r8
test rax, rax
je 0x140022a90
mov r8, qword [rax + 0x20]
mov rdx, rbx
call fcn.140022a40
jmp 0x140022d3f
cmp edx, dword [0x1401918a4]
je 0x14002301f
cmp edx, dword [0x1401918f4]
je 0x14002301f
cmp edx, dword [0x1401918e0]
je 0x14002301f
cmp edx, dword [0x140191940]
je 0x14002301f
cmp edx, dword [0x14019192c]
mov rax, r12
cmove rax, r8
test rax, rax
je 0x140022b02
lea rdx, [rax + 0x20]
add rcx, 0x10
call fcn.14001e7b0
test rax, rax
je 0x140022af3
mov rax, qword [rax]
mov qword [rbx + 8], rax
mov qword [rbx], r12
jmp 0x140022d3f
mov rax, r12
mov qword [rbx], r12
mov qword [rbx + 8], rax
jmp 0x140022d3f
cmp edx, dword [0x14019193c]
jne 0x140022b1a
mov qword [rbx], 1
mov qword [rbx + 8], r12
jmp 0x140022d3f
cmp edx, dword [0x1401918e4]
mov qword [rsp + 0x70], rdi
jne 0x140022b38
mov edi, 3
mov qword [rbx + 8], r12
mov qword [rbx], rdi
jmp 0x140022d3a
cmp edx, dword [0x140191944]
mov qword [rsp + 0xb8], rsi
mov rsi, r12
cmove rsi, r8
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x60], r15
mov qword [rbp - 0x50], rsi
test rsi, rsi
je 0x140022c6c
mov rcx, qword [rcx + 8]
lea rdx, [rbp - 0x50]
call fcn.14001e7b0
mov rcx, rax
movabs r15, 0x8080808080808080
test rax, rax
je 0x140022b99
cmp qword [rsi + 0x30], 2
ja 0x140022b99
mov byte [rbp - 0x58], 1
mov edi, 2
mov qword [rbp - 0x48], r12
jmp 0x140022be7
neg rax
mov qword [rbp - 0x48], r12
mov byte [rbp - 0x58], r12b
sbb rdi, rdi
add rdi, 3
mov qword [rbp - 0x50], rdi
test rcx, rcx
jne 0x140022beb
mov r8, qword [rsi + 0x20]
lea rdx, [rbp - 0x30]
mov rcx, r14
call fcn.140022a40
mov byte [rbp - 0x58], r12b
mov rdx, qword [rax]
add rdx, rdi
mov rcx, rdx
and rcx, r15
mov rax, rcx
mov rdi, rcx
shr rax, 7
xor rcx, rdx
sub rdi, rax
or rdi, rcx
mov qword [rbp - 0x50], rdi
mov r13, r12
cmp qword [rsi + 0x30], r12
jbe 0x140022c60
movzx ebx, byte [rbp - 0x58]
nop dword [rax + rax]
mov r8, qword [rsi + 0x28]
lea rdx, [rbp - 0x30]
mov rcx, r14
mov r8, qword [r12 + r8]
call fcn.140022a40
mov rax, qword [rbp - 0x30]
test rax, rax
jne 0x140022c26
test bl, bl
jne 0x140022c26
mov eax, 1
lea rcx, [rdi + rax]
mov qword [rbp - 0x48], 0
mov rdx, rcx
inc r13
and rdx, r15
add r12, 8
mov rax, rdx
mov rdi, rdx
shr rax, 7
xor rdx, rcx
sub rdi, rax
or rdi, rdx
cmp r13, qword [rsi + 0x30]
jb 0x140022c00
mov rbx, qword [rbp - 0x40]
mov qword [rbp - 0x50], rdi
movups xmm0, xmmword [rbp - 0x50]
movups xmmword [rbx], xmm0
jmp 0x140022d28
cmp edx, dword [0x1401918cc]
mov rax, r12
cmove rax, r8
test rax, rax
je 0x140022ca7
mov r8, qword [rax + 0x20]
lea rdx, [rbp - 0x30]
call fcn.140022a40
mov qword [rbx], r12
movabs r15, 0x8080808080808080
mov qword [rbx + 8], r12
mov r8, qword [rax]
inc r8
jmp 0x140022f70
cmp edx, dword [0x140191934]
mov rsi, r12
cmove rsi, r8
test rsi, rsi
je 0x140022d0a
mov r8, qword [rsi + 0x20]
lea rdx, [rbp - 0x30]
call fcn.140022a40
mov r8, qword [rsi + 0x28]
lea rdx, [rbp - 0x40]
mov rcx, r14
mov rdi, rax
call fcn.140022a40
mov rdx, qword [rdi]
movabs r15, 0x8080808080808080
add rdx, qword [rax]
mov rcx, rdx
and rcx, r15
mov rax, rcx
mov r8, rcx
shr rax, 7
xor rcx, rdx
sub r8, rax
or r8, rcx
inc r8
jmp 0x140022f6c
cmp edx, dword [0x1401918d0]
mov rax, r12
cmove rax, r8
test rax, rax
je 0x140022d59
mov edi, 0xa
mov qword [rbx], rdi
mov qword [rbx + 8], r12
mov r13, qword [rsp + 0x68]
mov rsi, qword [rsp + 0xb8]
mov r15, qword [rsp + 0x60]
mov rdi, qword [rsp + 0x70]
mov rax, rbx
mov rcx, qword [rbp - 0x20]
xor rcx, rsp
call fcn.140139630
add rsp, 0x78
pop r14
pop r12
pop rbx
pop rbp
ret
cmp edx, dword [0x140191954]
mov rsi, r12
cmove rsi, r8
test rsi, rsi
je 0x140022e36
mov edi, 0xa
mov qword [rbp - 0x50], r12
cmp qword [rsi + 0x28], r12
jbe 0x140022d21
movabs r15, 0x8080808080808080
nop dword [rax + rax]
mov r13, qword [rsi + 0x20]
mov r8, qword [r13 + r12 + 8]
test r8, r8
je 0x140022dc9
lea rdx, [rbp - 0x30]
mov rcx, r14
call fcn.140022a40
mov rdx, qword [rax]
add rdx, rdi
mov rcx, rdx
and rcx, r15
mov rax, rcx
mov rdi, rcx
shr rax, 7
xor rcx, rdx
sub rdi, rax
or rdi, rcx
mov r8, qword [r13 + r12 + 0x10]
lea rdx, [rbp - 0x40]
mov rcx, r14
call fcn.140022a40
add r12, 0x18
mov rdx, qword [rax]
add rdx, rdi
mov rcx, rdx
and rcx, r15
mov rax, rcx
mov r8, rcx
xor rcx, rdx
shr rax, 7
sub r8, rax
or r8, rcx
inc r8
mov rcx, r8
and rcx, r15
mov rax, rcx
mov rdi, rcx
xor rcx, r8
shr rax, 7
sub rdi, rax
or rdi, rcx
mov rcx, qword [rbp - 0x50]
inc rcx
mov qword [rbp - 0x50], rcx
cmp rcx, qword [rsi + 0x28]
jb 0x140022d90
xor r12d, r12d
jmp 0x140022d21
cmp edx, dword [0x140191960]
mov rax, r12
cmove rax, r8
test rax, rax
je 0x140022e75
mov r8, qword [rax + 0x28]
lea rdx, [rbp - 0x30]
mov qword [rbp - 0x40], r12
mov qword [rbp - 0x38], 0xffffffffffffffff
call fcn.140022a40
lea r8, [rbp - 0x40]
mov rdx, rax
mov rcx, rbx
call fcn.1400229b0
jmp 0x140022d28
cmp edx, dword [0x14019189c]
mov rsi, r12
cmove rsi, r8
test rsi, rsi
je 0x140022eba
mov r8, qword [rsi + 0x30]
lea rdx, [rbp - 0x30]
call fcn.140022a40
mov r8, qword [rsi + 0x28]
lea rdx, [rbp - 0x40]
mov rcx, r14
mov rdi, rax
call fcn.140022a40
mov r8, rdi
mov rdx, rax
mov rcx, rbx
call fcn.1400229b0
jmp 0x140022d28
cmp edx, dword [0x140191914]
mov rax, r12
cmove rax, r8
test rax, rax
je 0x140022edd
mov r8, qword [rax + 0x20]
mov rdx, rbx
call fcn.140022a40
jmp 0x140022d28
cmp edx, dword [0x140191918]
mov r13, r12
cmove r13, r8
test r13, r13
je 0x140022f91
mov r8, qword [r13 + 0x20]
lea rdx, [rbp - 0x30]
call fcn.140022a40
mov r8, qword [r13 + 0x30]
lea rdx, [rbp - 0x40]
mov rcx, r14
mov rdi, rax
call fcn.140022a40
mov rsi, qword [rdi]
lea rdx, [rbp - 0x50]
mov r8, qword [r13 + 0x40]
movabs r15, 0x8080808080808080
mov rcx, r14
add rsi, qword [rax]
mov rdi, rsi
and rdi, r15
call fcn.140022a40
mov rcx, rdi
mov rdx, rdi
shr rcx, 7
xor rdi, rsi
sub rdx, rcx
or rdx, rdi
add rdx, qword [rax]
mov rcx, rdx
and rcx, r15
mov rax, rcx
mov r8, rcx
shr rax, 7
xor rcx, rdx
sub r8, rax
or r8, rcx
add r8, 2
mov qword [rbx + 8], r12
mov rdx, r8
and rdx, r15
mov rax, rdx
mov rcx, rdx
shr rax, 7
xor rdx, r8
sub rcx, rax
or rcx, rdx
mov qword [rbx], rcx
jmp 0x140022d28
cmp edx, dword [0x140191958]
mov rax, r12
cmove rax, r8
test rax, rax
je 0x140023017
mov rsi, qword [rax + 0x30]
mov edi, 3
mov rax, qword [rax + 0x38]
lea r12, [rsi + rax*8]
cmp rsi, r12
je 0x140023007
movabs r15, 0x8080808080808080
nop dword [rax]
nop word [rax + rax]
mov r8, qword [rsi]
lea rdx, [rbp - 0x30]
mov rcx, r14
call fcn.140022a40
add rsi, 8
mov rdx, qword [rax]
add rdx, rdi
mov rcx, rdx
and rcx, r15
mov rax, rcx
mov rdi, rcx
shr rax, 7
xor rcx, rdx
sub rdi, rax
or rdi, rcx
cmp rsi, r12
jne 0x140022fd0
mov qword [rbx], rdi
mov qword [rbx + 8], 0
jmp 0x140022d28
mov qword [rbx], r12
jmp 0x140022d24
mov qword [rbx], r12
mov qword [rbx + 8], 0xffffffffffffffff
jmp 0x140022d3f