Function at 0x140012150
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 0x14001218d
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 0x14001258a
movzx ebx, byte [rsp + 0x390]
mov r8, qword [rsp + 0x378]
mov rcx, qword [rsp + 0x370]
test r8, r8
je 0x140012272
mov rax, qword [rsp + 0x380]
cmp bl, 2
jne 0x140012292
cmp byte [rsp + 0x368], 0
je 0x140012437
mov rdx, qword [rsp + 0x360]
mov r10, rdx
shr r10, 0x31
and r10d, 0x7f
mov r11, rdx
shr r11, 0x23
and r11d, 0x1fe0
or r11, r10
shr rdx, 0x15
and edx, 0xf800
or rdx, r11
shl rdx, 0x10
mov r10d, 1
test rax, rax
je 0x140012445
mov r11d, 0x34567890
mov ebx, 0x23456789
mov edi, 0x12345678
xor r14d, r14d
lea r15, [0x1400bfb40]
nop dword [rax + rax]
movzx ebp, byte [r8 + r14]
xor bpl, dil
movzx r12d, bpl
shr edi, 8
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 0x140012230
jmp 0x140012455
mov dl, 3
cmp bl, 2
jne 0x1400124b5
mov rax, qword [rcx]
vmovups xmm0, xmmword [rcx + 8]
vmovaps xmmword [rsp + 0x60], xmm0
xor edx, edx
jmp 0x1400124f0
mov rdx, qword [rsp + 0x398]
movzx r9d, byte [rsp + 0x388]
movzx r9d, r9b
lea r10, [r9*4]
sub rdx, r10
add rdx, 0xffffffffffffffec
mov r10, qword [rcx + 0x10]
mov qword [rsp + 0x40], r10
vmovups xmm0, xmmword [rcx]
vmovaps xmmword [rsp + 0x30], xmm0
mov byte [rsp + 0x50], r9b
mov qword [rsp + 0x48], rdx
lea rcx, [rsp + 0x130]
lea rdx, [rsp + 0x30]
mov r9, rax
call fcn.140015440
movzx ecx, byte [rsp + 0x208]
mov rax, qword [rsp + 0x130]
cmp cl, 3
je 0x1400124a7
vmovups ymm0, ymmword [rsp + 0x1e8]
vmovups ymmword [rsp + 0x2c0], ymm0
vmovups ymm0, ymmword [rsp + 0x1d8]
vmovups ymmword [rsp + 0x2b0], ymm0
vmovups ymm0, ymmword [rsp + 0x1b8]
vmovups ymmword [rsp + 0x290], ymm0
vmovups ymm0, ymmword [rsp + 0x138]
vmovups ymm1, ymmword [rsp + 0x158]
vmovups ymm2, ymmword [rsp + 0x178]
vmovups ymm3, ymmword [rsp + 0x198]
vmovups ymmword [rsp + 0x270], ymm3
vmovups ymmword [rsp + 0x250], ymm2
vmovups ymmword [rsp + 0x230], ymm1
vmovups ymmword [rsp + 0x210], ymm0
mov edx, dword [rsp + 0x209]
mov dword [rsp + 0x28], edx
mov edx, dword [rsp + 0x20c]
mov dword [rsp + 0x2b], edx
mov dl, 3
cmp cl, 2
je 0x1400124b5
and bl, 1
vmovups ymm0, ymmword [rsp + 0x2c0]
vmovups ymmword [rsp + 0x110], ymm0
vmovups ymm0, ymmword [rsp + 0x2b0]
vmovups ymmword [rsp + 0x100], ymm0
vmovups ymm0, ymmword [rsp + 0x290]
vmovups ymmword [rsp + 0xe0], ymm0
vmovups ymm0, ymmword [rsp + 0x210]
vmovups ymm1, ymmword [rsp + 0x230]
vmovups ymm2, ymmword [rsp + 0x250]
vmovups ymm3, ymmword [rsp + 0x270]
vmovups ymmword [rsp + 0xc0], ymm3
vmovups ymmword [rsp + 0xa0], ymm2
vmovups ymmword [rsp + 0x80], ymm1
vmovups ymmword [rsp + 0x60], ymm0
mov edx, dword [rsp + 0x28]
mov r8d, dword [rsp + 0x2b]
mov dword [rsp + 0x20], edx
mov dword [rsp + 0x23], r8d
mov dl, 2
jmp 0x1400124f0
xor r10d, r10d
xor edx, edx
test rax, rax
jne 0x140012211
mov edi, 0x12345678
mov ebx, 0x23456789
mov r11d, 0x34567890
mov rax, qword [rcx + 0x10]
mov qword [rsp + 0x40], rax
vmovups xmm0, xmmword [rcx]
vmovaps 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 + 0x130]
lea rdx, [rsp + 0x30]
mov r8, r10
call fcn.140015130
cmp qword [rsp + 0x130], 0
je 0x1400124bc
mov rax, qword [rsp + 0x138]
mov qword [rsi + 8], 0
mov qword [rsi + 0x10], rax
mov dl, 4
mov byte [rsi], dl
jmp 0x14001258a
mov rax, qword [rsp + 0x138]
vmovups ymm0, ymmword [rsp + 0x140]
vmovups ymmword [rsp + 0x2e0], ymm0
test rax, rax
je 0x1400125a2
vmovups ymm0, ymmword [rsp + 0x2e0]
vmovups ymmword [rsp + 0x60], ymm0
mov dl, 1
vmovups ymm0, ymmword [rsp + 0x110]
vmovups ymmword [rsi + 0xc0], ymm0
vmovups ymm0, ymmword [rsp + 0x100]
vmovups ymmword [rsi + 0xb0], ymm0
vmovups ymm0, ymmword [rsp + 0xe0]
vmovups ymmword [rsi + 0x90], ymm0
vmovups xmm0, xmmword [rsp + 0x60]
vmovups xmm1, xmmword [rsp + 0x70]
vmovups ymm2, ymmword [rsp + 0x80]
vmovups ymm3, ymmword [rsp + 0xa0]
vmovups ymm4, ymmword [rsp + 0xc0]
vmovups ymmword [rsi + 0x70], ymm4
vmovups ymmword [rsi + 0x50], ymm3
vmovups ymmword [rsi + 0x30], ymm2
vmovups xmmword [rsi + 0x10], xmm0
vmovups xmmword [rsi + 0x20], xmm1
mov r8d, dword [rsp + 0x20]
mov r9d, dword [rsp + 0x23]
mov dword [rsi + 0xe1], r8d
mov dword [rsi + 0xe4], r9d
mov byte [rsi], dl
mov byte [rsi + 1], bl
mov qword [rsi + 8], rax
mov byte [rsi + 0xe0], cl
mov rax, rsi
add rsp, 0x300
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
vzeroupper
ret
mov dl, 3
mov byte [rsi], dl
jmp 0x14001258a