Function at 0x14013c448
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 0x14013c748
mov r13, rcx
mov rbx, qword [rcx + 0x110]
test rbx, rbx
je 0x14013c748
cmp qword [rbx], 0
je 0x14013c743
test r8d, r8d
je 0x14013c75b
mov qword [rbx + 0x18], rdx
mov dword [rbx + 0x20], r8d
mov r8d, r8d
mov rax, qword [rbx + 0x98]
mov r12d, dword [rbx + 0x10]
mov rdx, r12
add rdx, rax
xor ebp, ebp
mov ecx, 0
cmp rdx, r8
jae 0x14013c4ca
cmp dword [rbx + 0x118], 0
je 0x14013c765
add eax, r12d
mov dword [rbx + 0x20], eax
sete cl
test cl, cl
jne 0x14013c748
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 0x14013c557
mov eax, dword [rbx + 0x108]
test eax, eax
je 0x14013c511
cmp dword [rbx + 0x118], 0
je 0x14013c6d2
test r12d, r12d
jne 0x14013c524
cmp qword [rbx + 0x98], 0
je 0x14013c76c
mov eax, dword [rbx + 0x20]
cmp eax, r12d
cmovb r12d, eax
test r12d, r12d
je 0x14013c680
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 0x14013c53c
jmp 0x14013c682
mov r12, qword [rbx + 0x98]
test r12, r12
je 0x14013c73b
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.14013b0ed
mov ebp, 0xffffffff
test eax, eax
jne 0x14013c748
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 0x14013c748
mov r8, rsi
cmp dword [r13 + 0x118], 0
je 0x14013c662
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 0x14013c5d5
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 0x14013c4fa
xor ebp, ebp
add qword [rbx + 0x88], rbp
mov rdx, qword [rbx + 0x18]
mov ecx, dword [rbx + 0x90]
mov r8d, r12d
call fcn.140063880
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 0x14013c75f
mov r12d, dword [rbx + 0x10]
jmp 0x14013c4f5
cmp eax, 0xc
je 0x14013c6bf
mov r12d, dword [rbx + 0x24]
mov rax, qword [rbx + 0x18]
mov qword [rsp + 0x28], rax
mov rcx, qword [rsp + 0x20]
mov edx, 2
call fcn.14005fea0
mov edi, eax
test eax, eax
js 0x14013c706
cmp qword [rbx + 0x28], 0
mov eax, 0xfffffffd
cmovne edi, eax
mov ebp, dword [rbx + 0x24]
mov ecx, dword [rbx + 0x90]
sub rbp, r12
add qword [rbx + 0x88], rbp
mov rdx, qword [rsp + 0x28]
mov r8d, ebp
call fcn.140063880
mov dword [rbx + 0x90], eax
sub qword [rbx + 0xa0], rbp
add esi, ebp
test edi, edi
je 0x14013c6bf
jmp 0x14013c770
xor r12d, r12d
jmp 0x14013c4fa
mov ebp, 0xffffff9c
mov eax, ebp
add rsp, 0x38
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor ebp, ebp
jmp 0x14013c748
mov edi, esi
mov ebp, edi
jmp 0x14013c748
xor ecx, ecx
jmp 0x14013c4ca
mov ebp, esi
jmp 0x14013c748
mov ebp, esi
cmp edi, 1
je 0x14013c748
jmp 0x14013c761