Function at 0x416540
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x334
mov eax, dword [0x43f004]
xor eax, esp
mov dword [esp + 0x330], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push 0x43aa8f
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], str.boot_boot.img
mov dword [esp + 0x1c], str.bootcore.img.xz
mov dword [esp + 0x20], str.ventoy_ventoy.disk.img.xz
mov dword [esp + 0x24], str.ventoy_version
mov dword [esp + 0x28], 0
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 0x4165bc
push 0x800
call eax
lea eax, [esp + 0x130]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [esp + 0x130]
push str._altexe
push eax
call fcn.00419ad2
add esp, 8
test eax, eax
je 0x4165fb
xor ecx, ecx
mov word [eax], cx
lea eax, [esp + 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor edi, edi
mov esi, str.boot_boot.img
push esi
push 0x438480
push 0
call fcn.004100f0
add esp, 0xc
test eax, eax
je 0x4168f5
mov esi, dword [esp + edi*4 + 0x18]
inc edi
test esi, esi
jne 0x416602
call fcn.00410260
push eax
push 0x43bb54
push str._n_n_Ventoy2Disk_s___s___n
call fcn.0040ffe0
add esp, 0xc
lea eax, [esp + 0x130]
push eax
push str.Current_directory:__s_
call fcn.0040ffe0
add esp, 8
call fcn.004161d0
test eax, eax
je 0x416673
lea eax, [esi + 0x32]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.00418e9d
mov esp, ebp
pop ebp
ret 0x10
test ebx, ebx
je 0x41668a
cmp byte [ebx], 0
je 0x41668a
push ebx
push str.CmdLine:__s_
call fcn.0040ffe0
add esp, 8
xor esi, esi
call fcn.0041f4ee
cmp dword [eax], esi
jle 0x416765
nop dword [eax]
call fcn.0041f4f4
push 2
push 0x43b524
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.0041d810
add esp, 0xc
test eax, eax
je 0x41674d
call fcn.0041f4f4
push 2
push 0x43b528
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.0041d810
add esp, 0xc
test eax, eax
je 0x41674d
call fcn.0041f4f4
push 2
push 0x43b52c
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.0041d810
add esp, 0xc
test eax, eax
jne 0x416707
mov dword [0x43f8b4], 1
jmp 0x416757
call fcn.0041f4f4
push 2
push 0x43b530
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.0041d810
add esp, 0xc
test eax, eax
je 0x416741
call fcn.0041f4f4
push 2
push 0x43b534
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.0041d810
add esp, 0xc
test eax, eax
jne 0x416757
mov dword [0x4403ec], 1
jmp 0x416757
mov dword [0x43f8b8], 0
inc esi
call fcn.0041f4ee
cmp esi, dword [eax]
jl 0x4166a0
lea eax, [esp + 0x28]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push str.Ventoy2Disk.ini
lea eax, [esp + 0x2c]
push 0x104
push eax
call fcn.0041f14b
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea eax, [esp + 0x34]
add esp, 0xc
push eax
push 1
push 0x43b3e4
push str.Filter
call esi
neg eax
sbb eax, eax
and dword [0x43f8b8], eax
lea eax, [esp + 0x28]
push eax
push 0
push str.Force
push str.Operation
call esi
mov ecx, dword [0x43f8b4]
mov edi, 1
push edi
push dword [0x43f8b8]
cmp eax, edi
push dword [0x4403dc]
cmove ecx, edi
push str.Control_Flag:__d__d__d
mov dword [0x43f8b4], ecx
call fcn.0040ffe0
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0x10
push 0x43bb58
push 0
push str.PartStyle
push 0x4382fc
call esi
mov ecx, dword [0x440404]
cmp eax, edi
push 0x43bb58
push 0
push str.ShowAllDevice
cmove ecx, edi
push 0x4382fc
mov dword [0x440404], ecx
call esi
dec eax
neg eax
sbb eax, eax
and dword [0x43f8b8], eax
call fcn.00410990
push 0x4415c0
push str.Windows_Version:___Windows__s__
call fcn.0040ffe0
push str._n_Enum_All_PhyDrives_
call fcn.0040ffe0
add esp, 0xc
push 0x249800
call fcn.0041d7a6
add esp, 4
mov dword [0x4403e0], eax
test eax, eax
jne 0x416880
push str.Failed_to_alloc_phy_drive_memory
call fcn.0040ffe0
add esp, 4
jmp 0x41689f
push 0x249800
push 0
push eax
call fcn.0041a3d0
add esp, 0xc
call fcn.00408d50
call fcn.00412290
call fcn.00411eb0
mov eax, dword [esp + 0x10]
push 0
push 0x415e60
push 0
push 0x6e
push eax
mov dword [0x441c68], eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
push dword [0x4403e0]
call fcn.0041d78b
add esp, 4
mov dword [0x4403e0], 0
mov dword [0x4403e4], 0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x330]
xor ecx, esp
call fcn.00418e9d
mov esp, ebp
pop ebp
ret 0x10
mov edi, 0x32
nop word [eax + eax]
push esi
push str._File___s__not_found__did_you_download_it_from_official_website___
call fcn.0040ffe0
add esp, 8
sub edi, 1
jne 0x416900
push str.grubgrub.cfg
push edi
call fcn.004100f0
add esp, 8
push 0x10
push str.Error
test eax, eax
je 0x416933
push str.Dont_run_me_here__please_use_the_released_install_package.
jmp 0x416938
push str.Please_run_under_the_correct_directory_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [esp + 0x33c]
mov eax, 0x490
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00418e9d
mov esp, ebp
pop ebp
ret 0x10