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

Disassembly:
push rbp
push r12
push r15
sub rsp, 0x30
xor ebp, ebp
xor r12d, r12d
mov r15, r9
test r9, r9
je 0x140237c2a
mov byte [r9], bpl
mov qword [rsp + 0x50], rbx
test rcx, rcx
je 0x140237f75
mov rbx, qword [rcx + 0x80]
test rbx, rbx
je 0x140237f75
cmp qword [rbx], rbp
jne 0x140237c61
mov eax, 0xffffff9c
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r12
pop rbp
ret
test r8d, r8d
jne 0x140237c77
xor eax, eax
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r12
pop rbp
ret
mov eax, dword [rbx + 0x80]
mov qword [rbx + 0x18], rdx
mov dword [rbx + 0x20], r8d
cmp r8d, eax
jbe 0x140237c90
mov dword [rbx + 0x20], eax
mov r8d, eax
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x60], rdi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r14
test r8d, r8d
je 0x140237f70
lea r13, [0x1404176c0]
cmp dword [rbx + 0x10], 0
mov edi, 0xfffffffd
jne 0x140237dee
mov eax, dword [rbx + 0x7c]
test eax, eax
je 0x140237dee
mov rcx, qword [rbx + 0x88]
mov edi, 0x4000
mov edx, dword [rbx + 0x94]
cmp eax, edi
cmovb edi, eax
add edx, dword [rbx + 0x60]
cmp byte [rcx], 0
je 0x140237d0c
cmp byte [rcx + 1], 0
je 0x140237f59
add edx, dword [rcx + 0x14]
xor r9d, r9d
mov rcx, qword [rcx + 8]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140237d0f
mov dword [rcx + 0x2c], edx
mov r9, qword [rbx + 0x88]
mov r8d, 1
mov rcx, qword [rbx]
mov edx, edi
mov esi, edi
call fcn.140236b90
cmp rax, 1
jne 0x140237f59
add dword [rbx + 0x60], edi
sub dword [rbx + 0x7c], edi
cmp byte [rbx + 0x98], 0
mov r10, qword [rbx]
mov qword [rbx + 8], r10
mov dword [rbx + 0x10], edi
je 0x140237de9
test edi, edi
je 0x140237de9
nop word [rax + rax]
mov r9d, dword [rbx + 0xa4]
lea r10, [r10 + 1]
mov edx, dword [rbx + 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 - 1]
movsx rax, r8b
xor rcx, rax
movzx eax, cl
movzx ecx, r9b
shr r9d, 8
xor edx, dword [r13 + rax*4]
movzx eax, dl
add eax, dword [rbx + 0xa0]
imul eax, eax, 0x8088405
mov dword [rbx + 0x9c], edx
inc eax
mov dword [rbx + 0xa0], eax
shr rax, 0x18
xor rcx, rax
xor r9d, dword [r13 + rcx*4]
mov dword [rbx + 0xa4], r9d
mov byte [r10 - 1], r8b
sub rsi, 1
jne 0x140237d60
mov edi, 0xfffffffd
mov r9d, dword [rbx + 0xa8]
mov esi, dword [rbx + 0x10]
cmp r9d, esi
mov r8d, esi
cmovbe r8d, r9d
test r8d, r8d
je 0x140237e3d
mov rdx, qword [rbx + 8]
lea eax, [r8 - 1]
sub esi, r8d
movzx r10d, byte [rax + rdx]
mov eax, r8d
add rax, rdx
mov dword [rbx + 0x10], esi
sub r9d, r8d
mov qword [rbx + 8], rax
mov dword [rbx + 0xa8], r9d
jne 0x140237e3d
cmp r10b, byte [rbx + 0xac]
jne 0x140237f60
cmp dword [rbx + 0x90], 0
jne 0x140237ed4
test esi, esi
jne 0x140237e57
cmp dword [rbx + 0x7c], esi
je 0x140237f67
cmp dword [rbx + 0x20], esi
cmovb esi, dword [rbx + 0x20]
test esi, esi
je 0x140237e8b
xor edx, edx
mov r8d, esi
nop word [rax + rax]
mov rax, qword [rbx + 8]
lea rdx, [rdx + 1]
mov rcx, qword [rbx + 0x18]
movzx eax, byte [rdx + rax - 1]
mov byte [rdx + rcx - 1], al
sub r8, 1
jne 0x140237e70
mov rdi, qword [rbx + 0x18]
mov r8d, esi
mov ecx, dword [rbx + 0x74]
mov rdx, rdi
call fcn.140236090
sub dword [rbx + 0x80], esi
add r12d, esi
sub dword [rbx + 0x10], esi
sub dword [rbx + 0x20], esi
add dword [rbx + 0x24], esi
mov ecx, esi
add qword [rbx + 8], rcx
cmp dword [rbx + 0x80], 0
mov dword [rbx + 0x74], eax
lea rax, [rsi + rdi]
mov qword [rbx + 0x18], rax
jne 0x140237f26
test r15, r15
je 0x140237f26
mov byte [r15], 1
jmp 0x140237f26
mov esi, dword [rbx + 0x24]
lea rcx, [rbx + 8]
mov r14, qword [rbx + 0x18]
call fcn.140236700
mov ebp, eax
test eax, eax
js 0x140237ef2
cmp qword [rbx + 0x28], 0
cmovne ebp, edi
mov edi, dword [rbx + 0x24]
mov rdx, r14
mov ecx, dword [rbx + 0x74]
sub edi, esi
mov r8d, edi
call fcn.140236090
mov dword [rbx + 0x74], eax
add r12d, edi
mov eax, dword [rbx + 0x80]
sub eax, edi
mov dword [rbx + 0x80], eax
cmp ebp, 1
je 0x140237f67
test eax, eax
je 0x140237f67
test ebp, ebp
jne 0x140237f34
cmp dword [rbx + 0x20], 0
ja 0x140237cb4
test ebp, ebp
je 0x140237f70
mov eax, ebp
mov r13, qword [rsp + 0x28]
mov rdi, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x58]
mov r14, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r12
pop rbp
ret
mov eax, 0xffffffff
jmp 0x140237f36
mov eax, 0xffffff96
jmp 0x140237f36
test r15, r15
je 0x140237f70
mov byte [r15], 1
mov eax, r12d
jmp 0x140237f36
mov rbx, qword [rsp + 0x50]
mov eax, 0xffffff9a
add rsp, 0x30
pop r15
pop r12
pop rbp
ret