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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x1c8
movdqa xmmword [rsp + 0x1b0], xmm9
movdqa xmmword [rsp + 0x1a0], xmm8
movdqa xmmword [rsp + 0x190], xmm7
movaps xmmword [rsp + 0x180], xmm6
mov qword [rsp + 0x158], r9
mov qword [rsp + 0x150], r8
mov r12, rdx
mov r13, rcx
mov ecx, 0x100000
mov edx, 1
call sym.__rust_alloc_zeroed
test rax, rax
je 0x140005156
mov rsi, rax
mov rax, qword [rsp + 0x248]
mov rcx, qword [rsp + 0x238]
lea rbp, [rsp + 0x70]
cmp rax, 1
adc rax, 0
mov qword [rsp + 0x128], rax
dec rax
mov qword [rsp + 0x148], rax
lea rax, [r13 + 0x10]
mov qword [rsp + 0x110], rax
lea rax, [r13 + 0x28]
mov qword [rsp + 0x108], rax
lea rax, [r12 + 0x20]
mov qword [rsp + 0x130], rax
lea rax, [rsi + 0x10]
mov qword [rsp + 0x138], rax
xorps xmm6, xmm6
xor ebx, ebx
mov qword [rsp + 0x28], rsi
cmp rbx, rcx
jae 0x1400050b1
mov qword [rsp + 0x140], rbx
xor r15d, r15d
nop dword [rax + rax]
mov rax, qword [r13 + 8]
mov rsi, qword [r13 + 0x10]
mov rbx, qword [r13 + 0x18]
cmp rsi, rbx
jne 0x1400044c0
cmp rax, 0x100001
jae 0x1400044c0
mov rax, qword [rsp + 0x110]
movups xmmword [rax], xmm6
mov r9d, 0x100000
lea rcx, [rsp + 0xc0]
mov rdx, qword [rsp + 0x108]
mov rsi, qword [rsp + 0x28]
mov r8, rsi
call sym.std::sys::windows::fs::File::read::he39721b97e39f583
cmp qword [rsp + 0xc0], 0
jne 0x140004cb5
mov r14, qword [rsp + 0xc8]
lea rbx, [r15 + 1]
test r14, r14
jne 0x1400045ab
jmp 0x140004ca0
mov rdi, qword [r13]
cmp rsi, rbx
jb 0x140004526
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], 0
mov rax, qword [r13 + 0x20]
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x108]
lea rdx, [rsp + 0x30]
xor r8d, r8d
mov rsi, qword [rsp + 0x28]
call sym.std::sys::windows::fs::File::read_buf::h41d91becfe28409c
mov r14, rax
test rax, rax
jne 0x140004cc4
mov qword [r13 + 0x10], 0
mov rbx, qword [rsp + 0x40]
movdqu xmm0, xmmword [rsp + 0x40]
movdqu xmmword [r13 + 0x18], xmm0
xor esi, esi
mov r14, rbx
sub r14, rsi
test rdi, rdi
je 0x140004cbf
add rdi, rsi
cmp r14, 0x100000
mov eax, 0x100000
cmovae r14, rax
cmp r14, 1
jne 0x140004560
movzx eax, byte [rdi]
mov rcx, qword [rsp + 0x28]
mov byte [rcx], al
jmp 0x140004570
mov rcx, qword [rsp + 0x28]
mov rdx, rdi
mov r8, r14
call sym.memcpy
add rsi, r14
cmp rsi, rbx
cmovae rsi, rbx
mov rax, qword [rsp + 0x110]
mov qword [rax], rsi
mov qword [rsp + 0xc8], r14
mov qword [rsp + 0xc0], 0
mov rsi, qword [rsp + 0x28]
lea rbx, [r15 + 1]
test r14, r14
je 0x140004ca0
cmp qword [rsp + 0x158], 0x20
jne 0x140004e16
movups xmm0, xmmword [0x1401ed0d8]
movaps xmmword [rsp + 0xd0], xmm0
mov rax, qword [rsp + 0x150]
movdqu xmm0, xmmword [rax]
movdqu xmm1, xmmword [rax + 0x10]
lea rax, [rsp + 0xe0]
movdqu xmmword [rax + 0x10], xmm1
movdqu xmmword [rax], xmm0
mov rcx, qword [rsp + 0x230]
mov rax, qword [rcx]
mov qword [rsp + 0x118], rax
mov eax, dword [rcx + 8]
mov dword [rsp + 0x120], eax
mov rax, qword [0x1401ec030]
movzx eax, byte [rax]
cmp al, 0xff
jne 0x140004682
lea rcx, [rsp + 0x160]
mov edx, 1
call sym.chacha20::avx2_cpuid::init_get::cpuid::h278e717ef039d452
lea rcx, [rsp + 0x170]
mov edx, 7
xor r8d, r8d
call sym.chacha20::avx2_cpuid::init_get::cpuid_count::h2f1dec1b862caf29
mov esi, dword [rsp + 0x168]
mov edi, dword [rsp + 0x174]
mov eax, esi
not eax
test eax, 0xc000000
jne 0x140004664
call fcn.140001e30
not eax
test al, 6
sete al
jmp 0x140004666
xor eax, eax
shr dil, 5
and dil, al
shr esi, 0x1c
and sil, dil
mov rax, qword [0x1401ec030]
mov byte [rax], sil
mov rsi, qword [rsp + 0x28]
movdqa xmm0, xmmword [rsp + 0xd0]
movdqa xmm1, xmmword [rsp + 0xe0]
movdqa xmm2, xmmword [rsp + 0xf0]
movdqa xmmword [rsp + 0x50], xmm2
movdqa xmmword [rsp + 0x40], xmm1
movdqa xmmword [rsp + 0x30], xmm0
mov eax, dword [rsp + 0x120]
mov dword [rbp - 4], eax
mov rax, qword [rsp + 0x118]
mov qword [rbp - 0xc], rax
movaps xmmword [rbp + 0x30], xmm6
movaps xmmword [rbp + 0x20], xmm6
movaps xmmword [rbp + 0x10], xmm6
movaps xmmword [rbp], xmm6
movzx eax, byte [rsp + 0xd2]
mov byte [rbp + 0x43], al
movzx eax, word [rsp + 0xd0]
mov word [rbp + 0x41], ax
mov dword [rsp + 0x60], 0
mov byte [rsp + 0xb0], 0
cmp r14, 0x100001
jae 0x140005140
mov rax, r14
shr rax, 6
mov qword [rsp + 0xd0], rsi
mov qword [rsp + 0xd8], rsi
mov qword [rsp + 0xe0], rax
lea rcx, [rsp + 0x30]
lea rdx, [rsp + 0xd0]
call sym._ZN87__LT_chacha20..ChaChaCore_LT_R_GT__u20_as_u20_cipher..stream_core..StreamCipherCore_GT_20process_with_backend17h7ee46632e
mov edi, r14d
and edi, 0x3f
je 0x1400049c4
mov rax, qword [0x1401ec030]
movzx eax, byte [rax]
cmp al, 1
jne 0x140004770
lea rcx, [rsp + 0x30]
mov rdx, rbp
call sym._ZN8chacha208backends4avx25inner17h8dd507dae886c24aE.llvm.13831561135636890148
jmp 0x1400048f6
movdqa xmm4, xmmword [rsp + 0x30]
movdqa xmm2, xmmword [rsp + 0x40]
movdqa xmm1, xmmword [rsp + 0x50]
movdqa xmm0, xmmword [rsp + 0x60]
mov eax, 0xa
movdqa xmm7, xmm4
movdqa xmm3, xmm2
movdqa xmm5, xmm0
movdqa xmm8, xmm1
nop
paddd xmm7, xmm3
pxor xmm5, xmm7
movdqa xmm9, xmm5
psrld xmm9, 0x10
pslld xmm5, 0x10
por xmm5, xmm9
paddd xmm8, xmm5
pxor xmm3, xmm8
movdqa xmm9, xmm3
psrld xmm9, 0x14
pslld xmm3, 0xc
por xmm3, xmm9
paddd xmm7, xmm3
pxor xmm5, xmm7
movdqa xmm9, xmm5
psrld xmm9, 0x18
pslld xmm5, 8
por xmm5, xmm9
paddd xmm8, xmm5
pxor xmm3, xmm8
movdqa xmm9, xmm3
psrld xmm9, 0x19
pslld xmm3, 7
por xmm3, xmm9
pshufd xmm8, xmm8, 0x39
pshufd xmm5, xmm5, 0x4e
pshufd xmm7, xmm7, 0x93
paddd xmm7, xmm3
pxor xmm5, xmm7
movdqa xmm9, xmm5
psrld xmm9, 0x10
pslld xmm5, 0x10
por xmm5, xmm9
paddd xmm8, xmm5
pxor xmm3, xmm8
movdqa xmm9, xmm3
psrld xmm9, 0x14
pslld xmm3, 0xc
por xmm3, xmm9
paddd xmm7, xmm3
pxor xmm5, xmm7
movdqa xmm9, xmm5
psrld xmm9, 0x18
pslld xmm5, 8
por xmm5, xmm9
paddd xmm8, xmm5
pxor xmm3, xmm8
movdqa xmm9, xmm3
psrld xmm9, 0x19
pslld xmm3, 7
por xmm3, xmm9
pshufd xmm8, xmm8, 0x93
pshufd xmm5, xmm5, 0x4e
pshufd xmm7, xmm7, 0x39
dec rax
jne 0x1400047a0
paddd xmm7, xmm4
paddd xmm3, xmm2
paddd xmm8, xmm1
paddd xmm5, xmm0
movdqa xmmword [rsp + 0x70], xmm7
movdqa xmmword [rsp + 0x80], xmm3
movdqa xmmword [rsp + 0x90], xmm8
movdqa xmmword [rsp + 0xa0], xmm5
movd eax, xmm0
inc eax
mov dword [rsp + 0x60], eax
mov rdx, r14
and rdx, 0xffffffffffffffc0
lea rax, [rsi + rdx]
cmp edi, 8
jae 0x140004910
xor ecx, ecx
jmp 0x1400049b0
cmp edi, 0x20
jae 0x140004919
xor ecx, ecx
jmp 0x14000497f
mov r8d, r14d
and r8d, 0x1f
mov rcx, rdi
sub rcx, r8
add rdx, qword [rsp + 0x138]
xor r9d, r9d
nop word cs:[rax + rax]
movdqu xmm0, xmmword [rdx + r9 - 0x10]
movdqu xmm1, xmmword [rdx + r9]
pxor xmm0, xmmword [rsp + r9 + 0x70]
pxor xmm1, xmmword [rsp + r9 + 0x80]
movdqu xmmword [rdx + r9 - 0x10], xmm0
movdqu xmmword [rdx + r9], xmm1
add r9, 0x20
cmp rcx, r9
jne 0x140004940
test r8, r8
je 0x1400049c4
cmp r8d, 8
jb 0x1400049b0
mov rdx, rcx
mov r8d, r14d
and r8d, 7
mov rcx, rdi
sub rcx, r8
nop
mov r9, qword [rsp + rdx + 0x70]
xor qword [rax + rdx], r9
add rdx, 8
cmp rcx, rdx
jne 0x140004990
test r8, r8
je 0x1400049c4
nop word [rax + rax]
movzx edx, byte [rsp + rcx + 0x70]
xor byte [rax + rcx], dl
lea rdx, [rcx + 1]
mov rcx, rdx
cmp rdi, rdx
jne 0x1400049b0
mov byte [rsp + 0xb0], dil
mov rax, qword [r12 + 8]
mov rsi, qword [r12 + 0x10]
sub rax, rsi
cmp rax, r14
jbe 0x140004a10
mov rcx, qword [r12]
add rcx, rsi
mov rdi, qword [rsp + 0x28]
mov rdx, rdi
mov r8, r14
call sym.memcpy
add rsi, r14
mov qword [r12 + 0x10], rsi
mov rsi, rdi
jmp 0x140004a2f
mov rcx, r12
mov rsi, qword [rsp + 0x28]
mov rdx, rsi
mov r8, r14
call sym.std::io::buffered::bufwriter::BufWriter_W_::write_all_cold::h030983a91b4887f2
mov rdi, rax
test rax, rax
jne 0x140004e27
mov byte [rsp + 0x70], 0
mov byte [rsp + 0x71], 0
mov byte [rsp + 0x72], 0
mov byte [rsp + 0x73], 0
mov byte [rsp + 0x74], 0
mov byte [rsp + 0x75], 0
mov byte [rsp + 0x76], 0
mov byte [rsp + 0x77], 0
mov byte [rsp + 0x78], 0
mov byte [rsp + 0x79], 0
mov byte [rsp + 0x7a], 0
mov byte [rsp + 0x7b], 0
mov byte [rsp + 0x7c], 0
mov byte [rsp + 0x7d], 0
mov byte [rsp + 0x7e], 0
mov byte [rsp + 0x7f], 0
mov byte [rsp + 0x80], 0
mov byte [rsp + 0x81], 0
mov byte [rsp + 0x82], 0
mov byte [rsp + 0x83], 0
mov byte [rsp + 0x84], 0
mov byte [rsp + 0x85], 0
mov byte [rsp + 0x86], 0
mov byte [rsp + 0x87], 0
mov byte [rsp + 0x88], 0
mov byte [rsp + 0x89], 0
mov byte [rsp + 0x8a], 0
mov byte [rsp + 0x8b], 0
mov byte [rsp + 0x8c], 0
mov byte [rsp + 0x8d], 0
mov byte [rsp + 0x8e], 0
mov byte [rsp + 0x8f], 0
mov byte [rsp + 0x90], 0
mov byte [rsp + 0x91], 0
mov byte [rsp + 0x92], 0
mov byte [rsp + 0x93], 0
mov byte [rsp + 0x94], 0
mov byte [rsp + 0x95], 0
mov byte [rsp + 0x96], 0
mov byte [rsp + 0x97], 0
mov byte [rsp + 0x98], 0
mov byte [rsp + 0x99], 0
mov byte [rsp + 0x9a], 0
mov byte [rsp + 0x9b], 0
mov byte [rsp + 0x9c], 0
mov byte [rsp + 0x9d], 0
mov byte [rsp + 0x9e], 0
mov byte [rsp + 0x9f], 0
mov byte [rsp + 0xa0], 0
mov byte [rsp + 0xa1], 0
mov byte [rsp + 0xa2], 0
mov byte [rsp + 0xa3], 0
mov byte [rsp + 0xa4], 0
mov byte [rsp + 0xa5], 0
mov byte [rsp + 0xa6], 0
mov byte [rsp + 0xa7], 0
mov byte [rsp + 0xa8], 0
mov byte [rsp + 0xa9], 0
mov byte [rsp + 0xaa], 0
mov byte [rsp + 0xab], 0
mov byte [rsp + 0xac], 0
mov byte [rsp + 0xad], 0
mov byte [rsp + 0xae], 0
mov byte [rsp + 0xaf], 0
mov byte [rsp + 0xb0], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x3c], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x60], 0
mov dword [rsp + 0x64], 0
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x6c], 0
cmp r15, qword [rsp + 0x148]
je 0x140004ca8
mov r15, rbx
jmp 0x140004450
mov r15, rbx
jmp 0x140004d30
mov r15, qword [rsp + 0x128]
jmp 0x140004d30
mov r14, qword [rsp + 0xc8]
jmp 0x140004cd8
mov rsi, qword [rsp + 0x28]
mov qword [rsp + 0xc8], r14
mov qword [rsp + 0xc0], 1
mov eax, r14d
and eax, 3
lea rcx, [rax - 2]
cmp rcx, 2
jb 0x140004d30
test rax, rax
je 0x140004d30
lea rbx, [r14 - 1]
mov rdi, qword [r14 - 1]
mov rsi, qword [r14 + 7]
mov rcx, rdi
call qword [rsi]
mov rdx, qword [rsi + 8]
test rdx, rdx
je 0x140004d13
mov r8, qword [rsi + 0x10]
mov rcx, rdi
call sym.__rust_dealloc
mov edx, 0x18
mov r8d, 8
mov rcx, rbx
call sym.__rust_dealloc
mov rsi, qword [rsp + 0x28]
nop dword [rax + rax]
imul r15, qword [rsp + 0x240]
mov rbx, qword [rsp + 0x140]
add rbx, r15
add rbx, 0x100000
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], 0
mov rcx, r12
call sym._ZN3std2io8buffered9bufwriter18BufWriter_LT_W_GT_9flush_buf17ha7c6d06aabcfe5f9E.llvm.15990873868500746682
mov rdi, rax
test rax, rax
jne 0x1400050bd
lea rcx, [rsp + 0xd0]
mov rdx, qword [rsp + 0x130]
lea r8, [rsp + 0x30]
call sym.__std::fs::File_as_std::io::Seek_::seek::h7e4899ac4dfde67a
cmp qword [rsp + 0xd0], 0
jne 0x1400050b5
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0xd0]
mov rdx, r13
lea r8, [rsp + 0x30]
call sym.__std::io::buffered::bufreader::BufReader_R__as_std::io::Seek_::seek::h9831fd239c7d1e49
cmp qword [rsp + 0xd0], 0
mov rcx, qword [rsp + 0x238]
je 0x140004434
mov rsi, qword [rsp + 0xd8]
mov qword [rsp + 0x30], rsi
mov rax, qword [str.1__]
movzx eax, byte [rax]
mov ecx, 8
mov edx, 8
call sym.__rust_alloc
test rax, rax
je 0x140005189
mov rbx, rax
mov qword [rax], rsi
lea rdi, sym.core::ptr::drop_in_place_std::io::error::Error_::h84854d6d06ccdfc3
mov rsi, qword [rsp + 0x28]
jmp 0x1400050f1
mov ebx, 1
lea rdi, sym.core::ptr::drop_in_place_crypto_common::InvalidLength_::h2b31d5f5e9d0aed8
jmp 0x1400050f1
mov qword [rsp + 0xd0], rdi
mov rax, qword [str.1__]
movzx eax, byte [rax]
mov ecx, 8
mov edx, 8
call sym.__rust_alloc
test rax, rax
je 0x140005167
mov rbx, rax
mov qword [rax], rdi
mov byte [rsp + 0x70], 0
mov byte [rsp + 0x71], 0
mov byte [rsp + 0x72], 0
mov byte [rsp + 0x73], 0
mov byte [rsp + 0x74], 0
mov byte [rsp + 0x75], 0
mov byte [rsp + 0x76], 0
mov byte [rsp + 0x77], 0
mov byte [rsp + 0x78], 0
mov byte [rsp + 0x79], 0
mov byte [rsp + 0x7a], 0
mov byte [rsp + 0x7b], 0
mov byte [rsp + 0x7c], 0
mov byte [rsp + 0x7d], 0
mov byte [rsp + 0x7e], 0
mov byte [rsp + 0x7f], 0
mov byte [rsp + 0x80], 0
mov byte [rsp + 0x81], 0
mov byte [rsp + 0x82], 0
mov byte [rsp + 0x83], 0
mov byte [rsp + 0x84], 0
mov byte [rsp + 0x85], 0
mov byte [rsp + 0x86], 0
mov byte [rsp + 0x87], 0
mov byte [rsp + 0x88], 0
mov byte [rsp + 0x89], 0
mov byte [rsp + 0x8a], 0
mov byte [rsp + 0x8b], 0
mov byte [rsp + 0x8c], 0
mov byte [rsp + 0x8d], 0
mov byte [rsp + 0x8e], 0
mov byte [rsp + 0x8f], 0
mov byte [rsp + 0x90], 0
mov byte [rsp + 0x91], 0
mov byte [rsp + 0x92], 0
mov byte [rsp + 0x93], 0
mov byte [rsp + 0x94], 0
mov byte [rsp + 0x95], 0
mov byte [rsp + 0x96], 0
mov byte [rsp + 0x97], 0
mov byte [rsp + 0x98], 0
mov byte [rsp + 0x99], 0
mov byte [rsp + 0x9a], 0
mov byte [rsp + 0x9b], 0
mov byte [rsp + 0x9c], 0
mov byte [rsp + 0x9d], 0
mov byte [rsp + 0x9e], 0
mov byte [rsp + 0x9f], 0
mov byte [rsp + 0xa0], 0
mov byte [rsp + 0xa1], 0
mov byte [rsp + 0xa2], 0
mov byte [rsp + 0xa3], 0
mov byte [rsp + 0xa4], 0
mov byte [rsp + 0xa5], 0
mov byte [rsp + 0xa6], 0
mov byte [rsp + 0xa7], 0
mov byte [rsp + 0xa8], 0
mov byte [rsp + 0xa9], 0
mov byte [rsp + 0xaa], 0
mov byte [rsp + 0xab], 0
mov byte [rsp + 0xac], 0
mov byte [rsp + 0xad], 0
mov byte [rsp + 0xae], 0
mov byte [rsp + 0xaf], 0
mov byte [rsp + 0xb0], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x3c], 0
mov dword [rsp + 0x40], 0
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x60], 0
mov dword [rsp + 0x64], 0
mov dword [rsp + 0x68], 0
mov dword [rsp + 0x6c], 0
jmp 0x1400050ea
xor ebx, ebx
jmp 0x1400050f1
mov rdi, qword [rsp + 0xd8]
mov qword [rsp + 0x30], rdi
mov rax, qword [str.1__]
movzx eax, byte [rax]
mov ecx, 8
mov edx, 8
call sym.__rust_alloc
test rax, rax
je 0x140005178
mov rbx, rax
mov qword [rax], rdi
lea rdi, sym.core::ptr::drop_in_place_std::io::error::Error_::h84854d6d06ccdfc3
mov edx, 0x100000
mov r8d, 1
mov rcx, rsi
call sym.__rust_dealloc
mov rax, rbx
mov rdx, rdi
movaps xmm6, xmmword [rsp + 0x180]
movaps xmm7, xmmword [rsp + 0x190]
movaps xmm8, xmmword [rsp + 0x1a0]
movaps xmm9, xmmword [rsp + 0x1b0]
add rsp, 0x1c8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, [0x1401ed9a8]
mov edx, 0x100000
mov rcx, r14
call dbg.slice_end_index_len_fail
jmp 0x140005198
mov ecx, 1
mov edx, 0x100000
call dbg.handle_alloc_error
ud2
mov ecx, 8
mov edx, 8
call dbg.handle_alloc_error
jmp 0x140005198
mov ecx, 8
mov edx, 8
call dbg.handle_alloc_error
jmp 0x140005198
mov ecx, 8
mov edx, 8
call dbg.handle_alloc_error
ud2