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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
mov eax, dword [rcx + 0xb8]
xor r15d, r15d
cmp r8d, eax
mov qword [rcx + 0x90], rdx
mov rbx, rcx
cmova r8d, eax
mov dword [rcx + 0x98], r8d
test r8d, r8d
je 0x140018356
lea r12, [0x1400faf40]
nop
cmp dword [rbx + 0x88], 0
jne 0x14001821f
mov eax, dword [rbx + 0xb4]
test eax, eax
je 0x14001821f
mov rdx, qword [rbx + 0x78]
mov edi, 0x4000
cmp eax, edi
mov rcx, rbx
cmovb edi, eax
mov r8d, edi
call fcn.140017630
test eax, eax
je 0x140018378
sub dword [rbx + 0xb4], edi
test byte [rbx + 0x4c], 1
mov rax, qword [rbx + 0x78]
mov qword [rbx + 0x80], rax
mov dword [rbx + 0x88], edi
je 0x14001821f
test edi, edi
je 0x14001821f
xor r8d, r8d
mov r9d, edi
nop dword [rax + rax]
mov edx, dword [rbx + 0xc4]
lea r8, [r8 + 1]
mov rcx, qword [rbx + 0x78]
and edx, 0xfffd
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor byte [rcx + r8 - 1], al
mov rax, qword [rbx + 0x78]
movsx rcx, byte [r8 + rax - 1]
mov eax, dword [rbx + 0xbc]
xor rcx, rax
movzx edx, cl
shr eax, 8
mov ecx, dword [r12 + 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 [r12 + rcx*4]
xor eax, edx
mov dword [rbx + 0xc4], eax
sub r9, 1
jne 0x140018190
mov r8d, dword [rbx + 0xc8]
mov r9d, dword [rbx + 0x88]
cmp r8d, r9d
cmova r8d, r9d
test r8d, r8d
je 0x140018276
mov rdx, qword [rbx + 0x80]
lea eax, [r8 - 1]
sub r9d, r8d
movzx r10d, byte [rax + rdx]
mov eax, r8d
add rax, rdx
mov dword [rbx + 0x88], r9d
sub dword [rbx + 0xc8], r8d
mov qword [rbx + 0x80], rax
jne 0x140018276
cmp r10b, byte [rbx + 0xcc]
jne 0x140018383
cmp word [rbx + 0x4e], 0
jne 0x1400182f3
mov eax, dword [rbx + 0x98]
mov ebp, dword [rbx + 0x88]
cmp eax, ebp
mov rdx, qword [rbx + 0x80]
mov rcx, qword [rbx + 0x90]
cmovb ebp, eax
mov r8d, ebp
mov esi, ebp
call fcn.1400c64d0
mov rdi, qword [rbx + 0x90]
mov r8d, ebp
mov ecx, dword [rbx + 0xb0]
mov rdx, rdi
call fcn.140017130
sub dword [rbx + 0xb8], ebp
sub dword [rbx + 0x88], ebp
sub dword [rbx + 0x98], ebp
add qword [rbx + 0x80], rsi
add dword [rbx + 0x9c], ebp
mov dword [rbx + 0xb0], eax
add r15d, ebp
lea rax, [rdi + rbp]
mov qword [rbx + 0x90], rax
jmp 0x140018340
mov ebp, dword [rbx + 0x9c]
lea rcx, [rbx + 0x80]
mov r14, qword [rbx + 0x90]
call fcn.140017260
mov esi, eax
cmp eax, 1
ja 0x14001838e
mov edi, dword [rbx + 0x9c]
mov rdx, r14
mov ecx, dword [rbx + 0xb0]
sub edi, ebp
mov r8d, edi
call fcn.140017130
sub dword [rbx + 0xb8], edi
add r15d, edi
mov dword [rbx + 0xb0], eax
cmp esi, 1
je 0x140018356
cmp dword [rbx + 0xb8], 0
je 0x140018356
cmp dword [rbx + 0x98], 0
jne 0x140018120
mov eax, r15d
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret
mov dword [rbx + 0x10], 7
xor eax, eax
jmp 0x140018359
mov dword [rbx + 0x10], reloc.OLEAUT32.dll_SafeArrayGetLBound
xor eax, eax
jmp 0x140018359
mov dword [rbx + 0x10], reloc.OLEAUT32.dll_SafeArrayGetUBound
xor eax, eax
jmp 0x140018359