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

Disassembly:
push r12
push r14
push r15
sub rsp, 0x30
xor r12d, r12d
xor r15d, r15d
mov r14, r9
test r9, r9
je 0x1400d125b
mov byte [r9], r12b
test rcx, rcx
jne 0x1400d126e
lea eax, [rcx - 0x66]
add rsp, 0x30
pop r15
pop r14
pop r12
ret
mov qword [rsp + 0x50], rbx
mov rbx, qword [rcx + 0x80]
test rbx, rbx
jne 0x1400d1292
lea eax, [rbx - 0x66]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r14
pop r12
ret
cmp qword [rbx], r12
jne 0x1400d12ac
mov eax, 0xffffff9c
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r14
pop r12
ret
test r8d, r8d
jne 0x1400d12c3
xor eax, eax
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r14
pop r12
ret
mov eax, dword [rbx + 0x80]
cmp r8d, eax
mov qword [rsp + 0x58], rbp
cmova r8d, eax
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r13
mov qword [rbx + 0x18], rdx
mov dword [rbx + 0x20], r8d
test r8d, r8d
je 0x1400d1573
lea r13, [0x140338700]
nop dword [rax]
cmp dword [rbx + 0x10], 0
jne 0x1400d1431
mov eax, dword [rbx + 0x7c]
test eax, eax
je 0x1400d1431
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 0x1400d1353
cmp byte [rcx + 1], 0
je 0x1400d155e
add edx, dword [rcx + 0x14]
xor r9d, r9d
mov rcx, qword [rcx + 8]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x1400d1356
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.1400cff90
cmp rax, 1
jne 0x1400d155e
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 0x1400d1431
test edi, edi
je 0x1400d1431
nop
mov r9d, dword [rbx + 0xa4]
mov ecx, dword [rbx + 0x9c]
mov eax, r9d
and eax, 0xfffd
or eax, 2
mov r8d, eax
xor r8d, 1
imul r8d, eax
shr r8d, 8
xor r8b, byte [r10]
movsx rax, r8b
xor rcx, rax
mov eax, dword [rbx + 0x9c]
shr eax, 8
movzx edx, cl
mov ecx, dword [r13 + rdx*4]
xor ecx, eax
movzx eax, cl
add eax, dword [rbx + 0xa0]
mov dword [rbx + 0x9c], ecx
imul ecx, eax, 0x8088405
inc ecx
mov dword [rbx + 0xa0], ecx
movzx eax, byte [rbx + 0xa3]
movzx ecx, r9b
xor rcx, rax
shr r9d, 8
mov eax, dword [r13 + rcx*4]
xor eax, r9d
mov dword [rbx + 0xa4], eax
mov byte [r10], r8b
inc r10
sub rsi, 1
jne 0x1400d13a0
mov r8d, dword [rbx + 0xa8]
mov r9d, dword [rbx + 0x10]
cmp r8d, r9d
cmova r8d, r9d
test r8d, r8d
je 0x1400d1483
mov rdx, qword [rbx + 8]
lea eax, [r8 - 1]
sub r9d, r8d
movzx r10d, byte [rax + rdx]
sub dword [rbx + 0x80], r8d
mov eax, r8d
add rax, rdx
mov dword [rbx + 0x10], r9d
sub dword [rbx + 0xa8], r8d
mov qword [rbx + 8], rax
jne 0x1400d1483
cmp r10b, byte [rbx + 0xac]
jne 0x1400d1563
cmp dword [rbx + 0x90], 0
jne 0x1400d1504
mov esi, dword [rbx + 0x10]
cmp dword [rbx + 0x20], esi
cmovb esi, dword [rbx + 0x20]
test esi, esi
je 0x1400d14bb
xor edx, edx
mov r8d, esi
nop
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 0x1400d14a0
mov rdi, qword [rbx + 0x18]
mov r8d, esi
mov ecx, dword [rbx + 0x74]
mov rdx, rdi
call fcn.1400cf4d0
sub dword [rbx + 0x80], esi
add r15d, 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 0x1400d154a
test r14, r14
je 0x1400d154a
mov byte [r14], 1
jmp 0x1400d154a
mov edi, dword [rbx + 0x24]
lea rcx, [rbx + 8]
mov rsi, qword [rbx + 0x18]
call fcn.1400cf9a0
mov ebp, dword [rbx + 0x24]
mov rdx, rsi
mov ecx, dword [rbx + 0x74]
sub ebp, edi
mov r8d, ebp
mov r12d, eax
call fcn.1400cf4d0
sub dword [rbx + 0x80], ebp
add r15d, ebp
mov dword [rbx + 0x74], eax
cmp r12d, 1
je 0x1400d156a
cmp dword [rbx + 0x80], 0
je 0x1400d156a
test r12d, r12d
jne 0x1400d1559
cmp dword [rbx + 0x20], 0
ja 0x1400d1300
test r12d, r12d
je 0x1400d1573
mov eax, r12d
jmp 0x1400d1576
or eax, 0xffffffff
jmp 0x1400d1576
mov eax, 0xffffff96
jmp 0x1400d1576
test r14, r14
je 0x1400d1573
mov byte [r14], 1
mov eax, r15d
mov rdi, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
mov r13, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop r15
pop r14
pop r12
ret