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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov rax, qword [0x140135388]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov esi, 0xffffff9a
test rcx, rcx
je 0x14009ad06
mov r14, rcx
cmp qword [rcx + 0x90], 0
je 0x14009ad06
mov ebx, r9d
mov r15, r8
mov rbp, rdx
mov rsi, qword [r14 + 0x110]
test rsi, rsi
je 0x14009a669
mov rcx, qword [rsi]
test rcx, rcx
je 0x14009a640
call fcn.14003c7a0
mov qword [rsi], 0
cmp dword [rsi + 0x68], 8
jne 0x14009a656
lea rcx, [rsi + 8]
call fcn.14000bcf0
mov rcx, rsi
call fcn.14003c7a0
mov qword [r14 + 0x110], 0
mov rdx, qword [r14 + 0x60]
mov r8, qword [r14 + 0x78]
add r8, qword [r14 + 0x108]
xor edi, edi
mov rcx, r14
xor r9d, r9d
call fcn.1400c6c80
test eax, eax
je 0x14009a693
mov esi, 0xffffff99
jmp 0x14009ad06
mov qword [rsp + 0x30], rbp
mov rdx, qword [r14 + 0x60]
lea rsi, [rsp + 0x44]
mov rcx, r14
mov r8, rsi
call fcn.14009b210
mov r12d, eax
cmp dword [rsi], 0x4034b50
mov r13d, 0xffffff99
cmove r13d, edi
mov rsi, qword [r14 + 0x60]
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a6e5
movzx edi, byte [rsp + 0x43]
jmp 0x14009a6fb
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
xor edi, edi
mov ebp, 0xffffffff
test eax, eax
jne 0x14009a73e
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a71d
movzx ecx, byte [rsp + 0x43]
jmp 0x14009a737
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
mov ecx, edi
test eax, eax
je 0x14009a737
xor edi, edi
mov ebp, 0xffffffff
jmp 0x14009a73e
shl ecx, 8
or edi, ecx
xor ebp, ebp
mov dword [rsp + 0x3c], edi
or ebp, r12d
mov rsi, qword [r14 + 0x60]
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a76c
movzx r12d, byte [rsp + 0x43]
jmp 0x14009a783
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
xor r12d, r12d
mov ecx, 0xffffffff
test eax, eax
jne 0x14009a7c6
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a7a2
xor ecx, ecx
jmp 0x14009a7be
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
mov ecx, r12d
test eax, eax
je 0x14009a7be
xor r12d, r12d
mov ecx, 0xffffffff
jmp 0x14009a7c6
shl ecx, 8
or r12d, ecx
xor ecx, ecx
or ebp, ecx
mov ebp, 0xffffffff
cmove ebp, r13d
mov rsi, qword [r14 + 0x60]
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a7f7
movzx edi, byte [rsp + 0x43]
jmp 0x14009a808
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
test eax, eax
jne 0x14009a83b
xor edi, edi
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a82a
movzx ecx, byte [rsp + 0x43]
jmp 0x14009a84a
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
mov ecx, edi
test eax, eax
je 0x14009a84a
mov dword [rsp + 0x3c], 0
mov ebp, 0xffffffff
jmp 0x14009a87b
shl ecx, 8
or ecx, edi
mov dword [rsp + 0x3c], ecx
test ebp, ebp
jne 0x14009a87b
mov ebp, 0xffffff99
cmp ecx, dword [r14 + 0xbc]
jne 0x14009a87b
cmp ecx, 0xc
ja 0x14009a876
xor ebp, ebp
mov eax, 0x1101
bt eax, ecx
jb 0x14009a87b
mov ebp, 0xffffff99
mov r13d, ebx
mov rdx, qword [r14 + 0x60]
lea rsi, [rsp + 0x3c]
mov rcx, r14
mov r8, rsi
call fcn.14009b210
xor edi, edi
cmp eax, 1
sbb edi, edi
mov rdx, qword [r14 + 0x60]
mov rcx, r14
mov r8, rsi
call fcn.14009b210
mov ebx, 0xffffffff
mov esi, 0xffffffff
test eax, eax
jne 0x14009a8db
not edi
or edi, ebp
mov esi, edi
jne 0x14009a8db
mov eax, dword [rsp + 0x3c]
xor esi, esi
cmp eax, dword [r14 + 0xc4]
je 0x14009a8db
xor eax, eax
test r12b, 8
mov esi, 0xffffff99
cmovne esi, eax
mov rdx, qword [r14 + 0x60]
lea r8, [rsp + 0x3c]
mov rcx, r14
call fcn.14009b210
test eax, eax
je 0x14009a987
mov rdx, qword [r14 + 0x60]
lea r8, [rsp + 0x3c]
mov rcx, r14
call fcn.14009b210
mov ebp, 0xffffffff
test eax, eax
je 0x14009a9c0
mov rbx, r15
mov rsi, qword [r14 + 0x60]
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
mov dword [rsp + 0x2c], r13d
jne 0x14009a940
movzx edi, byte [rsp + 0x43]
jmp 0x14009a961
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
xor edi, edi
mov r15d, 0xffffffff
mov r12d, 0
test eax, eax
jne 0x14009aa39
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009a9f9
movzx r12d, byte [rsp + 0x43]
jmp 0x14009aa16
test esi, esi
jne 0x14009ab6b
mov eax, dword [rsp + 0x3c]
mov ebx, esi
cmp eax, 0xffffffff
je 0x14009a8f4
xor ebx, ebx
cmp qword [r14 + 0xc8], rax
je 0x14009a8f4
xor eax, eax
test r12b, 8
mov ebx, 0xffffff99
cmovne ebx, eax
jmp 0x14009a8f4
test ebx, ebx
jne 0x14009ab72
mov eax, dword [rsp + 0x3c]
mov ebp, ebx
cmp eax, 0xffffffff
je 0x14009a912
xor ebp, ebp
cmp qword [r14 + 0xd0], rax
je 0x14009a912
xor eax, eax
test r12b, 8
mov ebp, 0xffffff99
cmovne ebp, eax
jmp 0x14009a912
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
mov r12d, edi
test eax, eax
je 0x14009aa16
xor r12d, r12d
mov r15d, 0xffffffff
jmp 0x14009aa39
shl r12d, 8
or r12d, edi
test ebp, ebp
je 0x14009aa26
mov r15d, ebp
jmp 0x14009aa39
xor eax, eax
cmp r12d, dword [r14 + 0xd8]
mov r15d, 0xffffff99
cmove r15d, eax
mov rsi, qword [r14 + 0x60]
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009aa60
movzx r13d, byte [rsp + 0x43]
jmp 0x14009aa77
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
xor r13d, r13d
mov ecx, 0xffffffff
test eax, eax
jne 0x14009aac0
mov rcx, qword [r14 + 0x38]
lea r8, [rsp + 0x43]
mov rdx, rsi
mov r9d, 1
call qword [r14 + 8]
cmp eax, 1
jne 0x14009aa99
movzx edx, byte [rsp + 0x43]
jmp 0x14009aab5
mov rcx, qword [r14 + 0x38]
mov rdx, rsi
call qword [r14 + 0x30]
mov edx, r13d
test eax, eax
je 0x14009aab5
xor r13d, r13d
mov ecx, 0xffffffff
jmp 0x14009aac0
shl edx, 8
or edx, r13d
xor ecx, ecx
mov r13d, edx
or ecx, r15d
mov esi, 0xffffff99
jne 0x14009ad06
mov rsi, qword [r14 + 0x108]
mov ecx, 0x120
call fcn.14003c750
test rax, rax
je 0x14009ad01
mov rbp, rax
mov eax, r12d
add rsi, rax
add rsi, 0x1e
mov ecx, 0x4000
call fcn.14003c750
mov qword [rbp], rax
mov qword [rbp + 0x70], rsi
mov dword [rbp + 0x78], r13d
mov qword [rbp + 0x80], 0
mov edx, dword [rsp + 0x2c]
mov dword [rbp + 0x118], edx
test rax, rax
je 0x14009ab79
mov dword [rbp + 0x68], 0
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x14009ab3f
mov eax, dword [r14 + 0xbc]
mov dword [rcx], eax
test rbx, rbx
je 0x14009ab94
mov dword [rbx], 6
mov eax, dword [r14 + 0xb8]
and eax, 6
cmp eax, 2
je 0x14009ab86
cmp eax, 4
je 0x14009ab8e
cmp eax, 6
jne 0x14009ab94
mov dword [rbx], 1
jmp 0x14009ab94
mov ebx, esi
jmp 0x14009a8f4
mov ebp, ebx
jmp 0x14009a912
mov rcx, rbp
call fcn.14003c7a0
jmp 0x14009ad01
mov dword [rbx], 9
jmp 0x14009ab94
mov dword [rbx], 2
mov eax, dword [r14 + 0xc4]
mov dword [rbp + 0x94], eax
xor ebx, ebx
mov dword [rbp + 0x90], ebx
mov qword [rbp + 0x88], 0
mov eax, dword [r14 + 0xbc]
mov dword [rbp + 0x108], eax
mov rcx, qword [r14 + 0x60]
mov qword [rbp + 0x100], rcx
lea rdi, [rbp + 0xa8]
mov ecx, 0xb
mov rsi, r14
rep movsq qword [rdi], qword [rsi]
mov rcx, qword [r14 + 0x78]
mov qword [rbp + 0x110], rcx
mov dword [rbp + 0x24], ebx
test edx, edx
jne 0x14009ad26
cmp eax, 0xc
jne 0x14009ad26
mov dword [rbp + 0x118], 1
add r13d, r12d
mov rdi, qword [rsp + 0xc0]
movups xmm0, xmmword [r14 + 0xc8]
movups xmmword [rbp + 0x98], xmm0
mov rax, qword [r14 + 0x108]
add rax, r13
add rax, 0x1e
mov qword [rbp + 0x60], rax
xor esi, esi
mov dword [rbp + 0x10], esi
mov qword [r14 + 0x110], rbp
mov dword [r14 + 0x118], esi
test rdi, rdi
je 0x14009ad06
call fcn.14003fff0
mov qword [r14 + 0x130], rax
movabs rcx, 0x2345678912345678
mov qword [r14 + 0x120], rcx
mov dword [r14 + 0x128], 0x34567890
mov bl, byte [rdi]
test bl, bl
je 0x14009acd8
inc rdi
mov ecx, 0x12345678
mov ebp, 0x23456789
mov edx, 0x34567890
movzx ebx, bl
movzx esi, cl
xor esi, ebx
shr ecx, 8
xor ecx, dword [rax + rsi*4]
mov dword [r14 + 0x120], ecx
movzx ebx, cl
add ebx, ebp
imul ebp, ebx, 0x8088405
inc ebp
mov dword [r14 + 0x124], ebp
mov ebx, ebp
shr ebx, 0x18
movzx esi, dl
xor esi, ebx
shr edx, 8
xor edx, dword [rax + rsi*4]
mov dword [r14 + 0x128], edx
mov bl, byte [rdi]
inc rdi
test bl, bl
jne 0x14009ac8f
mov rdx, qword [r14 + 0x60]
mov rax, qword [r14 + 0x110]
mov r8, qword [rax + 0x110]
add r8, qword [rax + 0x60]
mov rcx, r14
xor r9d, r9d
call fcn.1400c6c80
test eax, eax
je 0x14009ad81
mov esi, 0xffffff98
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400d8ee0
mov eax, esi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test edx, edx
jne 0x14009ac07
cmp eax, 8
jne 0x14009ac07
mov rcx, rbp
add rcx, 8
xor eax, eax
mov qword [rbp + 8], rax
mov dword [rbp + 0x10], 0
xorps xmm0, xmm0
movups xmmword [rbp + 0x38], xmm0
mov qword [rbp + 0x48], rax
lea r8, [0x140105864]
mov edx, 0xfffffff1
mov r9d, 0x58
call fcn.140008dd0
test eax, eax
je 0x14009ae56
mov esi, eax
mov rcx, rbp
call fcn.14003c7a0
jmp 0x14009ad06
mov rcx, qword [r14 + 0x38]
mov rdx, qword [r14 + 0x60]
lea r8, [rsp + 0x44]
mov r9d, 0xc
call qword [r14 + 8]
mov esi, 0xffffff98
cmp eax, 0xc
jb 0x14009ad06
mov rax, qword [r14 + 0x130]
mov ecx, dword [r14 + 0x128]
mov edx, dword [r14 + 0x120]
mov ebp, dword [r14 + 0x124]
xor edi, edi
mov ebx, ecx
and ebx, 0xfffd
lea esi, [rbx + 2]
xor ebx, 3
imul ebx, esi
shr ebx, 8
xor bl, byte [rsp + rdi + 0x44]
mov byte [rsp + rdi + 0x44], bl
movzx ebx, bl
movzx esi, dl
xor esi, ebx
shr edx, 8
xor edx, dword [rax + rsi*4]
mov dword [r14 + 0x120], edx
movzx ebx, dl
add ebx, ebp
imul ebp, ebx, 0x8088405
inc ebp
mov dword [r14 + 0x124], ebp
mov ebx, ebp
shr ebx, 0x18
movzx esi, cl
xor esi, ebx
shr ecx, 8
xor ecx, dword [rax + rsi*4]
mov dword [r14 + 0x128], ecx
inc rdi
cmp rdi, 0xc
jne 0x14009adc4
mov rax, qword [r14 + 0x110]
add qword [rax + 0x60], 0xc
mov rax, qword [r14 + 0x110]
add qword [rax + 0x98], 0xfffffffffffffff4
mov dword [r14 + 0x118], 1
xor esi, esi
jmp 0x14009ad06
mov dword [rbp + 0x68], 8
jmp 0x14009ac07