Function at 0x140014780
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x20
xor r12d, r12d
xor ebp, ebp
mov r15, r9
test r9, r9
je 0x1400147ad
mov byte [r9], bpl
test rcx, rcx
je 0x140014a81
mov r14, qword [rcx + 0x80]
test r14, r14
je 0x140014a81
cmp qword [r14], rbp
jne 0x1400147d5
mov eax, 0xffffff9c
jmp 0x140014a86
test r8d, r8d
jne 0x1400147e1
xor eax, eax
jmp 0x140014a86
mov eax, dword [r14 + 0x80]
mov qword [r14 + 0x18], rdx
mov dword [r14 + 0x20], r8d
cmp r8d, eax
jbe 0x1400147fc
mov dword [r14 + 0x20], eax
mov r8d, eax
test r8d, r8d
je 0x140014a7d
lea rsi, [0x140040770]
cmp dword [r14 + 0x10], 0
jne 0x140014924
mov eax, dword [r14 + 0x7c]
test eax, eax
je 0x140014924
mov edx, dword [r14 + 0x94]
mov ebx, 0x4000
mov rcx, qword [r14 + 0x88]
cmp eax, ebx
cmovb ebx, eax
add edx, dword [r14 + 0x60]
xor r8d, r8d
call fcn.140013b08
test eax, eax
jne 0x140014a68
mov r9, qword [r14 + 0x88]
lea r8d, [rax + 1]
mov rcx, qword [r14]
mov edx, ebx
mov edi, ebx
call fcn.140013b84
cmp rax, 1
jne 0x140014a68
add dword [r14 + 0x60], ebx
sub dword [r14 + 0x7c], ebx
cmp byte [r14 + 0x98], 0
mov r10, qword [r14]
mov qword [r14 + 8], r10
mov dword [r14 + 0x10], ebx
je 0x140014924
test ebx, ebx
je 0x140014924
mov r9d, dword [r14 + 0xa4]
mov edx, dword [r14 + 0x9c]
mov eax, r9d
and eax, 0xfffd
mov ecx, edx
or eax, 2
shr edx, 8
mov r8d, eax
xor r8d, 1
imul r8d, eax
shr r8d, 8
xor r8b, byte [r10]
movsx rax, r8b
xor rcx, rax
movzx eax, cl
xor edx, dword [rsi + rax*4]
movzx eax, dl
add eax, dword [r14 + 0xa0]
imul ecx, eax, 0x8088405
mov dword [r14 + 0x9c], edx
inc ecx
mov dword [r14 + 0xa0], ecx
movzx eax, byte [r14 + 0xa3]
movzx ecx, r9b
xor rcx, rax
shr r9d, 8
xor r9d, dword [rsi + rcx*4]
mov dword [r14 + 0xa4], r9d
mov byte [r10], r8b
inc r10
sub rdi, 1
jne 0x140014899
mov r10d, dword [r14 + 0xa8]
mov r8d, dword [r14 + 0x10]
cmp r10d, r8d
mov r9d, r8d
cmovbe r9d, r10d
test r9d, r9d
je 0x14001497b
mov rdx, qword [r14 + 8]
lea eax, [r9 - 1]
sub r8d, r9d
mov r11b, byte [rax + rdx]
sub dword [r14 + 0x80], r9d
mov eax, r9d
add rax, rdx
mov dword [r14 + 0x10], r8d
sub r10d, r9d
mov qword [r14 + 8], rax
mov dword [r14 + 0xa8], r10d
jne 0x14001497b
cmp r11b, byte [r14 + 0xac]
jne 0x140014a6d
cmp dword [r14 + 0x90], 0
jne 0x1400149fe
mov edi, dword [r14 + 0x20]
cmp edi, r8d
cmovae edi, r8d
xor r8d, r8d
test edi, edi
je 0x1400149af
mov rax, qword [r14 + 8]
mov rcx, qword [r14 + 0x18]
mov al, byte [r8 + rax]
mov byte [r8 + rcx], al
inc r8d
cmp r8d, edi
jb 0x140014997
mov rbx, qword [r14 + 0x18]
mov r8d, edi
mov ecx, dword [r14 + 0x74]
mov rdx, rbx
call fcn.140013378
sub dword [r14 + 0x80], edi
add ebp, edi
sub dword [r14 + 0x10], edi
sub dword [r14 + 0x20], edi
add dword [r14 + 0x24], edi
mov ecx, edi
add qword [r14 + 8], rcx
cmp dword [r14 + 0x80], 0
mov dword [r14 + 0x74], eax
lea rax, [rdi + rbx]
mov qword [r14 + 0x18], rax
jne 0x140014a53
test r15, r15
je 0x140014a53
mov byte [r15], 1
jmp 0x140014a53
mov ebx, dword [r14 + 0x24]
lea rcx, [r14 + 8]
mov rdi, qword [r14 + 0x18]
call fcn.140013700
mov esi, dword [r14 + 0x24]
mov rdx, rdi
mov ecx, dword [r14 + 0x74]
sub esi, ebx
mov r8d, esi
mov r12d, eax
call fcn.140013378
mov dword [r14 + 0x74], eax
add ebp, esi
mov eax, dword [r14 + 0x80]
sub eax, esi
mov dword [r14 + 0x80], eax
cmp r12d, 1
je 0x140014a74
test eax, eax
je 0x140014a74
test r12d, r12d
jne 0x140014a63
lea rsi, [0x140040770]
cmp dword [r14 + 0x20], 0
ja 0x14001480c
test r12d, r12d
je 0x140014a7d
mov eax, r12d
jmp 0x140014a86
or eax, 0xffffffff
jmp 0x140014a86
mov eax, 0xffffff96
jmp 0x140014a86
test r15, r15
je 0x140014a7d
mov byte [r15], 1
mov eax, ebp
jmp 0x140014a86
mov eax, 0xffffff9a
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop r14
pop r12
ret