Function at 0x418310
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov eax, dword [0x448004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, ecx
push edi
push str.cli_percent.txt
mov dword [ebp - 0x8c], edx
mov edi, 1
call esi
push str.cli_done.txt
call esi
push 0x4950
call fcn.0042442e
mov esi, eax
add esp, 4
mov dword [0x44af4c], esi
test esi, esi
je 0x418687
push 0x4950
push 0
push esi
call fcn.00420f90
mov edx, dword [ebp - 0x8c]
lea eax, [ebp - 0xa4]
add esp, 0xc
mov ecx, ebx
push eax
push esi
call fcn.00417e10
add esp, 8
test eax, eax
jne 0x41867e
cmp dword [ebp - 0xa4], eax
jne 0x4185aa
cmp dword [ebp - 0x98], eax
je 0x4183be
cmp dword [esi + 0x220], 7
je 0x4183be
push dword [esi + 4]
push str._ERROR__PhyDrive__d_is_NOT_USB_type
jmp 0x418676
cmp dword [ebp - 0x94], 0
je 0x418438
push str.Ventoy_CLI_NonDestInstall_start_...
call fcn.00414ac0
add esp, 4
cmp dword [esi + 0x224], 0x1000
jne 0x4183fb
cmp dword [esi + 0x228], 0x1000
jne 0x4183fb
push str.Ventoy_does_not_support_4k_native_disk.
call fcn.00414ac0
add esp, 4
jmp 0x41841e
xor ecx, ecx
call fcn.0041afe0
test eax, eax
jne 0x418415
push str._Part_Resize_PreCheck_Failed_
call fcn.00414ac0
add esp, 4
jmp 0x41841e
mov ecx, esi
call fcn.00411600
mov edi, eax
test edi, edi
mov eax, str.SUCCESS
mov ecx, str.FAILED
cmovne eax, ecx
push eax
push str.Ventoy_CLI_NonDestInstall___s_
jmp 0x418676
call fcn.00401ae0
push str.Ventoy_CLI_Install_start_...
mov dword [0x4499a0], edi
call fcn.00414ac0
add esp, 4
cmp dword [esi + 0x224], 0x1000
jne 0x41847a
cmp dword [esi + 0x228], 0x1000
jne 0x41847a
push str.Ventoy_does_not_support_4k_native_disk.
call fcn.00414ac0
add esp, 4
jmp 0x418590
mov eax, dword [ebp - 0x9c]
test eax, eax
jle 0x418499
mov dword [0x44ac00], edi
mov dword [0x4488c4], 0
mov dword [0x4488c8], eax
mov eax, dword [ebp - 0x90]
mov ecx, esi
mov ebx, dword [ebp - 0xa0]
mov edx, ebx
push 1
mov dword [0x44abe0], eax
mov dword [0x44ae08], eax
call fcn.00410600
mov edi, eax
add esp, 4
test edi, edi
je 0x41857c
push str.This_time_install_failed__clean_disk_by_disk__wait_3s_and_retry...
call fcn.00414ac0
mov ecx, dword [esi + 4]
add esp, 4
call fcn.00401b40
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.Now_retry_to_install...
call fcn.00414ac0
add esp, 4
mov edx, ebx
mov ecx, esi
push 2
call fcn.00410600
mov edi, eax
add esp, 4
test edi, edi
je 0x41857c
push str.This_time_install_failed__clean_disk_by_diskpart__wait_5s_and_retry...
call fcn.00414ac0
mov edi, dword [esi + 4]
add esp, 4
push edi
push str.CleanDiskByDiskpart___d_
call fcn.00414ac0
add esp, 8
call fcn.00402380
test eax, eax
je 0x418554
push edi
push str.select_disk__d_r_nclean_r_n
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.00401010
add esp, 0x10
lea ecx, [ebp - 0x88]
call fcn.004023f0
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.Now_retry_to_install...
call fcn.00414ac0
add esp, 4
mov edx, ebx
mov ecx, esi
push 3
call fcn.00410600
add esp, 4
mov edi, eax
mov dword [0x44abe0], 0
mov dword [0x44ae08], 0
test edi, edi
mov eax, str.SUCCESS
mov ecx, str.FAILED
cmovne eax, ecx
push eax
push str.Ventoy_CLI_Install___s_
jmp 0x418676
cmp byte [esi + 0x280], 0
jne 0x4185c0
push dword [esi + 4]
push str._ERROR__No_Ventoy_information_detected_in_PhyDrive__d__so_can_not_do_update
jmp 0x418676
push str.Ventoy_CLI_Update_start_...
call fcn.00414ac0
add esp, 4
mov edx, edi
mov ecx, esi
call fcn.00412350
mov edi, eax
test edi, edi
je 0x418661
push str.This_time_update_failed__now_wait_and_retry...
call fcn.00414ac0
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 4
push 0xfa0
call ebx
push str.Now_retry_to_update...
call fcn.00414ac0
add esp, 4
mov edx, 2
mov ecx, esi
call fcn.00412350
mov edi, eax
test edi, edi
je 0x418661
push 0x3e8
call ebx
push str.Now_retry_to_update...
call fcn.00414ac0
add esp, 4
mov edx, 3
mov ecx, esi
call fcn.00412350
mov edi, eax
test edi, edi
je 0x418661
push 0xbb8
call ebx
push str.Now_retry_to_update...
call fcn.00414ac0
add esp, 4
mov edx, 4
mov ecx, esi
call fcn.00412350
mov edi, eax
test edi, edi
mov eax, str.SUCCESS
mov ecx, str.FAILED
cmovne eax, ecx
push eax
push str.Ventoy_CLI_Update___s_
call fcn.00414ac0
add esp, 8
push esi
call fcn.0042422d
add esp, 4
mov ecx, 0x42
call fcn.00418260
push 0x4441e0
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0
push str.cli_done.txt
push eax
call fcn.0042528c
mov eax, dword [ebp - 0x8c]
add esp, 0xc
test eax, eax
je 0x4186e9
push eax
push 2
push 1
test edi, edi
jne 0x4186ce
push 0x444204
jmp 0x4186d3
push 0x444208
call fcn.004246d7
add esp, 0x10
push dword [ebp - 0x8c]
call fcn.00425151
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret