Function at 0x41cc40
Capabilities:
Get common file path
Read .ini file
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x644
mov eax, dword [0x448004]
xor eax, esp
mov dword [esp + 0x640], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], str.boot_boot.img
mov dword [esp + 0x18], str.bootcore.img.xz
mov dword [esp + 0x1c], str.ventoy_ventoy.disk.img.xz
mov dword [esp + 0x20], str.ventoy_version
mov dword [esp + 0x24], 0
mov dword [0x44af04], 1
call fcn.004261ea
mov esi, 1
cmp dword [eax], esi
jle 0x41ccdc
call fcn.004261f0
mov eax, dword [eax]
cmp dword [eax + 4], 0
je 0x41ccdc
call fcn.004261f0
push str.VTOYCLI
mov eax, dword [eax]
push dword [eax + 4]
call fcn.0042622f
mov ecx, dword [0x449410]
add esp, 8
test eax, eax
cmove ecx, esi
mov dword [0x449410], ecx
push 0x442cc3
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryA]
push str.SetDefaultDllDirectories
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41cd09
push 0x800
call eax
cmp dword [0x449410], 0
mov ecx, 0x442cc3
mov eax, str.CLI_MODE
cmove eax, ecx
push eax
push 0x44427c
push str._n_n_Ventoy2Disk_s__s__n
call fcn.00414ac0
add esp, 0xc
lea eax, [esp + 0x238]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x104
lea eax, [esp + 0x444]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x104
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.00420f90
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x34]
add esp, 0xc
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x24c]
push eax
push 0
push 0xfde9
call esi
lea eax, [esp + 0x28]
push eax
push str.Current_Directory___s_
call fcn.00414ac0
push 0x104
lea eax, [esp + 0x34]
push 0
push eax
call fcn.00420f90
add esp, 0x14
lea eax, [esp + 0x28]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x454]
push eax
push 0
push 0xfde9
call esi
lea eax, [esp + 0x28]
push eax
push str.Exe_file_path___s_
call fcn.00414ac0
add esp, 8
lea eax, [esp + 0x440]
xor esi, esi
xor edx, edx
movzx ecx, word [eax]
test cx, cx
je 0x41ce14
cmp ecx, 0x5c
je 0x41ce06
cmp ecx, 0x2f
jne 0x41ce08
mov esi, eax
inc edx
add eax, 2
cmp edx, 0x104
jl 0x41cdf4
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
je 0x41cedd
xor eax, eax
lea ecx, [esp + 0x440]
mov word [esi], ax
lea eax, [esp + 0x238]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41ce5b
test dx, dx
je 0x41ce57
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41ce5b
add eax, 4
add ecx, 4
test dx, dx
jne 0x41ce35
xor eax, eax
jmp 0x41ce60
sbb eax, eax
or eax, 1
test eax, eax
je 0x41ced0
push 0x104
lea eax, [esp + 0x2c]
push 0
push eax
call fcn.00420f90
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x34]
add esp, 0xc
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x454]
push eax
push 0
push 0xfde9
call esi
lea eax, [esp + 0x28]
push eax
push str.Change_current_dir_to_exe___s_
call fcn.00414ac0
add esp, 8
lea eax, [esp + 0x440]
push eax
call edi
lea eax, [esp + 0x238]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x41cee3
push str.Current_directory_check_OK.
call fcn.00414ac0
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x238]
push str._altexe
push eax
call fcn.00420692
add esp, 8
test eax, eax
je 0x41cf51
xor ecx, ecx
push 0x104
mov word [eax], cx
lea eax, [esp + 0x2c]
push ecx
push eax
call fcn.00420f90
add esp, 0xc
lea eax, [esp + 0x28]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x24c]
push eax
push 0
push 0xfde9
call esi
lea eax, [esp + 0x28]
push eax
push str.altexe_detected__change_current_dir_to___s_
call fcn.00414ac0
add esp, 8
lea eax, [esp + 0x238]
push eax
call edi
cmp dword [0x449410], 0
mov ecx, str.log.txt
mov eax, str.cli_log.txt
mov dword [0x44af04], 0
cmove eax, ecx
mov dword [esp + 0xc], 0
push 0x442c24
push eax
lea eax, [esp + 0x14]
push eax
call fcn.0042528c
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
je 0x41cfda
mov esi, dword [0x44aefc]
test esi, esi
je 0x41cfd1
nop dword [eax]
push eax
push dword [esi]
lea eax, [esi + 4]
push 1
push eax
call fcn.004246d7
push dword [esp + 0x1c]
push 1
push 1
push 0x442c3c
call fcn.004246d7
mov esi, dword [esi + 0x404]
add esp, 0x20
mov eax, dword [esp + 0xc]
test esi, esi
jne 0x41cfa0
push eax
call fcn.00425151
add esp, 4
mov eax, dword [0x44aefc]
test eax, eax
je 0x41cff8
mov esi, dword [eax + 0x404]
push eax
call fcn.0042422d
add esp, 4
mov eax, esi
test esi, esi
jne 0x41cfe3
mov dword [0x44af00], 0
xor edi, edi
mov dword [0x44aefc], 0
mov esi, str.boot_boot.img
push esi
push 0x43be74
push 0
call fcn.00414c60
add esp, 0xc
test eax, eax
je 0x41d490
mov esi, dword [esp + edi*4 + 0x18]
inc edi
test esi, esi
jne 0x41d013
push 0x104
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.00420f90
add esp, 0xc
lea eax, [esp + 0x28]
push esi
push esi
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x24c]
push eax
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x28]
push eax
push str.Current_directory:__s_
call fcn.00414ac0
call fcn.00414dd0
push eax
push 0x44427c
push str._Current_Ventoy_Version:_Ventoy2Disk_s__s_
call fcn.00414ac0
add esp, 0x14
cmp dword [0x449410], esi
je 0x41d121
call fcn.00415510
push 0x44af90
push str.Windows_Version:___Windows__s__
call fcn.00414ac0
add esp, 8
call fcn.004261f0
mov esi, dword [eax]
call fcn.004261ea
mov edx, esi
mov ecx, dword [eax]
call fcn.00418310
test eax, eax
je 0x41d0f8
mov eax, str._ERROR___Ventoy_CLI_FAILED_
mov esi, 1
push eax
call fcn.00414ac0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret 0x10
mov eax, str._Ventoy_CLI_SUCCESS_
xor esi, esi
push eax
call fcn.00414ac0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret 0x10
call fcn.0041c8c0
test eax, eax
je 0x41d146
mov eax, 0x32
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret 0x10
test ebx, ebx
je 0x41d15d
cmp byte [ebx], 0
je 0x41d15d
push ebx
push str.CmdLine:__s_
call fcn.00414ac0
add esp, 8
xor esi, esi
call fcn.004261ea
cmp dword [eax], esi
jle 0x41d235
nop dword [eax]
call fcn.004261f0
push 2
push 0x443748
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.00424440
add esp, 0xc
test eax, eax
je 0x41d21d
call fcn.004261f0
push 2
push 0x44374c
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.00424440
add esp, 0xc
test eax, eax
je 0x41d21d
call fcn.004261f0
push 2
push 0x443750
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.00424440
add esp, 0xc
test eax, eax
jne 0x41d1d7
mov dword [0x4488b4], 1
jmp 0x41d227
call fcn.004261f0
push 2
push 0x443754
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.00424440
add esp, 0xc
test eax, eax
je 0x41d211
call fcn.004261f0
push 2
push 0x443758
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.00424440
add esp, 0xc
test eax, eax
jne 0x41d227
mov dword [0x44940c], 1
jmp 0x41d227
mov dword [0x4488b8], 0
inc esi
call fcn.004261ea
cmp esi, dword [eax]
jl 0x41d170
lea eax, [esp + 0x130]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.Ventoy2Disk.ini
lea eax, [esp + 0x134]
push 0x104
push eax
call fcn.00424248
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea eax, [esp + 0x13c]
add esp, 0xc
push eax
push 1
push 0x443608
push str.Filter
call esi
neg eax
sbb eax, eax
and dword [0x4488b8], eax
lea eax, [esp + 0x130]
push eax
push 0
push str.Force
push str.Operation
call esi
mov ecx, dword [0x4488b4]
mov edi, 1
push edi
push dword [0x4488b8]
cmp eax, 1
push dword [0x4493fc]
cmove ecx, edi
push str.Control_Flag:__d__d__d
mov dword [0x4488b4], ecx
call fcn.00414ac0
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0x10
push 0x444280
push 0
push str.PartStyle
push 0x43bf44
call esi
mov ecx, dword [0x449424]
cmp eax, edi
push 0x444280
push 0
push str.ShowAllDevice
cmove ecx, edi
push 0x43bf44
mov dword [0x449424], ecx
call esi
push 0x444280
dec eax
push 0
neg eax
push str.MainPartFs
sbb eax, eax
and dword [0x4488b8], eax
push 0x43bf44
call esi
cmp eax, edi
je 0x41d338
cmp eax, 2
je 0x41d338
cmp eax, 3
jne 0x41d350
push eax
push str.Set_Ventoy_FS_Type__d
mov dword [0x44abe0], eax
mov dword [0x44ae08], eax
call fcn.00414ac0
add esp, 8
push 0x444280
push 0xffffffffffffffff
push str.ClusterSize
push 0x43bf44
call esi
mov esi, eax
test esi, esi
js 0x41d3d5
mov ecx, 2
mov edx, 0x43bc94
lea edi, [ecx + 2]
cmp dword [edx - 4], esi
jne 0x41d388
lea eax, [ecx - 2]
mov dword [0x44abdc], eax
mov dword [0x44abf8], eax
cmp dword [edx], esi
jne 0x41d399
lea eax, [ecx - 1]
mov dword [0x44abdc], eax
mov dword [0x44abf8], eax
cmp dword [edx + 4], esi
jne 0x41d3aa
mov dword [0x44abdc], ecx
mov dword [0x44abf8], ecx
cmp dword [edx + 8], esi
jne 0x41d3bc
lea eax, [ecx + 1]
mov dword [0x44abdc], eax
mov dword [0x44abf8], eax
add ecx, 4
add edx, 0x10
sub edi, 1
jne 0x41d376
push esi
push str.Set_Ventoy_FS_ClusterSize__d
call fcn.00414ac0
add esp, 8
call fcn.00415510
push 0x44af90
push str.Windows_Version:___Windows__s__
call fcn.00414ac0
push str._n_Enum_All_PhyDrives_
call fcn.00414ac0
add esp, 0xc
push 0x24a800
call fcn.0042442e
add esp, 4
mov dword [0x449400], eax
test eax, eax
jne 0x41d41b
push str.Failed_to_alloc_phy_drive_memory
call fcn.00414ac0
add esp, 4
jmp 0x41d43a
push 0x24a800
push 0
push eax
call fcn.00420f90
add esp, 0xc
call fcn.0040d1c0
call fcn.004170b0
call fcn.00416e00
mov eax, dword [esp + 0x10]
push 0
push 0x41c280
push 0
push 0x6e
push eax
mov dword [0x44b65c], eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
push dword [0x449400]
call fcn.0042422d
add esp, 4
mov dword [0x449400], 0
mov dword [0x449404], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret 0x10
mov edi, 0x32
push esi
push str._File___s__not_found__did_you_download_it_from_official_website___
call fcn.00414ac0
add esp, 8
sub edi, 1
jne 0x41d495
push str.grubgrub.cfg
push edi
call fcn.00414c60
add esp, 8
push 0x10
push str.Error
test eax, eax
je 0x41d4c8
push str.Dont_run_me_here__please_use_the_released_install_package.
jmp 0x41d4cd
push str.Please_run_under_the_correct_directory_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [esp + 0x64c]
mov eax, 0x490
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041fa5e
mov esp, ebp
pop ebp
ret 0x10