Function at 0x1400d149b
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc8
mov r15, r9
mov r14, r8
mov rsi, rdx
mov rdi, rcx
movzx eax, byte [rdx]
test rax, rax
je 0x1400d156e
cmp eax, 1
jne 0x1400d1596
lea rdx, [rsi + 8]
mov rcx, rdi
stc
mov r9, qword [rsi + 0x30]
test r9, r9
je 0x1400d15d8
lea r12, [rsi + 8]
cmp r9, r15
cmovae r9, r15
lea rbx, [rsp + 0x30]
mov rcx, rbx
mov rdx, r12
mov r8, r14
call fcn.1400d133a
cmp qword [rbx], 0
je 0x1400d15e3
mov rax, qword [rsp + 0x38]
mov qword [rdi + 8], rax
mov qword [rdi], 1
jmp 0x1400d16de
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
jmp 0x1400d16de
mov rbx, qword [rsp + 0x38]
sub qword [rsi + 0x30], rbx
cmp rbx, r15
ja 0x1400d18b4
lea r13, [rsi + 0x98]
mov cl, byte [rsi + 0xd8]
movzx r15d, cl
mov eax, 0x40
sub rax, r15
mov rbp, rbx
sub rbp, rax
jae 0x1400d162d
lea rcx, [r15 + r13]
mov rdx, r14
mov r8, rbx
call fcn.1400fc250
add r15, rbx
jmp 0x1400d16b4
mov qword [rsp + 0x20], r13
mov r8, rbx
mov rdx, r14
test cl, cl
je 0x1400d1679
lea rcx, [r14 + rax]
mov qword [rsp + 0x28], rcx
mov r13, qword [rsp + 0x20]
add r15, r13
mov rcx, r15
mov rdx, r14
mov r8, rax
call fcn.1400fc250
inc qword [rsi + 0x38]
lea rcx, [rsi + 0x40]
mov r8d, 1
mov rdx, r13
call fcn.1400a2281
mov rdx, qword [rsp + 0x28]
mov r8, rbp
mov rbp, r8
and rbp, 0xffffffffffffffc0
mov r15d, r8d
and r15d, 0x3f
add rbp, rdx
cmp r8, 0x40
jb 0x1400d16a1
shr r8, 6
add qword [rsi + 0x38], r8
lea rcx, [rsi + 0x40]
call fcn.1400a2281
mov r13, qword [rsp + 0x20]
mov rcx, r13
mov rdx, rbp
mov r8, r15
call fcn.1400fc250
mov byte [rsi + 0xd8], r15b
mov rcx, qword [rsi + 0x20]
mov rax, qword [rsi + 0x28]
mov rdx, r14
mov r8, rbx
call qword [rax + 0x18]
cmp qword [rsi + 0x30], 0
je 0x1400d16f2
mov qword [rdi + 8], rbx
mov qword [rdi], 0
mov qword [rsp + 0x20], r13
cmp byte [rsi + 0xe0], 0
jne 0x1400d18c6
lea rax, [rsi + 0x38]
mov qword [rsp + 0x28], rax
mov byte [rsi + 0xe0], 1
lea r13, [rsp + 0x60]
mov word [r13 + 8], 0
mov qword [r13], 0
mov ebp, 0xa
lea r15, [rsp + 0x30]
lea r14, [0x1401574ac]
mov rcx, r15
mov rdx, r12
mov r8, r13
mov r9, rbp
call fcn.1400d133a
cmp qword [rsp + 0x30], 0
je case.default.0x1400d1763
mov rax, qword [rsp + 0x38]
mov ecx, eax
and ecx, 3
movsxd rcx, dword [r14 + rcx*4]
add rcx, r14
jmp rcx
cmp byte [rax + 0x10], 0x23
je 0x1400d17ad
jmp 0x1400d15c8
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400d1899
mov rax, rbp
sub rax, rcx
jb 0x1400d18a5
add r13, rcx
mov rbp, rax
jmp 0x1400d17b7
lea rcx, [rsp + 0x38]
call fcn.1400d1102
test rbp, rbp
jne 0x1400d1739
xor eax, eax
lea r14, [rsp + 0x90]
mov dword [r14 + 0x10], eax
xorps xmm0, xmm0
movaps xmmword [r14], xmm0
lea r15, [rsp + 0xb0]
mov dword [r15 + 0x10], eax
movaps xmmword [r15], xmm0
mov rcx, qword [rsp + 0x28]
mov r12, qword [rsp + 0x20]
mov rdx, r12
mov r8, r15
call fcn.1400d1261
mov eax, dword [rsi + 0x70]
lea rcx, [rsp + 0x30]
mov dword [rcx + 0x18], eax
movups xmm0, xmmword [rsi + 0x60]
movups xmmword [rcx + 8], xmm0
mov rax, qword [rsi + 0x58]
mov qword [rcx], rax
mov eax, dword [r15 + 0x10]
mov dword [r12 + 0x10], eax
movaps xmm0, xmmword [r15]
movups xmmword [r12], xmm0
mov byte [rsi + 0xd8], 0x14
mov rdx, r12
mov r8, r14
call fcn.1400d1261
mov eax, dword [rsi + 0x90]
mov dword [rsi + 0x50], eax
movups xmm0, xmmword [rsi + 0x80]
movups xmmword [rsi + 0x40], xmm0
mov rax, qword [rsi + 0x78]
mov qword [rsi + 0x38], rax
mov byte [rsi + 0xd8], 0
mov eax, dword [r14 + 0x10]
lea rcx, [rsp + 0x70]
mov dword [rcx + 0x10], eax
movaps xmm0, xmmword [r14]
movaps xmmword [rcx], xmm0
lea rdx, [rsp + 0x60]
call fcn.140004151
test al, al
je 0x1400d16d3
lea rdx, str.Invalid_authentication_code__this_could_be_due_to_an_invalid_password_or_errors_in_the_dataTried_to_use_an_already_finalized_HMAC._This_is_a_bug_
mov r8d, 0x5b
mov cl, 0x15
call fcn.14000afd2
jmp 0x1400d15c8
lea rax, str.failed_to_fill_whole_buffer
jmp 0x1400d15c8
lea r8, [0x140153058]
mov rdx, rbp
call fcn.1400ff5c0
lea r8, str.C:Usersigame.cargo_registry_srcindex.crates.io_6f17d22bba15001fzip_0.6.6_src_aes.rs__
mov rcx, rbx
mov rdx, r15
call fcn.1400ff6c0
lea rax, [0x140152a28]
lea rcx, [rsp + 0x30]
mov qword [rcx], rax
mov qword [rcx + 8], 1
lea rax, str.called__Result::unwrap____on_an__Err__value
mov qword [rcx + 0x10], rax
xorps xmm0, xmm0
movups xmmword [rcx + 0x18], xmm0
lea rdx, str.C:Usersigame.cargo_registry_srcindex.crates.io_6f17d22bba15001fzip_0.6.6_src_aes.rs__
call fcn.1400ff580
int3