Function at 0x140094170
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
cmp r8, 0xc
jl 0x140094414
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x30
mov rdi, rdx
mov rbx, r8
lea rdx, [rbp - 0x10]
mov r8, r9
mov qword [rsp + 0x50], r12
mov rsi, rcx
mov qword [rsp + 0x58], r13
call fcn.140094060
mov r12, qword [rsi + 8]
mov r10d, dword [rbp - 8]
mov r9d, dword [rbp - 0xc]
mov r11d, dword [rbp - 0x10]
mov r13d, 3
sub rbx, 0xc
nop word [rax + rax]
movzx eax, word [rbp - 8]
shr r10d, 8
shr r11d, 8
or ax, 2
movzx ecx, ax
mov eax, ecx
xor eax, 1
imul eax, ecx
sar eax, 8
movzx ecx, al
movzx eax, byte [rdi]
xor rcx, rax
movzx eax, byte [rbp - 0x10]
xor rcx, rax
mov edx, dword [r12 + rcx*4]
xor edx, r11d
movzx r8d, dl
mov dword [rbp - 0x10], edx
add r8d, r9d
imul r8d, r8d, 0x8088405
inc r8d
mov eax, r8d
mov dword [rbp - 0xc], r8d
shr eax, 0x18
xor rax, qword [rbp - 8]
movzx eax, al
mov r9d, dword [r12 + rax*4]
xor r9d, r10d
movzx eax, r9w
mov dword [rbp - 8], r9d
shr r9d, 8
or ax, 2
movzx ecx, ax
mov eax, ecx
xor eax, 1
imul eax, ecx
sar eax, 8
movzx ecx, al
movzx eax, byte [rdi + 1]
xor rcx, rax
movzx eax, dl
shr edx, 8
xor rcx, rax
mov r10d, dword [r12 + rcx*4]
xor r10d, edx
movzx edx, r10b
mov dword [rbp - 0x10], r10d
add edx, r8d
imul edx, edx, 0x8088405
inc edx
mov eax, edx
mov dword [rbp - 0xc], edx
shr eax, 0x18
xor rax, qword [rbp - 8]
movzx eax, al
mov r8d, dword [r12 + rax*4]
xor r8d, r9d
movzx eax, r8w
mov dword [rbp - 8], r8d
or ax, 2
movzx ecx, ax
mov eax, ecx
xor eax, 1
imul eax, ecx
sar eax, 8
movzx ecx, al
movzx eax, byte [rdi + 2]
xor rcx, rax
movzx eax, r10b
shr r10d, 8
xor rcx, rax
mov r9d, dword [r12 + rcx*4]
xor r9d, r10d
movzx r10d, r9b
mov dword [rbp - 0x10], r9d
add r10d, edx
imul r10d, r10d, 0x8088405
inc r10d
mov eax, r10d
mov dword [rbp - 0xc], r10d
shr eax, 0x18
xor rax, qword [rbp - 8]
shr r8d, 8
add rdi, 4
movzx eax, al
mov edx, dword [r12 + rax*4]
xor edx, r8d
movzx eax, dx
mov dword [rbp - 8], edx
shr edx, 8
or ax, 2
movzx ecx, ax
mov eax, ecx
xor eax, 1
imul eax, ecx
sar eax, 8
movzx ecx, al
movzx eax, byte [rdi - 1]
xor rcx, rax
movzx eax, r9b
shr r9d, 8
xor rcx, rax
mov r11d, dword [r12 + rcx*4]
xor r11d, r9d
movzx r9d, r11b
mov dword [rbp - 0x10], r11d
add r9d, r10d
imul r9d, r9d, 0x8088405
inc r9d
mov eax, r9d
mov dword [rbp - 0xc], r9d
shr eax, 0x18
xor rax, qword [rbp - 8]
movzx eax, al
mov r10d, dword [r12 + rax*4]
xor r10d, edx
dec r13
mov dword [rbp - 8], r10d
jne 0x1400941d0
mov r13, qword [rsp + 0x58]
mov r12, qword [rsp + 0x50]
test rbx, rbx
jle 0x140094408
movzx eax, word [rbp - 8]
mov rdx, qword [rsi + 8]
dec rbx
or ax, 2
inc rdi
movzx ecx, ax
mov r8d, ecx
xor r8d, 1
imul r8d, ecx
mov rcx, qword [rbp - 0x10]
sar r8d, 8
xor r8b, byte [rdi - 1]
movzx eax, r8b
xor rcx, rax
movzx eax, cl
mov ecx, r11d
mov r11d, dword [rdx + rax*4]
shr ecx, 8
xor r11d, ecx
mov ecx, r10d
movzx eax, r11b
shr ecx, 8
mov dword [rbp - 0x10], r11d
add r9d, eax
imul r9d, r9d, 0x8088405
inc r9d
mov eax, r9d
mov dword [rbp - 0xc], r9d
shr eax, 0x18
xor rax, qword [rbp - 8]
movzx eax, al
mov r10d, dword [rdx + rax*4]
mov byte [rdi - 0xd], r8b
xor r10d, ecx
mov dword [rbp - 8], r10d
test rbx, rbx
jg 0x140094381
mov rbx, qword [rsp + 0x60]
add rsp, 0x30
pop rdi
pop rsi
pop rbp
repz ret