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

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x300
mov rsi, rcx
cmp dx, 5
jne 0x14002335d
mov qword [rsi + 8], 2
lea rax, str.Compression_method_not_supported
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], 0x20
mov byte [rsi], 4
jmp 0x140023659
movzx ebx, byte [rsp + 0x390]
mov r8, qword [rsp + 0x378]
mov rcx, qword [rsp + 0x370]
test r8, r8
je 0x140023442
mov rax, qword [rsp + 0x380]
cmp bl, 2
jne 0x140023461
cmp byte [rsp + 0x368], 0
je 0x1400234ea
mov rdx, qword [rsp + 0x360]
mov r10, rdx
shr r10, 0x31
and r10d, 0x7f
mov r11, rdx
shr r11, 0x23
and r11d, 0x1fe0
or r11d, r10d
shr rdx, 0x15
and edx, 0xf800
or edx, r11d
shl edx, 0x10
mov r10d, 1
test rax, rax
je 0x1400234f8
mov r11d, 0x34567890
mov ebx, 0x23456789
mov edi, 0x12345678
xor r14d, r14d
lea r15, [0x1402445d8]
nop word [rax + rax]
movzx ebp, byte [r8 + r14]
xor bpl, dil
shr edi, 8
movzx r12d, bpl
xor edi, dword [r15 + r12*4]
movzx ebp, dil
add ebp, ebx
imul ebx, ebp, 0x8088405
inc ebx
mov ebp, ebx
shr ebp, 0x18
movzx r12d, r11b
xor r12d, ebp
shr r11d, 8
xor r11d, dword [r15 + r12*4]
inc r14
cmp rax, r14
jne 0x140023400
jmp 0x140023508
cmp bl, 2
jne 0x1400234e2
mov rdi, qword [rcx]
movups xmm0, xmmword [rcx + 8]
movaps xmmword [rsp + 0x160], xmm0
xor eax, eax
jmp 0x14002361e
mov rdx, qword [rsp + 0x398]
movzx r9d, byte [rsp + 0x388]
movzx r9d, r9b
lea r10d, [r9*4]
sub rdx, r10
add rdx, 0xffffffffffffffec
mov r10, qword [rcx + 0x10]
mov qword [rsp + 0x40], r10
movups xmm0, xmmword [rcx]
movaps xmmword [rsp + 0x30], xmm0
mov byte [rsp + 0x50], r9b
mov qword [rsp + 0x48], rdx
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x30]
mov r9, rax
call fcn.1400260d0
movzx ebp, byte [rsp + 0x158]
mov rdi, qword [rsp + 0x80]
cmp bpl, 3
jne 0x14002356d
mov qword [rsi + 8], 0
mov qword [rsi + 0x10], rdi
mov al, 4
jmp 0x1400235a6
mov byte [rsi], 3
jmp 0x140023659
xor r10d, r10d
xor edx, edx
test rax, rax
jne 0x1400233e0
mov edi, 0x12345678
mov ebx, 0x23456789
mov r11d, 0x34567890
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0x40], rax
movups xmm0, xmmword [rcx]
movaps xmmword [rsp + 0x30], xmm0
mov dword [rsp + 0x48], edi
mov dword [rsp + 0x4c], ebx
mov dword [rsp + 0x50], r11d
shl r9, 0x20
or r10, r9
or r10, rdx
lea rcx, [rsp + 0x80]
lea rdx, [rsp + 0x30]
mov r8, r10
call fcn.140024c20
cmp qword [rsp + 0x80], 0
mov rdi, qword [rsp + 0x88]
je 0x1400235ad
mov qword [rsi + 8], 0
mov qword [rsi + 0x10], rdi
mov al, 4
mov byte [rsi], al
jmp 0x140023659
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x230]
mov r8d, 0xd0
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x159]
mov ecx, dword [rsp + 0x15c]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x2b], ecx
mov al, 3
cmp bpl, 2
jne 0x1400235ee
mov byte [rsi], al
jmp 0x140023659
movups xmm0, xmmword [rsp + 0x90]
movups xmm1, xmmword [rsp + 0xa0]
movaps xmmword [rsp + 0x70], xmm1
movaps xmmword [rsp + 0x60], xmm0
test rdi, rdi
je 0x14002366e
movaps xmm0, xmmword [rsp + 0x60]
movaps xmm1, xmmword [rsp + 0x70]
movaps xmmword [rsp + 0x170], xmm1
movaps xmmword [rsp + 0x160], xmm0
mov al, 1
jmp 0x14002361e
and bl, 1
lea rcx, [rsp + 0x160]
lea rdx, [rsp + 0x230]
mov r8d, 0xd0
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x28]
mov ecx, dword [rsp + 0x2b]
mov dword [rsp + 0x20], eax
mov dword [rsp + 0x23], ecx
mov al, 2
mov byte [rsi], al
mov byte [rsi + 1], bl
mov qword [rsi + 8], rdi
lea rcx, [rsi + 0x10]
lea rdx, [rsp + 0x160]
mov r8d, 0xd0
call sub.VCRUNTIME140.dll_memcpy
mov byte [rsi + 0xe0], bpl
mov eax, dword [rsp + 0x20]
mov ecx, dword [rsp + 0x23]
mov dword [rsi + 0xe1], eax
mov dword [rsi + 0xe4], ecx
mov rax, rsi
add rsp, 0x300
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov al, 3
mov byte [rsi], al
jmp 0x140023659