Function at 0x1401151b0
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, 0xd8
mov r15, r9
mov r14, r8
mov rsi, rdx
mov rdi, rcx
movzx eax, byte [rdx]
test rax, rax
je 0x140115234
cmp eax, 1
jne 0x140115278
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x1401152d4
cmp r15, rbx
mov r9, rbx
cmovb r9, r15
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
mov rax, qword [rsp + 0x38]
je 0x1401152e4
mov qword [rdi + 8], rax
mov qword [rdi], 1
test r15, r15
jne 0x140115305
jmp 0x14011572b
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x1401152c9
cmp r15, rbx
cmovae r15, rbx
mov rdx, qword [rsi + 8]
mov rax, qword [rsi + 0x10]
lea rcx, [rsp + 0x30]
mov r8, r14
mov r9, r15
call qword [rax + 0x18]
cmp qword [rsp + 0x30], 0
mov rax, qword [rsp + 0x38]
je 0x140115389
mov qword [rdi + 8], rax
jmp 0x140115724
mov r9, qword [rsi + 0x30]
test r9, r9
je 0x1401152c9
mov r12, qword [rsi + 0x18]
test r12, r12
je 0x1401153a6
cmp r9, r15
cmovae r9, r15
cmp r9, r12
cmovae r9, r12
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
mov rbx, qword [rsp + 0x38]
je 0x1401153ae
mov qword [rdi + 8], rbx
jmp 0x140115724
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
jmp 0x14011572b
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
test r15, r15
jne 0x140115305
jmp 0x14011572b
sub rbx, rax
jb 0x14011573f
mov qword [rsi + 0x18], rbx
mov qword [rdi + 8], rax
mov qword [rdi], 0
test r15, r15
je 0x14011572b
mov ecx, dword [rsi + 0x28]
mov eax, dword [rsi + 0x20]
mov edx, dword [rsi + 0x24]
xor r8d, r8d
lea r9, [0x1401f2164]
nop dword [rax + rax]
mov r11d, ecx
or r11d, 3
mov r10d, r11d
and r10d, 0xfffffffe
imul r10d, r11d
shr r10d, 8
xor r10b, byte [r14 + r8]
mov r11d, eax
xor r11b, r10b
movzx r11d, r11b
shr eax, 8
xor eax, dword [r9 + r11*4]
movzx r11d, al
add r11d, edx
imul edx, r11d, 0x8088405
inc edx
mov r11d, edx
shr r11d, 0x18
movzx edi, cl
xor edi, r11d
shr ecx, 8
xor ecx, dword [r9 + rdi*4]
mov byte [r14 + r8], r10b
inc r8
cmp r15, r8
jne 0x140115320
mov dword [rsi + 0x28], ecx
mov dword [rsi + 0x20], eax
mov dword [rsi + 0x24], edx
jmp 0x14011572b
sub rbx, rax
jb 0x14011573f
mov qword [rsi + 0x18], rbx
mov qword [rdi + 8], rax
mov qword [rdi], 0
jmp 0x14011572b
mov qword [rsi + 0x30], r9
xor ebx, ebx
jmp 0x1401153c8
sub r12, rbx
jb 0x14011573f
mov qword [rsi + 0x18], r12
sub qword [rsi + 0x30], rbx
cmp rbx, r15
ja 0x14011573f
lea r13, [rsi + 0x98]
movzx r12d, byte [rsi + 0xd8]
mov eax, 0x40
sub rax, r12
mov r15, rbx
sub r15, rax
jae 0x1401153fe
lea rcx, [r12 + r13]
mov rdx, r14
mov r8, rbx
call sub.msvcrt.dll_memcpy
add r12, rbx
jmp 0x14011547f
mov qword [rsp + 0x28], r13
mov r8, rbx
mov r13, r14
test r12, r12
je 0x140115441
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.1400d68d0
mov r8, r15
mov rbp, r8
and rbp, 0xffffffffffffffc0
mov r12d, r8d
and r12d, 0x3f
add rbp, r13
cmp r8, 0x40
jb 0x14011546c
shr r8, 6
add qword [rsi + 0x38], r8
lea rcx, [rsi + 0x40]
mov rdx, r13
call fcn.1400d68d0
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 0x1401154ae
mov qword [rdi + 8], rbx
mov qword [rdi], 0
jmp 0x14011572b
mov qword [rsp + 0x28], r13
cmp byte [rsi + 0xe0], 0
jne 0x14011573f
lea rax, [rsi + 0x38]
mov qword [rsp + 0xa0], 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 + 0xb8], rax
mov r15, qword [rsi + 0x18]
mov r12d, 0xa
lea r13, [rsp + 0x50]
jmp 0x140115518
cmp byte [r14 + 0x10], 0x23
jne 0x140115720
test r12, r12
je 0x140115622
test r15, r15
je 0x140115719
cmp r12, r15
mov r9, r15
cmovb r9, r12
lea rcx, [rsp + 0x30]
mov rdx, rbp
mov r8, r13
mov rax, qword [rsp + 0xb8]
call qword [rax + 0x18]
cmp qword [rsp + 0x30], 0
mov r14, qword [rsp + 0x38]
je case.default.0x140115566
mov eax, r14d
and eax, 3
lea rcx, [0x14019d57c]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
sub r15, r14
jb 0x14011573f
mov qword [rsi + 0x18], r15
test r14, r14
je 0x140115719
sub r12, r14
jb 0x14011573f
add r13, r14
jmp 0x14011550f
xorps xmm0, xmm0
movaps xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x70], 0
movaps xmmword [rsp + 0x80], xmm0
mov dword [rsp + 0x90], 0
lea r8, [rsp + 0x80]
mov rcx, qword [rsp + 0xa0]
mov r14, qword [rsp + 0x28]
mov rdx, r14
call fcn.1401150a0
mov eax, dword [rsi + 0x70]
mov dword [rsp + 0x48], eax
movups xmm0, xmmword [rsi + 0x60]
movups xmmword [rsp + 0x38], xmm0
mov rax, qword [rsi + 0x58]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x90]
mov dword [r14 + 0x10], eax
movaps xmm0, xmmword [rsp + 0x80]
movups xmmword [r14], xmm0
mov byte [rsi + 0xd8], 0x14
lea rcx, [rsp + 0x30]
lea r8, [rsp + 0x60]
mov rdx, r14
call fcn.1401150a0
mov eax, dword [rsi + 0x90]
mov dword [rsi + 0x50], eax
movups xmm0, xmmword [rsi + 0x80]
movups xmmword [rsi + 0x40], xmm0
mov rax, qword [rsi + 0x78]
mov qword [rsi + 0x38], rax
mov byte [rsi + 0xd8], 0
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0xd0], eax
movaps xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0xc0], xmm0
lea rcx, [rsp + 0xc0]
lea rdx, [rsp + 0x50]
call fcn.140011720
test al, al
je 0x14011549e
lea rdx, str.Invalid_authentication_code__this_could_be_due_to_an_invalid_password_or_errors_in_the_dataCompression_method_not_supportedInvalid_AES_encryption_strengthInvalid_AES_vendor_versionInvalid_AES_vendorAES_extra_data_field_has_an_unsupported_lengthInvalid_checksum
mov r8d, 0x5b
mov cl, 0x15
call fcn.140116170
jmp 0x14011526f
lea r14, [0x1401f2580]
mov qword [rdi + 8], r14
mov qword [rdi], 1
add rsp, 0xd8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2