Function at 0x100022ae0
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x1a0
mov rax, qword [0x100083348]
xor rax, rsp
mov qword [rsp + 0x190], rax
lea r8, [0x100079010]
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0xe0], rcx
lea r9, [rax + 0xd]
mov r15d, dword [rax + 1]
lea rdi, [r9 - 1]
mov r14d, dword [rax + 5]
shr r15, 1
mov ebx, dword [rax + 9]
mov rbp, rdx
mov rsi, rcx
mov qword [rsp + 0xf0], rdx
mov ecx, 0xfffffff
and rbx, rcx
and r15, rcx
mov qword [rsp + 0xb0], r15
and r14, rcx
lea rdx, [0x100000000]
add rbx, rdx
mov qword [rsp + 0xe8], r14
xor r12d, r12d
cmp rdi, r8
mov qword [rsp + 0xc0], rbx
jb 0x100022bb8
mov eax, dword [0x10000dfa4]
mov ecx, dword [0x10001c66c]
imul ecx, eax
mov eax, ecx
add rax, r8
cmp rdi, rax
jae 0x100022bb8
mov rax, rdi
sub rax, r8
mov ecx, dword [0x10000dfa4]
cqo
idiv rcx
mov edx, dword [0x10000dfa4]
imul rdx, rax
add r8, rdx
lea rdx, [0x100000000]
jmp 0x100022bbb
mov r8, r12
cmp r8, r12
jne 0x100022bca
mov r8, rdi
and r8, 0xffffffffffff0000
sub r9, r8
mov r10d, ebx
lea rax, [r9 - 0x40]
cmp rax, r12
cmovl rax, r12
lea rdi, [rax + r8]
mov r11d, dword [0x10000dfa4]
sub r11, r14
sub r10d, edx
xor eax, eax
lea ecx, [rax + 0x40]
rep stosb byte [rdi], al
mov rdi, r12
inc r11
mov r9, r11
cmp r11, r12
je 0x100022c37
mov rdx, qword [0x100082270]
imul rdx, rdx, 0x343fd
shl rdi, 0x10
shr r9, 0x10
add rdx, 0x269ec3
mov rcx, rdx
shr rcx, 0x10
movzx eax, cx
or rdi, rax
cmp r9, r12
jne 0x100022c08
mov qword [0x100082270], rdx
mov rax, rdi
xor edx, edx
mov ecx, r10d
div r11
lea r13, [rdx + r8]
mov rdx, r14
mov r8, r13
mov qword [rsp + 0x50], r13
mov eax, 0x4c07128f
cmp r14, r12
mov rdx, qword [r14 + rbx]
mov dil, r12b
mov byte [rsp + 0x20], r12b
mov qword [rsp + 0xf8], r14
mov qword [rsp + 0xd0], rbx
mov qword [rsp + 0xc8], rdx
mov qword [rsp + 0xb8], r13
je 0x1000234f9
lea rcx, [rsp + 0xc8]
mov eax, 0xe34ac99b
mov r10d, dword [rsp + 0xcc]
mov eax, 0xfffffff
lea rdx, [0x100000000]
mov r9, qword [rsp + 0xc8]
mov rcx, rdx
and r9, rax
and r10, rax
mov qword [rsp + 0x30], r12
mov rax, qword [0x100033ac0]
add r9, rdx
sub rcx, rax
mov qword [rsp + 0x60], rcx
jne 0x100022d53
cmp r10, r12
mov r11, r12
jbe 0x100023069
mov edx, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x30]
mov r15d, 0x637ce67c
movzx ecx, byte [r11 + r9]
inc r11
add ecx, r15d
add r8d, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
mov ecx, dword [rsp + 0x28]
shr rax, 0x20
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
mov edx, dword [rsp + 0x28]
shr rax, 0x20
add edx, eax
add r8d, edx
cmp r11, r10
jb 0x100022cf1
mov dword [rsp + 0x34], edx
mov dword [rsp + 0x30], r8d
jmp 0x100023069
movsxd rcx, dword [0x10000003c]
mov r8d, dword [rcx + rdx + 0xb0]
lea rax, [r9 + r10]
mov qword [rsp + 0xd8], rax
mov eax, r9d
sub eax, edx
add r8, rdx
mov edx, dword [rcx + rdx + 0xb4]
mov ecx, eax
mov r11d, eax
mov rax, 0xfffffffffffff000
mov rbp, rcx
lea r13, [rcx + r10]
mov r12, r13
and r11, rax
sub rbp, r11
and r12, rax
mov qword [rsp + 0x58], r12
sub r13, r12
add rdx, r8
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x40], r13
jmp 0x100022dc2
mov eax, dword [r8]
cmp rax, r11
jae 0x100022dc7
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x100022db3
xor esi, esi
cmp r8, rdx
je 0x100022e05
mov eax, dword [r8]
cmp rax, r11
jne 0x100022e05
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x100022e05
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbp
jae 0x100022e00
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x100022de7
mov rdx, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x34]
mov r15d, 0x637ce67c
lea rdi, [0x100000000]
mov rbx, qword [rsp + 0x60]
mov r11d, dword [rsp + 0x30]
cmp r8, rdx
je 0x100022fe8
mov eax, dword [r8]
cmp rax, r12
ja 0x100022fe8
mov ecx, dword [r8 + 4]
lea rax, [rcx - 8]
shr rax, 1
cmp rsi, rax
jne 0x100022e62
add r8, rcx
cmp r8, rdx
je 0x100022fe8
mov eax, dword [r8]
cmp rax, r12
ja 0x100022fe8
xor esi, esi
jmp 0x100022e36
mov eax, dword [r8]
cmp rax, r12
jne 0x100022e7e
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r13
jae 0x100022fe8
mov rax, rsi
inc rsi
mov ecx, 0xf000
test word [r8 + rax*2 + 8], cx
je 0x100022e21
movzx edx, word [r8 + rax*2 + 8]
xor r12d, r12d
mov ebp, edx
and ebp, 0xfff
add ebp, dword [r8]
add rbp, rdi
mov r13, rbp
sub r13, r9
je 0x100022f11
movzx ecx, byte [r12 + r9]
inc r12
add ecx, r15d
add r11d, ecx
add ecx, r10d
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x48], rax
mov ecx, dword [rsp + 0x48]
shr rax, 0x20
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x48], rax
mov r10d, dword [rsp + 0x48]
shr rax, 0x20
add r10d, eax
add r11d, r10d
cmp r12, r13
jb 0x100022eb0
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r11d
mov rax, qword [rbp]
mov qword [rsp + 0x48], rax
shr edx, 0xc
cmp edx, 3
je 0x100022f30
sub edx, 0xa
neg edx
sbb r9d, r9d
add r9d, 3
jmp 0x100022f36
mov r9d, 2
mov rdx, rbx
neg rdx
sub r9d, 2
je 0x100022f5d
cmp r9d, 1
je 0x100022f4e
or rdx, 0xffffffffffffffff
jmp 0x100022f66
add rax, rdx
mov qword [rsp + 0x48], rax
mov edx, 8
jmp 0x100022f66
add dword [rsp + 0x48], edx
mov edx, 4
xor r9d, r9d
test rdx, rdx
je 0x100022fd0
movzx ecx, byte [rsp + r9 + 0x48]
inc r9
add ecx, r15d
add r11d, ecx
add ecx, r10d
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
mov ecx, dword [rsp + 0x28]
shr rax, 0x20
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov r10d, dword [rsp + 0x28]
add r10d, eax
add r11d, r10d
cmp r9, rdx
jb 0x100022f6e
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r11d
mov r12, qword [rsp + 0x58]
mov r13, qword [rsp + 0x40]
lea r9, [rdx + rbp]
mov rdx, qword [rsp + 0x38]
jmp 0x100022e21
mov rbx, qword [rsp + 0xc0]
xor r12d, r12d
mov rdx, r12
mov r8, qword [rsp + 0xd8]
sub r8, r9
je 0x100023064
movzx ecx, byte [rdx + r9]
inc rdx
add ecx, r15d
add r11d, ecx
add ecx, r10d
mov eax, ecx
imul eax, eax, 0x3041
rol eax, 0xc
ror ecx, 0xc
xor eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
mov ecx, dword [rsp + 0x28]
shr rax, 0x20
add eax, ecx
imul rax, rax, 0x637ce67c
mov qword [rsp + 0x28], rax
shr rax, 0x20
mov r10d, dword [rsp + 0x28]
add r10d, eax
add r11d, r10d
cmp rdx, r8
jb 0x100023003
mov dword [rsp + 0x34], r10d
mov dword [rsp + 0x30], r11d
mov r13, qword [rsp + 0x50]
mov rcx, r12
mov rax, rcx
inc rcx
and eax, 7
cmp rcx, 0x10
mov al, byte [rsp + rax + 0x30]
mov byte [rsp + rcx + 0x13f], al
jb 0x10002306c
mov eax, 0xc2dbc91c
mov ecx, dword [rsp + 0x148]
mov rsi, r13
mov eax, dword [rsp + 0x14c]
mov r11d, dword [rsp + 0x140]
mov edx, dword [rsp + 0x144]
mov dword [rsp + 0x110], eax
mov dword [rsp + 0x138], eax
mov eax, dword [0x10006a908]
mov dword [rsp + 0x118], r12d
mov dword [rsp + 0x100], eax
mov eax, dword [0x10006a90c]
mov dword [rsp + 0x11c], r12d
mov dword [rsp + 0x114], eax
mov eax, dword [0x10006a910]
mov dword [rsp + 0x120], r12d
mov dword [rsp + 0x128], eax
mov eax, dword [0x10006a914]
mov dword [rsp + 0x124], r12d
mov dword [rsp + 0x13c], eax
lea rax, [rsp + 0x150]
sub rsi, rax
mov r12, rbx
sub r12, r13
mov dword [rsp + 0x104], r11d
mov dword [rsp + 0x108], edx
mov dword [rsp + 0x10c], ecx
mov ebx, 0x40
mov dword [rsp + 0x12c], r11d
mov dword [rsp + 0x130], edx
mov dword [rsp + 0x134], ecx
mov qword [rsp + 0xd8], r12
mov qword [rsp + 0x60], rsi
lea rcx, [rsp + 0x70]
mov r8, rbx
lea rdx, [rsp + 0x100]
call sub.msvcrt.dll_memcpy
mov esi, dword [rsp + 0x7c]
mov r13d, dword [rsp + 0x94]
mov edx, dword [rsp + 0xa8]
mov r15d, dword [rsp + 0x90]
mov r11d, dword [rsp + 0x98]
mov ebp, dword [rsp + 0x80]
mov edi, dword [rsp + 0x78]
mov r14d, dword [rsp + 0x8c]
mov r9d, dword [rsp + 0xa0]
mov ebx, dword [rsp + 0x88]
mov ecx, dword [rsp + 0xac]
mov r8d, dword [rsp + 0xa4]
mov r10d, dword [rsp + 0x9c]
mov eax, dword [rsp + 0x84]
mov dword [rsp + 0x28], eax
mov r12d, dword [rsp + 0x28]
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x38], eax
mov qword [rsp + 0x58], 2
add eax, r9d
rol eax, 7
xor ebp, eax
mov eax, dword [rsp + 0x38]
add eax, ebp
rol eax, 9
xor r15d, eax
lea eax, [r15 + rbp]
rol eax, 0xd
xor r9d, eax
mov dword [rsp + 0x28], r9d
lea eax, [r15 + r9]
ror eax, 0xe
xor dword [rsp + 0x38], eax
mov r9d, dword [rsp + 0x38]
mov eax, dword [rsp + 0x40]
add eax, r12d
rol eax, 7
xor r13d, eax
lea eax, [r12 + r13]
rol eax, 9
xor r8d, eax
lea eax, [r8 + r13]
rol eax, 0xd
xor dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
add eax, r8d
ror eax, 0xe
xor r12d, eax
lea eax, [rbx + r11]
rol eax, 7
xor edx, eax
lea eax, [r11 + rdx]
rol eax, 9
xor edi, eax
lea eax, [rdi + rdx]
rol eax, 0xd
xor ebx, eax
lea eax, [rbx + rdi]
ror eax, 0xe
xor r11d, eax
lea eax, [r10 + rcx]
rol eax, 7
xor esi, eax
lea eax, [rcx + rsi]
rol eax, 9
xor r14d, eax
lea eax, [r14 + rsi]
rol eax, 0xd
xor r10d, eax
lea eax, [r10 + r14]
ror eax, 0xe
xor ecx, eax
mov eax, dword [rsp + 0x38]
add eax, esi
rol eax, 7
xor dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x74], eax
add eax, r9d
rol eax, 9
xor edi, eax
mov eax, dword [rsp + 0x40]
add eax, edi
rol eax, 0xd
xor esi, eax
lea eax, [rsi + rdi]
ror eax, 0xe
xor r9d, eax
mov dword [rsp + 0x38], r9d
mov eax, r9d
mov dword [rsp + 0x70], eax
mov r9d, dword [rsp + 0x28]
lea eax, [r12 + rbp]
rol eax, 7
xor ebx, eax
lea eax, [r12 + rbx]
rol eax, 9
xor r14d, eax
lea eax, [r14 + rbx]
rol eax, 0xd
xor ebp, eax
lea eax, [r14 + rbp]
ror eax, 0xe
xor r12d, eax
lea eax, [r11 + r13]
rol eax, 7
xor r10d, eax
lea eax, [r10 + r11]
rol eax, 9
xor r15d, eax
lea eax, [r10 + r15]
rol eax, 0xd
xor r13d, eax
lea eax, [r13 + r15]
ror eax, 0xe
xor r11d, eax
lea eax, [rcx + rdx]
rol eax, 7
xor r9d, eax
lea eax, [rcx + r9]
rol eax, 9
xor r8d, eax
lea eax, [r8 + r9]
rol eax, 0xd
xor edx, eax
lea eax, [rdx + r8]
ror eax, 0xe
mov dword [rsp + 0xa0], r9d
xor ecx, eax
sub qword [rsp + 0x58], 1
mov eax, dword [rsp + 0x38]
jne 0x1000231f6
mov dword [rsp + 0xac], ecx
mov dword [rsp + 0x88], ebx
xor ecx, ecx
mov dword [rsp + 0x84], r12d
lea ebx, [rcx + 0x40]
mov r12, qword [rsp + 0xd8]
mov dword [rsp + 0x80], ebp
mov ebp, dword [rsp + 0x120]
mov dword [rsp + 0x7c], esi
mov rsi, qword [rsp + 0x60]
mov dword [rsp + 0x78], edi
mov dil, byte [rsp + 0x20]
mov dword [rsp + 0xa8], edx
mov dword [rsp + 0xa4], r8d
mov dword [rsp + 0x9c], r10d
mov dword [rsp + 0x98], r11d
mov dword [rsp + 0x94], r13d
mov dword [rsp + 0x90], r15d
mov dword [rsp + 0x8c], r14d
mov eax, dword [rsp + rcx + 0x100]
add rcx, 4
add dword [rsp + rcx + 0x6c], eax
cmp rcx, rbx
jl 0x1000233e8
mov r8, rbx
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x150]
call sub.msvcrt.dll_memcpy
inc ebp
mov r9, qword [rsp + 0xf8]
cmp r9, rbx
mov dword [rsp + 0x120], ebp
jbe 0x100023473
lea r8, [r12 + rsi]
lea rcx, [rsp + 0x150]
mov rdx, rbx
mov al, byte [r8 + rcx]
xor al, byte [rcx]
mov byte [rsi + rcx], al
inc rcx
xor dil, al
sub rdx, 1
jne 0x100023436
add qword [rsp + 0xb8], rbx
sub r9, rbx
add rsi, rbx
add qword [rsp + 0xd0], rbx
mov byte [rsp + 0x20], dil
mov qword [rsp + 0xf8], r9
jmp 0x100023157
mov rbx, qword [rsp + 0xc0]
xor r12d, r12d
cmp r9, r12
mov r14, qword [rsp + 0xe8]
mov edx, r12d
jbe 0x1000234dc
mov rbx, qword [rsp + 0xd0]
lea rax, [rsp + 0x150]
mov r8, qword [rsp + 0xb8]
sub rbx, rax
lea rcx, [rsp + 0x150]
lea rax, [rsp + 0x150]
sub r8, rax
inc edx
mov al, byte [rcx + rbx]
xor al, byte [rcx]
mov byte [rcx + r8], al
xor dil, al
mov eax, edx
inc rcx
cmp rax, r9
jb 0x1000234bc
mov rbx, qword [rsp + 0xc0]
mov rsi, qword [rsp + 0xe0]
mov rbp, qword [rsp + 0xf0]
mov r13, qword [rsp + 0x50]
mov r15, qword [rsp + 0xb0]
cmp dil, byte [r14 + rbx + 8]
je 0x1000235c2
call fcn.1000749ec
lea r10, [0x100010fb8]
mov r11d, 0xffff
mov rbx, rax
lea r8, [rsi + 0x18]
and r8, 0xfffffffffffffff8
and rbx, 0xfffffffffffff000
lea r9, [r8 + 0xfff]
and r9, 0xfffffffffffff000
mov rdi, r12
mov qword [rsi + 0x10], r10
mov rcx, qword [0x100082270]
imul rcx, rcx, 0x343fd
shl rdi, 0x10
shr r11, 0x10
add rcx, 0x269ec3
mov rax, rcx
shr rax, 0x10
movzx edx, ax
or rdi, rdx
cmp r11, r12
jne 0x100023544
movabs rax, 0x8000800080008001
mov qword [0x100082270], rcx
mov qword [rbp + 0x98], rbx
mul rdi
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rbp + 0xb0], rdi
mov qword [rsp + 0xe8], r12
jmp 0x1000235b8
mov rax, qword [rsp + 0xe8]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x1000235a9
jmp 0x1000236e7
mov rsi, rbx
sub rsi, r13
lea rcx, [0x100000000]
mov rax, qword [0x100033ac0]
mov rbp, rcx
sub rbp, rax
jne 0x1000235e7
cmp rsi, r12
je 0x1000236cf
xor edi, edi
mov r11, r13
sub r11, rbx
sub ebx, ecx
lea r12d, [r14 + rbx]
lea r14, [0x10004bc78]
mov rcx, qword [0x10004bc78]
lea r8d, [rcx - 1]
test r8d, r8d
js 0x100023639
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 4]
and r9d, 0xfffffff
cmp ebx, r9d
jae 0x10002362f
lea r8d, [rax - 1]
jmp 0x100023634
jbe 0x100023692
lea edi, [rax + 1]
cmp r8d, edi
jge 0x10002360c
movsxd r10, edi
mov eax, ecx
cmp r10, rax
jae 0x1000236cf
lea r15, [0x100000000]
mov edi, 0xfffffff
mov edx, dword [r14 + r10*4 + 4]
mov eax, edx
and eax, edi
cmp eax, r12d
jae 0x1000236c7
mov r8, rdx
xor r9d, r9d
and r8, rdi
mov edi, edx
sar edx, 0x1e
shl edi, 2
add r8, r15
and edx, 3
sar edi, 0x1e
and edi, 3
sub edi, 1
je 0x10002369c
sub edi, 1
je 0x100023697
cmp edi, 1
jne 0x1000236a2
mov r9, rbp
jmp 0x1000236a2
movsxd r10, eax
jmp 0x10002363c
mov r9, rsi
jmp 0x1000236a2
mov r9, rbp
sub r9, rsi
sub edx, 2
je 0x1000236b2
cmp edx, 1
jne 0x1000236bd
add qword [r8 + r11], r9
jmp 0x1000236b6
add dword [r8 + r11], r9d
mov rcx, qword [0x10004bc78]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x10002364e
mov r15, qword [rsp + 0xb0]
mov eax, dword [0x10000dfa4]
mov eax, 0xad81318b
lea r10, [r13 + r15]
mov rsi, qword [rsp + 0xe0]
mov qword [rsi + 0x10], r10
mov rcx, qword [rsp + 0x190]
xor rcx, rsp
call fcn.100060d50
mov rbx, qword [rsp + 0x1f0]
add rsp, 0x1a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret