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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
mov r14, r8
mov rsi, rdx
mov rdi, rcx
movzx eax, byte [rdx]
test eax, eax
je 0x1400ece6a
cmp eax, 1
jne 0x1400eceb4
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x1400ecf1e
cmp r9, rbx
mov rax, rbx
mov r15, r9
cmovb rax, r9
mov rdx, qword [rsi + 8]
mov r10, qword [rsi + 0x10]
lea rcx, [rsp + 0x30]
mov r8, r14
mov r9, rax
call qword [r10 + 0x18]
cmp qword [rsp + 0x30], 0
je 0x1400ecf2e
mov rax, qword [rsp + 0x38]
mov qword [rdi + 8], rax
mov qword [rdi], 1
mov r9, r15
test r9, r9
jne 0x1400ecf57
jmp 0x1400ed0d7
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x1400ecf13
cmp r9, rbx
cmovae r9, rbx
mov rdx, qword [rsi + 8]
mov rax, qword [rsi + 0x10]
lea rcx, [rsp + 0x30]
mov r8, r14
call qword [rax + 0x18]
cmp qword [rsp + 0x30], 0
jne 0x1400ecefe
mov rax, qword [rsp + 0x38]
sub rbx, rax
jb 0x1400ed34a
mov qword [rsi + 0x18], rbx
mov qword [rdi + 8], rax
jmp 0x1400ed0d0
mov rax, qword [rsi + 0x30]
test rax, rax
je 0x1400ecf13
mov r15, qword [rsi + 0x18]
test r15, r15
je 0x1400ecfcf
cmp rax, r9
mov r12, r9
cmovae rax, r9
cmp rax, r15
cmovae rax, r15
mov rdx, qword [rsi + 8]
mov r10, qword [rsi + 0x10]
lea rcx, [rsp + 0x30]
mov r8, r14
mov r9, rax
call qword [r10 + 0x18]
cmp qword [rsp + 0x30], 0
je 0x1400ecfd7
mov rax, qword [rsp + 0x38]
mov qword [rdi + 8], rax
mov qword [rdi], 1
jmp 0x1400ed0d7
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
jmp 0x1400ed0d7
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
test r9, r9
jne 0x1400ecf57
jmp 0x1400ed0d7
mov rax, qword [rsp + 0x38]
sub rbx, rax
jb 0x1400ed34a
mov qword [rsi + 0x18], rbx
mov qword [rdi + 8], rax
mov qword [rdi], 0
mov r9, r15
test r9, r9
je 0x1400ed0d7
mov ecx, dword [rsi + 0x28]
mov eax, dword [rsi + 0x20]
mov edx, dword [rsi + 0x24]
xor r8d, r8d
lea r10, [0x14021658c]
nop word [rax + rax]
mov edi, ecx
or edi, 3
mov r11d, edi
and r11d, 0xfffffffe
imul r11d, edi
shr r11d, 8
xor r11b, byte [r14 + r8]
mov ebx, eax
xor bl, r11b
shr eax, 8
movzx edi, bl
xor eax, dword [r10 + rdi*4]
movzx edi, al
add edi, edx
imul edx, edi, 0x8088405
inc edx
mov edi, edx
shr edi, 0x18
movzx ebx, cl
xor ebx, edi
shr ecx, 8
xor ecx, dword [r10 + rbx*4]
mov byte [r14 + r8], r11b
inc r8
cmp r9, r8
jne 0x1400ecf70
mov dword [rsi + 0x28], ecx
mov dword [rsi + 0x20], eax
mov dword [rsi + 0x24], edx
jmp 0x1400ed0d7
mov qword [rsi + 0x30], rax
xor ebx, ebx
jmp 0x1400ecff6
mov rbx, qword [rsp + 0x38]
sub r15, rbx
jb 0x1400ed34a
mov qword [rsi + 0x18], r15
sub qword [rsi + 0x30], rbx
cmp rbx, r12
ja 0x1400ed34a
lea r13, [rsi + 0x98]
movzx r12d, byte [rsi + 0xd8]
mov eax, 0x40
sub rax, r12
mov r15, rbx
sub r15, rax
jae 0x1400ed02c
lea rcx, [r12 + r13]
mov rdx, r14
mov r8, rbx
call sub.msvcrt.dll_memcpy
add r12, rbx
jmp 0x1400ed0ad
mov qword [rsp + 0x28], r13
mov r8, rbx
mov r13, r14
test r12, r12
je 0x1400ed06f
lea r13, [r14 + rax]
mov rbp, qword [rsp + 0x28]
add r12, rbp
mov rcx, r12
mov rdx, r14
mov r8, rax
call sub.msvcrt.dll_memcpy
inc qword [rsi + 0x38]
lea rcx, [rsi + 0x40]
mov r8d, 1
mov rdx, rbp
call fcn.14007df10
mov r8, r15
mov rbp, r8
and rbp, 0xffffffffffffffc0
mov r12d, r8d
and r12d, 0x3f
add rbp, r13
cmp r8, 0x40
jb 0x1400ed09a
shr r8, 6
add qword [rsi + 0x38], r8
lea rcx, [rsi + 0x40]
mov rdx, r13
call fcn.14007df10
mov r13, qword [rsp + 0x28]
mov rcx, r13
mov rdx, rbp
mov r8, r12
call sub.msvcrt.dll_memcpy
mov byte [rsi + 0xd8], r12b
mov rcx, qword [rsi + 0x20]
mov rax, qword [rsi + 0x28]
mov rdx, r14
mov r8, rbx
call qword [rax + 0x18]
cmp qword [rsi + 0x30], 0
je 0x1400ed0eb
mov qword [rdi + 8], rbx
mov qword [rdi], 0
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x28], r13
cmp byte [rsi + 0xe0], 0
jne 0x1400ed34a
lea rax, [rsi + 0x38]
mov qword [rsp + 0x80], rax
mov byte [rsi + 0xe0], 1
mov word [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov rbp, qword [rsi + 8]
mov rax, qword [rsi + 0x10]
mov qword [rsp + 0x98], rax
mov r15, qword [rsi + 0x18]
mov r12d, 0xa
lea r13, [rsp + 0x50]
jmp 0x1400ed155
cmp byte [r14 + 0x10], 0x23
jne 0x1400ed341
test r12, r12
je 0x1400ed26c
test r15, r15
je 0x1400ed260
cmp r12, r15
mov r9, r15
cmovb r9, r12
lea rcx, [rsp + 0x30]
mov rdx, rbp
mov r8, r13
mov rax, qword [rsp + 0x98]
call qword [rax + 0x18]
cmp qword [rsp + 0x30], 0
je case.default.0x1400ed1a3
mov r14, qword [rsp + 0x38]
mov eax, r14d
and eax, 3
lea rcx, [0x1401bdf70]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
mov rax, qword [rsp + 0x38]
sub r15, rax
jb 0x1400ed34a
mov qword [rsi + 0x18], r15
test rax, rax
je 0x1400ed260
sub r12, rax
jb 0x1400ed34a
add r13, rax
jmp 0x1400ed14c
lea r14, str.hj__
jmp 0x1400ed341
xorps xmm0, xmm0
movaps xmmword [rsp + 0xa0], xmm0
mov dword [rsp + 0xb0], 0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x70], 0
lea r8, [rsp + 0x60]
mov rcx, qword [rsp + 0x80]
mov r15, qword [rsp + 0x28]
mov rdx, r15
call fcn.1400eccc0
mov rax, qword [rsi + 0x58]
mov ecx, dword [rsi + 0x70]
mov dword [rsp + 0x48], ecx
movups xmm0, xmmword [rsi + 0x60]
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x70]
mov dword [r15 + 0x10], eax
movaps xmm0, xmmword [rsp + 0x60]
movups xmmword [r15], xmm0
mov byte [rsi + 0xd8], 0x14
lea rcx, [rsp + 0x30]
lea r14, [rsp + 0xa0]
mov rdx, r15
mov r8, r14
call fcn.1400eccc0
mov rax, qword [rsi + 0x78]
mov qword [rsi + 0x38], rax
movups xmm0, xmmword [rsi + 0x80]
movups xmmword [rsi + 0x40], xmm0
mov eax, dword [rsi + 0x90]
mov dword [rsi + 0x50], eax
mov byte [rsi + 0xd8], 0
lea rdx, [rsp + 0x50]
mov rcx, r14
call fcn.14000bb80
test al, al
je 0x1400ed0cc
lea rdx, [0x1402163d6]
mov r8d, 0x5b
mov cl, 0x15
call fcn.1400eddf0
mov r14, rax
mov qword [rdi + 8], r14
jmp 0x1400ecf07
ud2