Function at 0x1401287f8
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, 0x38
mov ebp, 0xffffff9a
test rcx, rcx
je 0x140128aea
mov r13, rcx
mov rbx, qword [rcx + 0x110]
test rbx, rbx
je 0x140128aea
cmp qword [rbx], 0
je 0x140128ae5
test r8d, r8d
je 0x140128b01
mov qword [rbx + 0x18], rdx
mov dword [rbx + 0x20], r8d
mov ecx, r8d
mov rax, qword [rbx + 0x98]
mov r12d, dword [rbx + 0x10]
mov rdx, r12
add rdx, rax
cmp rdx, rcx
jae 0x140128872
cmp dword [rbx + 0x118], 0
je 0x140128872
add eax, r12d
mov dword [rbx + 0x20], eax
je 0x140128b0e
lea rax, [rbx + 8]
mov qword [rsp + 0x20], rax
lea rax, [rbx + 0xa8]
mov qword [rsp + 0x30], rax
xor esi, esi
mov r14d, 0xfffd
mov r15d, 0xff
test r12d, r12d
je 0x1401288f7
mov eax, dword [rbx + 0x108]
test eax, eax
je 0x1401288b1
cmp dword [rbx + 0x118], 0
je 0x140128a72
test r12d, r12d
jne 0x1401288c4
cmp qword [rbx + 0x98], 0
je 0x140128b0a
mov eax, dword [rbx + 0x20]
cmp eax, r12d
cmovb r12d, eax
test r12d, r12d
je 0x140128a20
mov ebp, r12d
xor eax, eax
mov rcx, qword [rbx + 8]
mov rdx, qword [rbx + 0x18]
mov cl, byte [rcx + rax]
mov byte [rdx + rax], cl
inc rax
cmp rbp, rax
jne 0x1401288dc
jmp 0x140128a22
mov r12, qword [rbx + 0x98]
test r12, r12
je 0x140128add
mov eax, 0x4000
cmp r12, rax
cmovae r12, rax
mov rdx, qword [rbx + 0x100]
mov r8, qword [rbx + 0x110]
add r8, qword [rbx + 0x60]
mov rcx, qword [rsp + 0x30]
xor r9d, r9d
call fcn.14012749f
mov ebp, 0xffffffff
test eax, eax
jne 0x140128aea
mov rdx, qword [rbx + 0x100]
mov r8, qword [rbx]
mov rcx, qword [rbx + 0xe0]
mov r9d, r12d
call qword [rbx + 0xb0]
cmp eax, r12d
jne 0x140128aea
mov r8, rsi
cmp dword [r13 + 0x118], 0
je 0x140128a02
xor eax, eax
mov ecx, dword [r13 + 0x128]
and ecx, r14d
lea edx, [rcx + 2]
xor ecx, 3
imul ecx, edx
shr ecx, 8
mov rdx, qword [rbx]
xor cl, byte [rdx + rax]
mov byte [rdx + rax], cl
movzx ecx, cl
mov rdx, qword [r13 + 0x130]
mov ebp, dword [r13 + 0x120]
mov edi, dword [r13 + 0x128]
mov esi, ebp
and esi, r15d
xor esi, ecx
shr ebp, 8
xor ebp, dword [rdx + rsi*4]
mov dword [r13 + 0x120], ebp
and ebp, r15d
add ebp, dword [r13 + 0x124]
imul ebp, ebp, 0x8088405
inc ebp
mov dword [r13 + 0x124], ebp
shr ebp, 0x18
mov esi, edi
and esi, r15d
xor esi, ebp
shr edi, 8
xor edi, dword [rdx + rsi*4]
mov dword [r13 + 0x128], edi
mov rdx, qword [rbx]
mov byte [rdx + rax], cl
inc rax
cmp r12, rax
jne 0x140128975
add qword [rbx + 0x60], r12
sub qword [rbx + 0x98], r12
mov rax, qword [rbx]
mov qword [rbx + 8], rax
mov dword [rbx + 0x10], r12d
mov rsi, r8
jmp 0x14012889a
xor ebp, ebp
add qword [rbx + 0x88], rbp
mov rdx, qword [rbx + 0x18]
mov ecx, dword [rbx + 0x90]
mov r8d, r12d
call fcn.14006bfe0
mov dword [rbx + 0x90], eax
sub qword [rbx + 0xa0], rbp
sub dword [rbx + 0x10], r12d
sub dword [rbx + 0x20], r12d
add qword [rbx + 0x18], rbp
add qword [rbx + 8], rbp
add dword [rbx + 0x24], r12d
add esi, r12d
cmp dword [rbx + 0x20], 0
je 0x140128b05
mov r12d, dword [rbx + 0x10]
jmp 0x140128895
cmp eax, 0xc
je 0x140128a5f
mov ebp, dword [rbx + 0x24]
mov rax, qword [rbx + 0x18]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x20]
mov edx, 2
call fcn.140067f10
mov r12d, eax
test eax, eax
js 0x140128aa7
cmp qword [rbx + 0x28], 0
mov eax, 0xfffffffd
cmovne r12d, eax
mov edi, dword [rbx + 0x24]
mov ecx, dword [rbx + 0x90]
sub rdi, rbp
add qword [rbx + 0x88], rdi
mov rdx, qword [rsp + 0x28]
mov r8d, edi
call fcn.14006bfe0
mov dword [rbx + 0x90], eax
sub qword [rbx + 0xa0], rdi
add esi, edi
test r12d, r12d
je 0x140128a5f
jmp 0x140128b13
xor r12d, r12d
jmp 0x14012889a
mov ebp, 0xffffff9c
mov r12d, ebp
mov eax, r12d
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ebp, ebp
jmp 0x140128aea
mov r12d, esi
jmp 0x140128aed
mov ebp, esi
jmp 0x140128aea
xor r12d, r12d
jmp 0x140128aed
mov ebp, esi
cmp r12d, 1
je 0x140128aea
jmp 0x140128aed