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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x40
mov rax, qword [0x180014060]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov rdi, qword [rsp + 0xa0]
mov rbx, r9
mov r15, rdx
mov r14, rcx
cmp r8d, 0xc
jge 0x180008334
xor eax, eax
jmp 0x180008554
mov eax, dword [0x1800140a0]
inc eax
mov dword [0x1800140a0], eax
cmp eax, 1
jne 0x18000835c
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
xor eax, 0xbb40e64e
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov r8, rdi
mov rdx, rbx
mov rcx, r14
call fcn.180008570
xor esi, esi
mov r12d, 0xfffd
mov ebp, esi
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov r8d, dword [rbx + 8]
mov r9d, r8d
mov ecx, dword [rbx]
and r9d, r12d
sar eax, 7
or r9d, 2
movzx r10d, al
mov eax, r10d
xor rcx, rax
movzx eax, cl
mov ecx, dword [rbx]
shr ecx, 8
mov edx, dword [rdi + rax*4]
xor edx, ecx
movzx eax, dl
add eax, dword [rbx + 4]
imul ecx, eax, 0x8088405
mov dword [rbx], edx
inc ecx
mov dword [rbx + 4], ecx
shr rcx, 0x18
xor rcx, r8
shr r8d, 8
movzx eax, cl
mov eax, dword [rdi + rax*4]
xor eax, r8d
mov dword [rbx + 8], eax
mov eax, r9d
xor eax, 1
imul eax, r9d
shr eax, 8
xor al, r10b
mov byte [rsp + rbp + 0x20], al
inc rbp
cmp rbp, 0xa
jl 0x180008374
mov r8, rdi
mov rdx, rbx
mov rcx, r14
call fcn.180008570
lea rax, [rsp + 0x20]
mov r14, r15
sub r14, rax
mov r8d, dword [rbx + 8]
lea r11, [rsp + 0x20]
mov eax, dword [rbx]
add r11, rsi
mov r10d, r8d
inc rsi
and r10d, r12d
or r10d, 2
movzx r9d, byte [r11]
mov ecx, r9d
xor rcx, rax
movzx eax, cl
mov ecx, dword [rbx]
shr ecx, 8
mov edx, dword [rdi + rax*4]
xor edx, ecx
movzx eax, dl
add eax, dword [rbx + 4]
imul ecx, eax, 0x8088405
mov dword [rbx], edx
inc ecx
mov dword [rbx + 4], ecx
shr rcx, 0x18
xor rcx, r8
shr r8d, 8
movzx eax, cl
mov eax, dword [rdi + rax*4]
xor eax, r8d
mov dword [rbx + 8], eax
mov eax, r10d
xor eax, 1
imul eax, r10d
shr eax, 8
xor al, r9b
mov byte [r14 + r11], al
cmp rsi, 0xa
jl 0x180008404
mov r9d, dword [rbx + 8]
mov r10d, r9d
mov eax, dword [rbx]
and r10d, r12d
mov r11d, dword [rsp + 0xa8]
or r10d, 2
mov r8d, r11d
shr r11d, 0x18
shr r8d, 0x10
mov ecx, r8d
xor rcx, rax
movzx eax, cl
mov ecx, dword [rbx]
shr ecx, 8
mov edx, dword [rdi + rax*4]
xor edx, ecx
mov dword [rbx], edx
movzx eax, dl
add eax, dword [rbx + 4]
imul ecx, eax, 0x8088405
inc ecx
mov dword [rbx + 4], ecx
shr rcx, 0x18
xor rcx, r9
shr r9d, 8
movzx eax, cl
mov ecx, r11d
mov eax, dword [rdi + rax*4]
xor eax, r9d
mov dword [rbx + 8], eax
mov eax, r10d
xor eax, 1
imul eax, r10d
shr eax, 8
xor al, r8b
mov byte [r15 + 0xa], al
mov r8d, dword [rbx + 8]
mov r10d, r8d
mov eax, dword [rbx]
and r10d, r12d
xor rcx, rax
or r10d, 2
movzx eax, cl
mov ecx, dword [rbx]
shr ecx, 8
mov edx, dword [rdi + rax*4]
xor edx, ecx
mov dword [rbx], edx
movzx eax, dl
add eax, dword [rbx + 4]
imul ecx, eax, 0x8088405
mov eax, 0xc
inc ecx
mov dword [rbx + 4], ecx
shr rcx, 0x18
xor rcx, r8
shr r8d, 8
movzx ecx, cl
mov ecx, dword [rdi + rcx*4]
xor ecx, r8d
mov dword [rbx + 8], ecx
mov ecx, r10d
xor ecx, 1
imul ecx, r10d
shr ecx, 8
xor cl, r11b
mov byte [r15 + 0xb], cl
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.18000be20
add rsp, 0x40
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret