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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x20
mov rsi, rdx
mov rbx, rcx
xor edx, edx
add rcx, 0x78
lea r8d, [rdx + 0x58]
call fcn.1400c7510
mov edx, 0x4000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov qword [rbx + 0x78], rax
test rax, rax
je 0x1400180a8
cmp word [rbx + 0x4e], 0
je 0x140017f0d
mov edx, 0x78
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov qword [rbx + 0xa8], rax
test rax, rax
je 0x1400180a8
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x78]
call fcn.1400c7510
mov rax, qword [rbx + 0xa8]
mov edx, 0x2d00
xor ecx, ecx
mov dword [rax + 8], reloc.OLEAUT32.dll_SafeArrayDestroy
mov rax, qword [rbx + 0xa8]
mov byte [rax + 0x70], 7
mov rax, qword [rbx + 0xa8]
mov byte [rax + 0x6c], 0
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, qword [rbx + 0xa8]
mov qword [rcx + 0x40], rax
test rax, rax
je 0x1400180a8
mov edx, 0x8000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, qword [rbx + 0xa8]
mov qword [rcx + 0x48], rax
test rax, rax
je 0x1400180a8
mov rcx, qword [rbx + 0xa8]
mov rax, qword [rcx + 0x48]
add rax, 0x8000
mov qword [rcx + 0x50], rax
mov rcx, qword [rbx + 0xa8]
mov rax, qword [rcx + 0x48]
mov qword [rcx + 0x60], rax
mov rcx, qword [rbx + 0xa8]
mov rax, qword [rcx + 0x60]
mov qword [rcx + 0x58], rax
mov ecx, dword [rbx]
test cl, 8
je 0x140017f20
mov eax, dword [rsi + 0x28]
mov dword [rbx + 0x58], eax
mov eax, dword [rsi + 0x30]
mov dword [rbx + 0x5c], eax
mov eax, dword [rbx + 0x58]
movzx edx, word [rbx + 0x4c]
mov dword [rbx + 0xb4], eax
mov eax, dword [rbx + 0x5c]
mov dword [rbx + 0xb8], eax
test dl, 8
je 0x140017f41
movzx eax, byte [rbx + 0x51]
jmp 0x140017f45
movzx eax, byte [rbx + 0x57]
mov byte [rbx + 0xcc], al
test cl, 4
je 0x140017f58
mov ecx, dword [rbx + 0x6e]
jmp 0x140018066
test dl, 1
je 0x140018007
mov dword [rbx + reloc.OLEAUT32.dll_VariantTimeToDosDateTime8], 0xc
mov dword [rbx + 0xbc], 0x12345678
mov dword [rbx + 0xc0], 0x23456789
mov dword [rbx + 0xc4], 0x34567890
mov r8, qword [rbx + 0x38]
test r8, r8
je 0x140018007
movzx eax, byte [r8]
test al, al
je 0x140018007
lea r9, [0x1400faf40]
mov ecx, dword [rbx + 0xbc]
lea r8, [r8 + 1]
xor rcx, rax
mov eax, dword [rbx + 0xbc]
shr eax, 8
movzx edx, cl
mov ecx, dword [r9 + rdx*4]
mov edx, dword [rbx + 0xc4]
xor ecx, eax
movzx eax, cl
add eax, dword [rbx + 0xc0]
mov dword [rbx + 0xbc], ecx
imul ecx, eax, 0x8088405
inc ecx
mov dword [rbx + 0xc0], ecx
movzx eax, byte [rbx + 0xc3]
movzx ecx, dl
xor rcx, rax
shr edx, 8
mov eax, dword [r9 + rcx*4]
xor eax, edx
mov dword [rbx + 0xc4], eax
movzx eax, byte [r8]
test al, al
jne 0x140017fa1
mov edx, dword [rbx + 0x6e]
add edx, 0x1c
add edx, dword [rbx + 0x28]
test byte [rbx], 1
jne 0x140018039
add edx, dword [rbx + 0x14]
xor r9d, r9d
mov rcx, qword [rbx + 8]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x14001803c
mov dword [rbx + 0x10], 7
jmp 0x1400180af
mov dword [rbx + 0x1c], edx
mov r8d, 2
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140017630
test eax, eax
je 0x14001802d
movzx eax, word [rsp + 0x30]
movzx ecx, word [rbx + 0x60]
add ecx, eax
mov eax, dword [rbx + 0x6e]
add eax, 0x1e
add ecx, eax
test byte [rbx], 1
jne 0x140018095
mov edx, dword [rbx + 0x14]
xor r9d, r9d
add edx, ecx
xor r8d, r8d
mov rcx, qword [rbx + 8]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x14001802d
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0x1c], ecx
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
ret
mov dword [rbx + 0x10], 2
mov rcx, rbx
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
add rsp, 0x20
pop rdi
jmp fcn.140017d90