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

Disassembly:
push rbx
push rbp
push r14
push r15
sub rsp, 0x58
mov rax, qword [0x140016040]
xor rax, rsp
mov qword [rsp + 0x40], rax
mov ebp, r9d
mov r14, r8
mov r15, rdx
mov rbx, rcx
test rcx, rcx
je 0x140008d3a
cmp qword [rcx + 0x90], 0
je 0x140008d3a
cmp qword [rcx + 0x110], 0
je 0x14000875c
call fcn.1400083f0
lea r9, [rsp + 0x20]
mov rcx, rbx
lea r8, [rsp + 0x28]
lea rdx, [rsp + 0x24]
call fcn.140006fb0
test eax, eax
je 0x14000877e
mov eax, 0xffffff99
jmp 0x1400087e8
mov qword [rsp + 0x98], rsi
mov ecx, 0x120
mov qword [rsp + 0x50], rdi
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rdi, rax
test rax, rax
je 0x1400087d6
mov ecx, 0x4000
call sub.api_ms_win_crt_heap_l1_1_0.dll_malloc
mov rcx, qword [rsp + 0x28]
xor esi, esi
mov qword [rdi + 0x70], rcx
mov ecx, dword [rsp + 0x20]
mov dword [rdi + 0x78], ecx
mov qword [rdi], rax
mov qword [rdi + 0x80], rsi
mov dword [rdi + 0x118], ebp
test rax, rax
jne 0x140008800
mov rcx, rdi
call fcn.14000cb6b
mov eax, 0xffffff98
mov rsi, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x40]
xor rcx, rsp
call fcn.140006210
add rsp, 0x58
pop r15
pop r14
pop rbp
pop rbx
ret
mov dword [rdi + 0x68], esi
test r15, r15
je 0x140008811
mov eax, dword [rbx + 0xbc]
mov dword [r15], eax
test r14, r14
je 0x14000884e
mov dword [r14], 6
mov eax, dword [rbx + 0xb8]
and eax, 6
cmp eax, 2
je 0x140008847
cmp eax, 4
je 0x14000883e
cmp eax, 6
jne 0x14000884e
mov dword [r14], 1
jmp 0x14000884e
mov dword [r14], 2
jmp 0x14000884e
mov dword [r14], 9
mov eax, dword [rbx + 0xc4]
mov dword [rdi + 0x94], eax
mov dword [rdi + 0x90], esi
mov qword [rdi + 0x88], rsi
mov eax, dword [rbx + 0xbc]
mov dword [rdi + 0x108], eax
mov rax, qword [rbx + 0x60]
mov qword [rdi + 0x100], rax
movups xmm0, xmmword [rbx]
movups xmmword [rdi + 0xa8], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rdi + 0xb8], xmm1
movups xmm0, xmmword [rbx + 0x20]
movups xmmword [rdi + 0xc8], xmm0
movups xmm1, xmmword [rbx + 0x30]
movups xmmword [rdi + 0xd8], xmm1
movups xmm0, xmmword [rbx + 0x40]
movups xmmword [rdi + 0xe8], xmm0
movsd xmm1, qword [rbx + 0x50]
movsd qword [rdi + 0xf8], xmm1
mov rax, qword [rbx + 0x78]
mov qword [rdi + 0x110], rax
mov dword [rdi + 0x24], esi
mov eax, dword [rbx + 0xbc]
cmp eax, 0xc
jne 0x140008cd7
test ebp, ebp
jne 0x1400088ec
mov dword [rdi + 0x118], 1
mov rax, qword [rbx + 0xc8]
mov ecx, dword [rsp + 0x24]
mov qword [rdi + 0x98], rax
add rcx, 0x1e
mov rax, qword [rbx + 0xd0]
mov qword [rdi + 0xa0], rax
add rcx, qword [rbx + 0x108]
mov qword [rdi + 0x60], rcx
mov dword [rdi + 0x10], esi
mov qword [rbx + 0x110], rdi
mov rdi, qword [rsp + 0xa0]
mov dword [rbx + 0x118], esi
test rdi, rdi
je 0x140008cd0
call fcn.14000bc70
mov qword [rbx + 0x130], rax
mov edx, 0x12345678
mov r9d, 0x23456789
mov dword [rbx + 0x120], edx
mov r8d, 0x34567890
mov dword [rbx + 0x124], r9d
mov dword [rbx + 0x128], r8d
mov r10, rax
movzx eax, byte [rdi]
test al, al
je 0x1400089d6
nop word [rax + rax]
mov ecx, edx
lea rdi, [rdi + 1]
xor rcx, rax
shr edx, 8
movzx eax, cl
xor edx, dword [r10 + rax*4]
movzx eax, dl
add eax, r9d
mov dword [rbx + 0x120], edx
imul r9d, eax, 0x8088405
mov eax, r8d
shr r8d, 8
inc r9d
mov dword [rbx + 0x124], r9d
mov ecx, r9d
shr rcx, 0x18
xor rcx, rax
movzx eax, cl
xor r8d, dword [r10 + rax*4]
mov dword [rbx + 0x128], r8d
movzx eax, byte [rdi]
test al, al
jne 0x140008980
mov rax, qword [rbx + 0x110]
xor r9d, r9d
mov rdx, qword [rbx + 0x60]
mov rcx, rbx
mov r8, qword [rax + 0x110]
add r8, qword [rax + 0x60]
call fcn.1400098f0
test eax, eax
jne 0x1400087d6
mov rdx, qword [rbx + 0x60]
lea r9d, [rax + 0xc]
mov rcx, qword [rbx + 0x38]
lea r8, [rsp + 0x30]
call qword [rbx + 8]
cmp eax, 0xc
jb 0x1400087d6
mov r11, qword [rbx + 0x130]
mov edx, dword [rbx + 0x120]
mov r8d, dword [rbx + 0x128]
mov ecx, dword [rbx + 0x128]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, edx
shr edx, 8
shr eax, 8
xor byte [rsp + rsi + 0x30], al
movsx rax, byte [rsp + rsi + 0x30]
xor rcx, rax
movzx eax, cl
xor edx, dword [r11 + rax*4]
mov dword [rbx + 0x120], edx
mov r9d, edx
movzx eax, dl
add eax, dword [rbx + 0x124]
imul edx, eax, 0x8088405
inc edx
mov dword [rbx + 0x124], edx
mov eax, edx
shr rax, 0x18
xor rax, r8
shr r8d, 8
movzx eax, al
xor r8d, dword [r11 + rax*4]
mov dword [rbx + 0x128], r8d
mov ecx, r8d
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, r9d
shr r9d, 8
shr eax, 8
xor byte [rsp + rsi + 0x31], al
movsx rax, byte [rsp + rsi + 0x31]
xor rcx, rax
movzx eax, cl
xor r9d, dword [r11 + rax*4]
movzx eax, r9b
add eax, edx
mov dword [rbx + 0x120], r9d
imul edx, eax, 0x8088405
inc edx
mov dword [rbx + 0x124], edx
mov eax, edx
shr rax, 0x18
xor rax, r8
shr r8d, 8
movzx eax, al
xor r8d, dword [r11 + rax*4]
mov ecx, r8d
mov dword [rbx + 0x128], r8d
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, r9d
shr r9d, 8
shr eax, 8
xor byte [rsp + rsi + 0x32], al
movsx rax, byte [rsp + rsi + 0x32]
xor rcx, rax
movzx eax, cl
xor r9d, dword [r11 + rax*4]
movzx eax, r9b
add eax, edx
mov dword [rbx + 0x120], r9d
imul edx, eax, 0x8088405
inc edx
mov eax, edx
mov dword [rbx + 0x124], edx
shr rax, 0x18
xor rax, r8
movzx eax, al
shr r8d, 8
xor r8d, dword [r11 + rax*4]
mov dword [rbx + 0x128], r8d
mov ecx, r8d
and ecx, 0xfffd
mov r10d, r8d
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, r9d
shr r9d, 8
shr eax, 8
xor byte [rsp + rsi + 0x33], al
movsx rax, byte [rsp + rsi + 0x33]
xor rcx, rax
movzx eax, cl
xor r9d, dword [r11 + rax*4]
mov dword [rbx + 0x120], r9d
movzx eax, r9b
add eax, edx
imul edx, eax, 0x8088405
inc edx
mov dword [rbx + 0x124], edx
mov eax, edx
shr rax, 0x18
xor rax, r10
shr r10d, 8
movzx eax, al
xor r10d, dword [r11 + rax*4]
mov dword [rbx + 0x128], r10d
mov ecx, r10d
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, r9d
shr r9d, 8
shr eax, 8
xor byte [rsp + rsi + 0x34], al
movsx rax, byte [rsp + rsi + 0x34]
xor rcx, rax
movzx eax, cl
xor r9d, dword [r11 + rax*4]
mov dword [rbx + 0x120], r9d
movzx eax, r9b
add eax, edx
mov edx, r9d
imul r8d, eax, 0x8088405
inc r8d
mov dword [rbx + 0x124], r8d
mov eax, r8d
shr rax, 0x18
xor rax, r10
shr r10d, 8
movzx eax, al
xor r10d, dword [r11 + rax*4]
mov ecx, r10d
mov dword [rbx + 0x128], r10d
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
mov ecx, edx
shr edx, 8
shr eax, 8
xor byte [rsp + rsi + 0x35], al
movsx rax, byte [rsp + rsi + 0x35]
xor rcx, rax
movzx eax, cl
xor edx, dword [r11 + rax*4]
movzx eax, dl
add eax, r8d
mov dword [rbx + 0x120], edx
imul ecx, eax, 0x8088405
mov edx, r10d
inc ecx
mov dword [rbx + 0x124], ecx
shr rcx, 0x18
xor rcx, rdx
add rsi, 6
shr edx, 8
movzx eax, cl
xor edx, dword [r11 + rax*4]
mov dword [rbx + 0x128], edx
cmp rsi, 0xc
jl 0x140008a23
mov rax, qword [rbx + 0x110]
add qword [rax + 0x60], 0xc
mov dword [rbx + 0x118], 1
xor eax, eax
jmp 0x1400087db
cmp eax, 8
jne 0x1400088ec
test ebp, ebp
jne 0x1400088ec
lea rcx, [rdi + 8]
mov qword [rdi + 0x38], rsi
lea r9d, [rax + 0x50]
mov qword [rcx], rsi
lea r8, str.1.3.1
mov qword [rdi + 0x40], rsi
lea edx, [rax - 0x17]
mov qword [rdi + 0x48], rsi
mov dword [rdi + 0x10], esi
call fcn.14000b410
mov ebp, eax
test eax, eax
jne 0x140008d23
mov dword [rdi + 0x68], 8
jmp 0x1400088ec
mov rcx, qword [rdi]
call fcn.14000cb6b
mov rcx, rdi
call fcn.14000cb6b
mov eax, ebp
jmp 0x1400087db
mov eax, 0xffffff9a
jmp 0x1400087e8