Function at 0x14011c5e0
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 0x14011c8d2
mov r13, rcx
mov rbx, qword [rcx + 0x110]
test rbx, rbx
je 0x14011c8d2
cmp qword [rbx], 0
je 0x14011c8cd
test r8d, r8d
je 0x14011c8e9
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 0x14011c65a
cmp dword [rbx + 0x118], 0
je 0x14011c65a
add eax, r12d
mov dword [rbx + 0x20], eax
je 0x14011c8f6
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 0x14011c6df
mov eax, dword [rbx + 0x108]
test eax, eax
je 0x14011c699
cmp dword [rbx + 0x118], 0
je 0x14011c85a
test r12d, r12d
jne 0x14011c6ac
cmp qword [rbx + 0x98], 0
je 0x14011c8f2
mov eax, dword [rbx + 0x20]
cmp eax, r12d
cmovb r12d, eax
test r12d, r12d
je 0x14011c808
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 0x14011c6c4
jmp 0x14011c80a
mov r12, qword [rbx + 0x98]
test r12, r12
je 0x14011c8c5
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.140124310
mov ebp, 0xffffffff
test eax, eax
jne 0x14011c8d2
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 0x14011c8d2
mov r8, rsi
cmp dword [r13 + 0x118], 0
je 0x14011c7ea
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 0x14011c75d
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 0x14011c682
xor ebp, ebp
add qword [rbx + 0x88], rbp
mov rdx, qword [rbx + 0x18]
mov ecx, dword [rbx + 0x90]
mov r8d, r12d
call fcn.1400724e0
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 0x14011c8ed
mov r12d, dword [rbx + 0x10]
jmp 0x14011c67d
cmp eax, 0xc
je 0x14011c847
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.1400650c0
mov r12d, eax
test eax, eax
js 0x14011c88f
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.1400724e0
mov dword [rbx + 0x90], eax
sub qword [rbx + 0xa0], rdi
add esi, edi
test r12d, r12d
je 0x14011c847
jmp 0x14011c8fb
xor r12d, r12d
jmp 0x14011c682
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 0x14011c8d2
mov r12d, esi
jmp 0x14011c8d5
mov ebp, esi
jmp 0x14011c8d2
xor r12d, r12d
jmp 0x14011c8d5
mov ebp, esi
cmp r12d, 1
je 0x14011c8d2
jmp 0x14011c8d5