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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor esi, esi
mov r15, r9
mov r12d, esi
mov ebp, esi
test r9, r9
je 0x180008f76
mov byte [r9], sil
test rcx, rcx
je 0x18000923e
mov r14, qword [rcx + 0x80]
test r14, r14
je 0x18000923e
cmp qword [r14], rsi
jne 0x180008f9e
mov eax, 0xffffff9c
jmp 0x180009243
test r8d, r8d
jne 0x180008faa
xor eax, eax
jmp 0x180009243
mov eax, dword [r14 + 0x80]
mov qword [r14 + 0x18], rdx
mov dword [r14 + 0x20], r8d
cmp r8d, eax
jbe 0x180008fc5
mov dword [r14 + 0x20], eax
mov r8d, eax
test r8d, r8d
je 0x18000923a
lea r13, [r14 + 8]
cmp dword [r14 + 0x10], esi
jne 0x1800090f0
mov eax, dword [r14 + 0x7c]
test eax, eax
je 0x1800090f0
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.1800081cc
test eax, eax
jne 0x180009225
mov r9, qword [r14 + 0x88]
lea r8d, [rax + 1]
mov rcx, qword [r14]
mov edx, ebx
mov edi, ebx
call fcn.180008248
cmp rax, 1
jne 0x180009225
add dword [r14 + 0x60], ebx
sub dword [r14 + 0x7c], ebx
mov r10, qword [r14]
mov qword [r14 + 8], r10
mov dword [r14 + 0x10], ebx
cmp byte [r14 + 0x98], sil
je 0x1800090f0
test ebx, ebx
je 0x1800090f0
lea r11, [0x180021d20]
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 [r11 + 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 [r11 + rcx*4]
mov dword [r14 + 0xa4], r9d
mov byte [r10], r8b
inc r10
sub rdi, 1
jne 0x180009064
mov r10d, dword [r14 + 0xa8]
mov r8d, dword [r14 + 0x10]
cmp r10d, r8d
mov r9d, r8d
cmovbe r9d, r10d
test r9d, r9d
je 0x180009140
mov rdx, qword [r13]
lea eax, [r9 - 1]
sub r8d, r9d
mov r11b, byte [rax + rdx]
mov eax, r9d
add rax, rdx
mov dword [r14 + 0x10], r8d
sub r10d, r9d
mov qword [r13], rax
mov dword [r14 + 0xa8], r10d
jne 0x180009140
cmp r11b, byte [r14 + 0xac]
jne 0x18000922a
cmp dword [r14 + 0x90], esi
jne 0x1800091c2
mov edi, dword [r14 + 0x20]
cmp edi, r8d
cmovae edi, r8d
mov r8d, esi
test edi, edi
je 0x180009174
mov rax, qword [r13]
mov rcx, qword [r14 + 0x18]
mov edx, r8d
inc r8d
mov al, byte [rdx + rax]
mov byte [rdx + rcx], al
cmp r8d, edi
jb 0x18000915b
mov rbx, qword [r14 + 0x18]
mov r8d, edi
mov ecx, dword [r14 + 0x74]
mov rdx, rbx
call fcn.180007b74
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 [r13], rcx
mov dword [r14 + 0x74], eax
lea rax, [rdi + rbx]
mov qword [r14 + 0x18], rax
cmp dword [r14 + 0x80], esi
jne 0x180009211
test r15, r15
je 0x180009211
mov byte [r15], 1
jmp 0x180009211
mov ebx, dword [r14 + 0x24]
mov rcx, r13
mov rdi, qword [r14 + 0x18]
call fcn.180007dd8
mov esi, dword [r14 + 0x24]
mov rdx, rdi
mov ecx, dword [r14 + 0x74]
sub esi, ebx
mov r8d, esi
mov r12d, eax
call fcn.180007b74
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 0x180009231
xor esi, esi
test eax, eax
je 0x180009231
test r12d, r12d
jne 0x180009220
cmp dword [r14 + 0x20], esi
ja 0x180008fd2
test r12d, r12d
je 0x18000923a
mov eax, r12d
jmp 0x180009243
or eax, 0xffffffff
jmp 0x180009243
mov eax, 0xffffff96
jmp 0x180009243
test r15, r15
je 0x18000923a
mov byte [r15], 1
mov eax, ebp
jmp 0x180009243
mov eax, 0xffffff9a
mov rbx, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
ret