Function at 0x40c020
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x584
mov eax, dword [0x43d004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x580], 0
xorps xmm0, xmm0
mov dword [ebp - 0x578], edi
push 0x437e90
movups xmmword [ebp - 0x168], xmm0
call fcn.0040f530
mov ebx, dword [edi + 0x10]
add esp, 4
mov edx, dword [edi + 0x14]
mov ecx, ebx
mov esi, 1
call fcn.0042c390
movsd xmm1, qword [0x43b198]
movaps xmm2, xmm0
divsd xmm2, xmm1
mov eax, ebx
and eax, 0x3fffffff
or eax, 0
divsd xmm2, xmm1
divsd xmm2, xmm1
jne 0x40c09d
mov eax, dword [edi + 0x14]
shrd ebx, eax, 0x1e
jmp 0x40c0e8
movsd xmm3, qword [0x43b130]
xor eax, eax
nop word [eax + eax]
movd xmm1, esi
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm2
jbe 0x40c0c7
movaps xmm0, xmm1
subsd xmm0, xmm2
jmp 0x40c0ce
movaps xmm0, xmm2
subsd xmm0, xmm1
divsd xmm0, xmm1
comisd xmm3, xmm0
ja 0x40c0e6
inc eax
add esi, esi
cmp eax, 0xc
jl 0x40c0b0
cvttsd2si ebx, xmm2
jmp 0x40c0e8
mov ebx, esi
push ebx
lea eax, [edi + 0xa0]
push eax
lea eax, [edi + 0x20]
push eax
push dword [edi + 4]
push str.PartitionResizeForVentoy_PhyDrive_d____s__s__dGB__
call fcn.0040f530
add esp, 0x14
push 0x437e90
call fcn.0040f530
mov ecx, dword [edi + 0x518]
lea ebx, [edi + 0x520]
mov eax, dword [edi + 0x51c]
add esp, 4
shld eax, ecx, 9
shl ecx, 9
push eax
push ecx
push dword [edi + 0x14]
push dword [edi + 0x10]
push str.Disksize:_llu_Part2Start:_llu
call fcn.0040f530
add esp, 0x14
cmp byte [ebx + 0x1c2], 0xee
jne 0x40c16a
cmp dword [ebx + 0x200], 0x20494645
jne 0x40c16a
cmp dword [ebx + 0x204], 0x54524150
mov dword [ebp - 0x574], 1
je 0x40c174
mov dword [ebp - 0x574], 0
push 0
push 8
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b138]
lea eax, [ebp - 0x48]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x48]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
cmp dword [0x43f3bc], 0
mov dword [ebp - 0x56c], 0x2000000
mov dword [ebp - 0x570], 0
je 0x40c1ec
cmp dword [0x43d8bc], 0
mov eax, dword [0x43d8c0]
je 0x40c1ee
shl eax, 0xa
jmp 0x40c1ee
xor eax, eax
cdq
mov esi, eax
mov eax, edx
mov dword [ebp - 0x57c], eax
test eax, eax
jl 0x40c233
jg 0x40c203
test esi, esi
je 0x40c233
push eax
push esi
push str.Reduce_add_reserved_space__lldMB
call fcn.0040f530
mov eax, dword [ebp - 0x57c]
add esp, 0xc
mov ecx, esi
add ecx, 0x20
adc eax, 0
shld eax, ecx, 0x14
shl ecx, 0x14
mov dword [ebp - 0x570], eax
mov dword [ebp - 0x56c], ecx
cmp dword [edi + 0x490], 0
jne 0x40c3bc
push str.Need_to_shrink_the_volume
call fcn.0040f530
add esp, 4
lea eax, [ebp - 0x148]
push 0x100
push 0
push eax
call fcn.00418c40
add esp, 0xc
lea eax, [edi + 0x494]
push 0x436a70
push eax
call fcn.004185b0
add esp, 8
test eax, eax
je 0x40c465
mov esi, 0xfffffffe
lea ecx, [eax + 2]
lea edx, [ebp - 0x146]
sub esi, eax
nop
mov al, byte [ecx - 2]
test al, al
je 0x40c2d2
cbw
mov word [edx - 2], ax
mov al, byte [ecx - 1]
test al, al
je 0x40c2d2
cbw
mov word [edx], ax
mov al, byte [ecx]
test al, al
je 0x40c2d2
cbw
mov word [edx + 2], ax
mov al, byte [ecx + 1]
test al, al
je 0x40c2d2
add ecx, 4
cbw
mov word [edx + 4], ax
add edx, 8
lea eax, [esi + ecx]
cmp eax, 0x80
jl 0x40c290
push dword [ebp - 0x570]
lea edx, [ebp - 0x148]
push dword [ebp - 0x56c]
push ecx
call fcn.00402210
mov esi, eax
add esp, 0xc
mov ecx, str.FAIL
test esi, esi
mov eax, str.SUCCESS
cmove eax, ecx
push eax
push esi
push str.VDS_ShrinkVolume_ret:_d___s_
call fcn.0040f530
add esp, 0xc
test esi, esi
je 0x40c465
push str.Shrink_volume_success__now_check_again
call fcn.0040f530
mov ecx, dword [edi + 4]
mov dl, 1
push 1
call fcn.004081a0
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
jne 0x40c347
push str.Failed_to_GetPhysicalHandle_for_update.
call fcn.0040f530
add esp, 4
jmp 0x40c8d8
push 0
lea eax, [ebp - 0x580]
push eax
push 0
push 0
push 0
push 0
push 0x70140
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
call fcn.00413f30
test eax, eax
je 0x40c44d
cmp dword [edi + 0x490], 0
je 0x40c44d
push str.Recheck_after_Shrink_volume_success
call fcn.0040f530
mov ecx, dword [edi + 0x518]
add esp, 4
mov eax, dword [edi + 0x51c]
shld eax, ecx, 9
push eax
shl ecx, 9
push ecx
push dword [edi + 0x14]
push dword [edi + 0x10]
push str.After_shrink_Disksize:_llu_Part2Start:_llu
call fcn.0040f530
add esp, 0x14
push ecx
mov ecx, dword [edi + 4]
mov dl, 1
push 1
call fcn.004081a0
add esp, 8
mov dword [ebp - 0x570], eax
cmp eax, 0xffffffff
je 0x40c335
push 0
push 0xc
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b158]
lea eax, [ebp - 0x48]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x48]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push dword [edi + 0x51c]
mov esi, dword [ebp - 0x570]
mov ecx, esi
push dword [edi + 0x518]
call fcn.004096c0
add esp, 8
test eax, eax
je 0x40c477
mov eax, str.FormatPart2Fat_failed.
jmp 0x40c8c3
push dword [edi + 0x490]
push str.Recheck_after_Shrink_volume_failed__u
call fcn.0040f530
add esp, 8
jmp 0x40c8d8
push str.Shrink_volume_failed
call fcn.0040f530
add esp, 4
jmp 0x40c8d8
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x2e
push 0x402
push dword [0x43fc40]
call edi
movsd xmm0, qword [0x43b178]
lea eax, [ebp - 0x48]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x48]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Writing_Boot_Image_.............................
call fcn.0040f530
mov edx, dword [ebp - 0x574]
add esp, 4
mov ecx, esi
call fcn.00409d20
test eax, eax
je 0x40c4e9
mov eax, str.WriteGrubStage1ToPhyDrive_failed.
jmp 0x40c8c3
push 0
push 0x2f
push 0x402
push dword [0x43fc40]
call edi
movsd xmm0, qword [0x43b180]
lea eax, [ebp - 0x48]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x48]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Writing_partition_table_.............................
call fcn.0040f530
add esp, 4
lea ecx, [ebp - 0x368]
call fcn.00410c00
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.ole32.dll_CoCreateGuid]
cmp dword [ebp - 0x574], 0
lea esi, [ebp - 0x368]
movups xmm0, xmmword [ebp - 0x158]
mov ecx, 0x6e
mov edi, ebx
movups xmmword [ebp - 0x1e8], xmm0
rep movsd dword es:[edi], dword [esi]
jne 0x40c64a
mov esi, 1
lea eax, [ebx + 0x1da]
cmp dword [eax], 0
je 0x40c59f
inc esi
add eax, 0x10
cmp esi, 4
jl 0x40c587
mov eax, str.Can_not_find_MBR_free_partition_table
jmp 0x40c8c3
lea eax, [esi - 1]
mov dword [ebp - 0x56c], eax
test eax, eax
jle 0x40c5e6
shl eax, 4
lea edi, [ebx + 0x1ce]
add edi, eax
lea eax, [esi + 1]
push eax
push esi
push str.Move_MBR_partition_table__d______d
call fcn.0040f530
movups xmm0, xmmword [edi - 0x10]
mov eax, dword [ebp - 0x56c]
lea edi, [edi - 0x10]
dec eax
add esp, 0xc
dec esi
mov dword [ebp - 0x56c], eax
movups xmmword [edi + 0x10], xmm0
test eax, eax
jg 0x40c5b7
mov eax, dword [ebp - 0x578]
lea esi, [ebx + 0x1ce]
push esi
mov edx, 0x10000
push dword [eax + 0x14]
mov ecx, dword [eax + 0x518]
push dword [eax + 0x10]
call fcn.004104c0
add esp, 0xc
mov byte [esi], 0
mov esi, dword [ebp - 0x570]
mov edx, ebx
mov ecx, esi
mov byte [ebx + 0x1be], 0x80
mov byte [ebx + 0x1d2], 0xef
push 0x200
push 0
push 0
call fcn.00407de0
add esp, 0xc
test eax, eax
jne 0x40c94f
mov eax, str.Legacy_BIOS_write_MBR_failed
jmp 0x40c8c3
mov eax, dword [ebp - 0x578]
mov ebx, 1
add eax, 0x9b0
mov dword [ebp - 0x57c], eax
mov edi, eax
mov ecx, edi
lea edx, [ebp - 0x168]
mov esi, 0xc
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x40c8ae
add ecx, 4
add edx, 4
sub esi, 4
jae 0x40c670
lea edi, [ebx - 1]
mov dword [ebp - 0x56c], edi
test edi, edi
jle 0x40c6ed
mov eax, dword [ebp - 0x578]
add edi, 9
shl edi, 7
add eax, 0x520
add edi, eax
mov dword [ebp - 0x574], edi
nop dword [eax + eax]
lea eax, [ebx + 1]
push eax
push ebx
push str.Move_GPT_partition_table__d______d
call fcn.0040f530
mov eax, dword [ebp - 0x56c]
lea esi, [edi - 0x80]
mov ecx, 0x20
dec eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x574]
add esp, 0xc
add edi, 0xffffff80
mov dword [ebp - 0x56c], eax
dec ebx
mov dword [ebp - 0x574], edi
test eax, eax
jg 0x40c6b0
mov ebx, dword [ebp - 0x578]
push dword [ebp - 0x57c]
add ebx, 0x520
mov byte [ebx + 0x5c], 0x22
movups xmm0, xmmword [0x43d8d0]
movups xmmword [ebx + 0x480], xmm0
call dword [sym.imp.ole32.dll_CoCreateGuid]
mov ecx, dword [ebx + 0x428]
mov eax, dword [ebx + 0x42c]
add ecx, 1
mov dword [ebx + 0x4a0], ecx
adc eax, 0
mov dword [ebx + 0x4b0], 1
mov dword [ebx + 0x4a4], eax
add ecx, 0xffff
mov dword [ebx + 0x4a8], ecx
adc eax, 0
mov dword [ebx + 0x4b4], 0xc0000000
mov dword [ebx + 0x4ac], eax
or edx, 0xffffffff
movq xmm0, qword [str.VTOYEFI]
xor edi, edi
movq qword [ebx + 0x4b8], xmm0
mov eax, dword [0x436844]
mov dword [ebx + 0x4c0], eax
mov ax, word [0x436848]
mov word [ebx + 0x4c4], ax
lea eax, [ebx + 0x400]
lea esi, [eax + 2]
movzx ecx, byte [edi + eax]
lea esi, [esi + 4]
movzx eax, dl
add edi, 4
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x432ec0]
movzx ecx, byte [esi - 5]
movzx eax, dl
xor ecx, eax
shr edx, 8
movzx eax, byte [esi - 4]
xor edx, dword [ecx*4 + 0x432ec0]
movzx ecx, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x432ec0]
movzx ecx, byte [esi - 3]
movzx eax, dl
xor ecx, eax
shr edx, 8
lea eax, [ebx + 0x400]
xor edx, dword [ecx*4 + 0x432ec0]
cmp edi, 0x4000
jb 0x40c794
mov edi, dword [ebx + 0x20c]
not edx
mov dword [ebx + 0x258], edx
xor esi, esi
or edx, 0xffffffff
test edi, edi
je 0x40c82c
nop dword [eax + eax]
movzx ecx, byte [esi + ebx + 0x200]
inc esi
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x432ec0]
cmp esi, edi
jb 0x40c810
push dword [ebx + 0x21c]
not edx
push dword [ebx + 0x218]
mov dword [ebx + 0x210], edx
push str.pGPT__Head.EfiStartLBA_llu
call fcn.0040f530
add esp, 0xc
push dword [ebx + 0x224]
push dword [ebx + 0x220]
push str.pGPT__Head.EfiBackupLBA_llu
call fcn.0040f530
add esp, 0xc
lea edx, [ebp - 0x568]
mov ecx, ebx
call fcn.00410b80
mov ecx, dword [ebx + 0x220]
lea edx, [ebp - 0x568]
mov eax, dword [ebx + 0x224]
mov esi, dword [ebp - 0x570]
shld eax, ecx, 9
push 0x200
shl ecx, 9
push eax
push ecx
mov ecx, esi
call fcn.00407de0
add esp, 0xc
test eax, eax
jne 0x40c8ee
mov eax, str.UEFI_write_backup_head_failed
jmp 0x40c8c3
inc ebx
sub edi, 0xffffff80
cmp ebx, 0x80
jl 0x40c662
mov eax, str.Can_not_find_GPT_free_partition_table
push eax
call fcn.0040f530
add esp, 4
push dword [ebp - 0x570]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x220]
lea edx, [ebx + 0x400]
mov eax, dword [ebx + 0x224]
shld eax, ecx, 9
push 0x4000
shl ecx, 9
add ecx, 0xffffc000
adc eax, 0xffffffff
push eax
push ecx
mov ecx, esi
call fcn.00407de0
add esp, 0xc
test eax, eax
jne 0x40c92c
mov eax, str.UEFI_write_backup_partition_table_failed
jmp 0x40c8c3
push 0x4400
push 0
push 0
mov edx, ebx
mov ecx, esi
call fcn.00407de0
add esp, 0xc
test eax, eax
jne 0x40c94f
mov eax, str.UEFI_write_MBR__Main_partition_table_failed
jmp 0x40c8c3
push 0
lea eax, [ebp - 0x580]
push eax
push 0
push 0
push 0
push 0
push 0x70140
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x578]
push str._Now_Refresh_PhyDrive_
mov esi, dword [eax + 4]
call fcn.0040f530
add esp, 4
push dword [0x43e360]
call fcn.0041bffb
add esp, 4
mov dword [0x43e360], 0
mov dword [0x43e364], 0
push str._n_Enum_All_PhyDrives_
call fcn.0040f530
add esp, 4
push 0x249000
call fcn.0041c36a
add esp, 4
mov dword [0x43e360], eax
test eax, eax
jne 0x40c9e8
push str.Failed_to_alloc_phy_drive_memory
call fcn.0040f530
add esp, 4
jmp 0x40ca07
push 0x249000
push 0
push eax
call fcn.00418c40
add esp, 0xc
call fcn.004085e0
call fcn.00411620
call fcn.00411240
mov edx, dword [0x43e364]
xor ecx, ecx
test edx, edx
je 0x40ca27
mov eax, dword [0x43e360]
cmp dword [eax + 4], esi
je 0x40ca54
inc ecx
add eax, 0x4920
cmp ecx, edx
jb 0x40ca18
push str._Ventoy_non_destructive_installation_successfully_finished__not_found_
call fcn.0040f530
add esp, 4
mov ecx, dword [0x43fc50]
mov edx, esi
call fcn.00412f50
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417710
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x40ca27
add eax, 0x264
cmp byte [eax], 0
jne 0x40ca74
push str.After_process_the_Ventoy_version_is_still_invalid
call fcn.0040f530
add esp, 4
jmp 0x40c8d8
push eax
push str._Ventoy_non_destructive_installation_successfully_finished___s_
call fcn.0040f530
add esp, 8
jmp 0x40ca34