Function at 0x4042f0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xf8
movdqa xmmword [rsp + 0xe0], xmm6
mov r14, rdx
mov r13, rcx
cmp byte [rdx + 0xc9], 0
je 0x40461d
mov rax, qword [r14 + 0xa8]
lea r10, [rax - 1]
sub rax, 1
jb 0x404e6e
mov r15, qword [r14 + 0x98]
imul r12, rax, 0xb0
mov rbp, qword [r15 + r12 + 0x48]
cmp rbp, 0xffff
jbe 0x404369
lea rdx, [0x0094f244]
mov r8d, 0x1e
mov cl, 0x15
call fcn.005ec6e0
jmp 0x4048b7
test rbp, rbp
je 0x404605
mov rax, qword [r15 + r12 + 0x38]
mov rcx, rbp
cmp rcx, 3
jbe 0x404cc7
movzx r8d, word [rax]
mov word [rsp + 0x46], r8w
cmp r8w, 1
je 0x404cdb
cmp r8w, 0x20
jb 0x4047f0
movzx edx, word [rax + 2]
movzx r8d, r8w
cmp r8d, 0x4c40
jg 0x404408
cmp r8d, 0x2704
jle 0x404457
cmp r8d, 0x4452
jle 0x4044b1
cmp r8d, 0x4703
jle 0x404562
cmp r8d, 0x4704
je 0x4047f0
cmp r8d, 0x470f
je 0x4047f0
cmp r8d, 0x4b46
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x7074
jg 0x404474
cmp r8d, 0x5454
jle 0x4044dd
cmp r8d, 0x5854
jle 0x40457d
cmp r8d, 0x5855
je 0x4047f0
cmp r8d, 0x6375
je 0x4047f0
cmp r8d, 0x6542
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x64
jg 0x404509
add r8d, 0xffffffe0
cmp r8d, 4
jb 0x4047f0
jmp 0x4045e8
cmp r8d, 0x9900
jle 0x404536
cmp r8d, 0xa21f
jg 0x404598
lea r9d, [r8 - 0x9901]
cmp r9d, 2
jb 0x4047f0
cmp r8d, 0xa11e
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x334c
jg 0x4045b3
cmp r8d, 0x2705
je 0x4047f0
cmp r8d, 0x2805
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x4f4b
jg 0x4045ce
cmp r8d, 0x4c41
je 0x4047f0
cmp r8d, 0x4d49
jne 0x4045e8
jmp 0x4047f0
lea r9d, [r8 - 0x65]
cmp r9d, 2
jb 0x4047f0
cmp r8d, 0x7c8
je 0x4047f0
cmp r8d, 0x2605
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x7075
je 0x4047f0
cmp r8d, 0x756e
je 0x4047f0
cmp r8d, 0x7855
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x4453
je 0x4047f0
cmp r8d, 0x4690
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x5455
je 0x4047f0
cmp r8d, 0x554e
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0xa220
je 0x4047f0
cmp r8d, 0xfd4a
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x334d
je 0x4047f0
cmp r8d, 0x4341
jne 0x4045e8
jmp 0x4047f0
cmp r8d, 0x4f4c
je 0x4047f0
cmp r8d, 0x5356
je 0x4047f0
add rcx, 0xfffffffffffffffc
cmp rcx, rdx
jb 0x404d28
add rax, 4
add rax, rdx
sub rcx, rdx
jne 0x40437a
cmp byte [r14 + 0xca], 0
je 0x40496c
mov word [r14 + 0xc9], 0
lea rbx, [rsp + 0x50]
mov rcx, rbx
mov rdx, r14
xor r8d, r8d
xor r9d, r9d
call fcn.00403060
mov rax, qword [rsp + 0x50]
cmp rax, 4
jne 0x4047db
mov rax, qword [r14]
mov rsi, qword [r14 + 8]
mov rdi, qword [r14 + 0x10]
mov rbp, qword [r14 + 0x18]
mov rcx, r14
mov r14, qword [r14 + 0x20]
mov r12, qword [rcx + 0x28]
mov r15, qword [rcx + 0x30]
movdqu xmm6, xmmword [rcx + 0x38]
mov qword [rsp + 0x28], rcx
mov qword [rcx], 2
cmp rax, 3
jne 0x404e88
test rsi, rsi
je 0x4048ca
cmp r15, 0xb
jbe 0x404e58
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r13
mov rax, qword [rsp + 0x28]
movzx eax, byte [rax + 0x7f]
mov byte [r14 + 0xb], al
movd eax, xmm6
pshufd xmm0, xmm6, 0x55
movd ecx, xmm0
pshufd xmm0, xmm6, 0xee
movd edx, xmm0
xor r8d, r8d
lea r9, [0x0094ed88]
nop word cs:[rax + rax]
movzx r10d, byte [r14 + r8]
mov r12d, edx
or r12d, 3
mov r11d, r12d
and r11d, 0xfffffffe
imul r11d, r12d
mov r12d, eax
xor r12b, r10b
movzx r12d, r12b
shr eax, 8
xor eax, dword [r9 + r12*4]
movzx r12d, al
add r12d, ecx
imul ecx, r12d, 0x8088405
inc ecx
mov r12d, ecx
shr r12d, 0x18
movzx r13d, dl
xor r13d, r12d
shr r11d, 8
shr edx, 8
xor edx, dword [r9 + r13*4]
xor r11b, r10b
mov byte [r14 + r8], r11b
inc r8
cmp r15, r8
jne 0x4046d0
mov r12, r14
nop word cs:[rax + rax]
cmp rbp, rdi
mov rcx, rdi
cmovb rcx, rbp
mov r13, rdi
sub r13, rcx
add rcx, rsi
cmp r15, r13
cmovb r13, r15
mov rdx, r12
mov r8, r13
call sub.msvcrt.dll_memcpy
test r13, r13
je 0x40491e
add rbp, r13
add r12, r13
sub r15, r13
jne 0x404740
cmp qword [rsp + 0x38], 0
mov r13, qword [rsp + 0x30]
je 0x404797
mov rcx, qword [0x009bf100]
xor edx, edx
mov r8, r14
call sub.KERNEL32.dll_HeapFree
test rsi, rsi
je 0x40495b
mov r14, qword [rsp + 0x28]
mov rcx, r14
call fcn.00407940
mov qword [r14], 3
mov qword [r14 + 8], 0
mov qword [r14 + 0x10], rsi
mov qword [r14 + 0x18], rdi
mov qword [r14 + 0x20], rbp
cmp byte [r14 + 0xcb], 0
jne 0x40490c
jmp 0x40493d
movdqu xmm0, xmmword [rsp + 0x58]
movdqu xmmword [r13 + 8], xmm0
mov qword [r13], rax
jmp 0x404e18
lea rax, [rsp + 0x46]
mov qword [rsp + 0x88], rax
lea rax, [0x00453300]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x50], 2
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 6
mov qword [rsp + 0x70], 0
movabs rax, 0xc00000020
mov qword [rsp + 0x78], rax
mov byte [rsp + 0x80], 3
lea rax, [0x0094f208]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], 2
lea rax, [rsp + 0x50]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], 1
lea rax, [rsp + 0x88]
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0xb0], 1
lea rdi, [rsp + 0xc8]
lea rdx, [rsp + 0x98]
mov rcx, rdi
call fcn.0044e7f0
mov rcx, rdi
call fcn.005ec5e0
xor ecx, ecx
mov qword [r13], rcx
mov qword [r13 + 8], rax
mov qword [r13 + 0x10], rdx
jmp 0x404e18
mov rsi, qword [rsp + 0x28]
mov rcx, rsi
call fcn.00407940
mov qword [rsi], 3
mov qword [rsi + 8], 0
mov qword [rsi + 0x10], rdi
mov qword [rsi + 0x18], rbp
mov qword [rsi + 0x20], r14
mov r14, rsi
mov qword [rsi + 0x28], r12
mov qword [rsi + 0x30], r15
movdqu xmmword [rsi + 0x38], xmm6
cmp byte [r14 + 0xcb], 0
je 0x40493d
mov byte [r14 + 0xc8], 0
mov byte [r14 + 0xcb], 0
jmp 0x40494e
xor esi, esi
lea rdi, str.failed_to_write_whole_buffer
cmp qword [rsp + 0x38], 0
mov r13, qword [rsp + 0x30]
jne 0x404786
jmp 0x404797
mov rax, qword [r14 + 0xa8]
sub rax, 1
jae 0x404a16
mov qword [r13], 4
jmp 0x404e18
mov qword [r13], 0
mov qword [r13 + 8], rdi
jmp 0x404e18
cmp dword [r14], 3
jne 0x404ea2
cmp qword [r14 + 8], 0
jne 0x404ea2
mov qword [rsp + 0x30], r13
lea rcx, [r15 + r12]
add rcx, 0x48
xor edx, edx
test rbp, rbp
mov qword [rsp + 0x28], r14
je 0x404bb7
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x38], r10
mov rbx, qword [r15 + r12 + 0x38]
mov rsi, qword [r14 + 0x10]
mov r13, qword [r14 + 0x18]
mov rdi, qword [r14 + 0x20]
nop dword [rax]
cmp rdi, r13
mov rcx, r13
cmovb rcx, rdi
mov r14, r13
sub r14, rcx
add rcx, rsi
cmp rbp, r14
cmovb r14, rbp
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add rdi, r14
test r14, r14
je 0x404cab
add rbx, r14
sub rbp, r14
jne 0x4049c0
mov r14, qword [rsp + 0x28]
mov qword [r14 + 0x20], rdi
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
mov r10, qword [rsp + 0x38]
xor edx, edx
jmp 0x404bb9
mov qword [rsp + 0x30], r13
mov rdi, qword [r14 + 0x98]
mov ecx, dword [r14 + 0x7c]
imul r13, rax, 0xb0
mov dword [rdi + r13 + 0x9c], ecx
mov rax, qword [r14 + 0x90]
lea rcx, [rdi + r13]
add rcx, 0x78
mov qword [rsp + 0x38], rcx
mov qword [rdi + r13 + 0x78], rax
mov rax, qword [r14 + 0x20]
mov qword [rsp + 0x48], rax
sub rax, qword [r14 + 0x88]
mov qword [rdi + r13 + 0x70], rax
mov r12, qword [rdi + r13 + 0x80]
add r12, 0xe
mov qword [r14 + 0x20], r12
mov eax, dword [rdi + r13 + 0x9c]
mov dword [rsp + 0x50], eax
mov rbp, qword [r14 + 0x10]
mov r15, qword [r14 + 0x18]
mov esi, 4
nop dword [rax]
cmp r12, r15
mov rcx, r15
cmovb rcx, r12
mov r14, r15
sub r14, rcx
add rcx, rbp
cmp rsi, r14
cmovb r14, rsi
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add r12, r14
test r14, r14
je 0x404df7
add rbx, r14
sub rsi, r14
jne 0x404a90
mov rdx, qword [rsp + 0x28]
mov qword [rdx + 0x20], r12
cmp byte [rdi + r13 + 0xa8], 0
je 0x404cef
mov rsi, qword [rsp + 0x38]
mov rax, qword [rsi + 8]
mov rcx, qword [rdi + r13 + 0x18]
lea rdi, [rax + rcx]
add rdi, 0x22
mov qword [rdx + 0x20], rdi
mov rax, qword [rsi]
mov qword [rsp + 0x50], rax
mov r12, qword [rdx + 0x10]
mov r13, qword [rdx + 0x18]
mov r15d, 8
lea rbx, [rsp + 0x50]
cmp rdi, r13
mov rcx, r13
cmovb rcx, rdi
mov r14, r13
sub r14, rcx
add rcx, r12
cmp r15, r14
cmovb r14, r15
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add rdi, r14
test r14, r14
je 0x404d1a
add rbx, r14
sub r15, r14
jne 0x404b16
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x20], rdi
mov rax, qword [rsi - 8]
mov qword [rsp + 0x50], rax
mov rsi, qword [rcx + 0x10]
mov r12, qword [rcx + 0x18]
mov r15d, 8
lea rbx, [rsp + 0x50]
mov r13, qword [rsp + 0x30]
cmp rdi, r12
mov rcx, r12
cmovb rcx, rdi
mov r14, r12
sub r14, rcx
add rcx, rsi
cmp r15, r14
cmovb r14, r15
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add rdi, r14
test r14, r14
je 0x404e34
add rbx, r14
sub r15, r14
jne 0x404b79
jmp 0x404de4
xor eax, eax
imul r8, r10, 0xb0
add r8, r15
mov qword [rsp + 0x48], r8
add rax, qword [r15 + r12 + 0x90]
mov qword [r14 + 0x88], rax
mov qword [rsp + 0x38], rax
mov qword [r15 + r12 + 0x90], rax
mov rdi, qword [r15 + r12 + 0x80]
add rdi, 0x1c
cmp byte [r15 + r12 + 0xa8], 0
mov eax, 0x14
cmove eax, edx
add ax, word [rcx]
mov qword [r14 + 0x20], rdi
mov word [rsp + 0x50], ax
mov rsi, qword [r14 + 0x10]
mov r13, qword [r14 + 0x18]
mov ebp, 2
lea rbx, [rsp + 0x50]
nop
cmp rdi, r13
mov rcx, r13
cmovb rcx, rdi
mov r14, r13
sub r14, rcx
add rcx, rsi
cmp rbp, r14
cmovb r14, rbp
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add rdi, r14
test r14, r14
je 0x404cab
add rbx, r14
sub rbp, r14
jne 0x404c20
mov r14, qword [rsp + 0x28]
mov rax, qword [rsp + 0x38]
mov qword [r14 + 0x20], rax
movzx r8d, word [r15 + r12 + 0x98]
mov rax, qword [rsp + 0x48]
mov r9d, dword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x50]
mov rdx, r14
call fcn.00403060
mov rcx, qword [rsp + 0x50]
cmp rcx, 4
mov r13, qword [rsp + 0x30]
je 0x404613
mov rax, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
jmp 0x4048b9
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], rdi
lea rax, str.failed_to_write_whole_buffer
xor ecx, ecx
mov r13, qword [rsp + 0x30]
jmp 0x4048b9
lea rdx, str.Incomplete_extra_data_headerExtra_data_exceeds_extra_field
mov r8d, 0x1c
mov cl, 0x27
jmp 0x40435f
lea rdx, [0x0094f188]
mov r8d, 0x22
mov cl, 0x27
jmp 0x40435f
mov rsi, qword [rsp + 0x38]
mov rax, qword [rsi - 8]
mov rcx, rax
shr rcx, 0x20
je 0x404d3c
lea rdx, str.Large_file_option_has_not_been_setShould_have_switched_to_stored_and_unencrypted_beforehand
mov r8d, 0x22
mov cl, 0x27
call fcn.00579ef0
jmp 0x404e07
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], rdi
jmp 0x404e00
lea rdx, [0x0094f1aa]
mov r8d, 0x23
mov cl, 0x27
jmp 0x40435f
mov dword [rsp + 0x50], eax
mov rdi, qword [rdx + 0x10]
mov r13, qword [rdx + 0x18]
mov r15d, 4
lea rbx, [rsp + 0x50]
cmp r12, r13
mov rcx, r13
cmovb rcx, r12
mov r14, r13
sub r14, rcx
add rcx, rdi
cmp r15, r14
cmovb r14, r15
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add r12, r14
test r14, r14
je 0x404df7
add rbx, r14
sub r15, r14
jne 0x404d53
mov rcx, qword [rsp + 0x28]
mov qword [rcx + 0x20], r12
mov eax, dword [rsi]
mov dword [rsp + 0x50], eax
mov rsi, qword [rcx + 0x10]
mov rdi, qword [rcx + 0x18]
mov r15d, 4
lea rbx, [rsp + 0x50]
mov r13, qword [rsp + 0x30]
cmp r12, rdi
mov rcx, rdi
cmovb rcx, r12
mov r14, rdi
sub r14, rcx
add rcx, rsi
cmp r15, r14
cmovb r14, r15
mov rdx, rbx
mov r8, r14
call sub.msvcrt.dll_memcpy
add r12, r14
test r14, r14
je 0x404e46
add rbx, r14
sub r15, r14
jne 0x404daf
mov r14, qword [rsp + 0x28]
mov rax, qword [rsp + 0x48]
mov qword [r14 + 0x20], rax
jmp 0x40490c
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], r12
lea rax, str.failed_to_write_whole_buffer
mov r13, qword [rsp + 0x30]
mov qword [r13], 0
mov qword [r13 + 8], rax
movaps xmm6, xmmword [rsp + 0xe0]
add rsp, 0xf8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], rdi
lea rax, str.failed_to_write_whole_buffer
jmp 0x404e0c
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], r12
lea rax, str.failed_to_write_whole_buffer
jmp 0x404e0c
lea r8, [0x0090ea10]
mov ecx, 0xb
mov rdx, r15
call fcn.0044f190
ud2
lea rcx, str.called__Option::unwrap____on_a__None__value_root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_untrusted_0.9.0_src_reader.rsinternal_error:_entered_unreachable_code_root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_rustls_webpki_0.101.7_src_calendar.rs
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_zip_0.6.6_src_write.rs
mov edx, 0x2b
call fcn.0044fe30
ud2
lea rcx, [0x0094e82b]
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_zip_0.6.6_src_write.rs
mov edx, 0x28
call fcn.0044fe30
ud2
lea rax, [0x00875b70]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
lea rax, str.called__Result::unwrap____on_an__Err__value
mov qword [rsp + 0x60], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
lea rdx, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_zip_0.6.6_src_write.rs
lea rcx, [rsp + 0x50]
call fcn.0044f0d0
ud2