Function at 0x415640
Capabilities:
Check mutex on windows
Delete file
Get common file path
Get file size
Identify system language via api
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x934
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x934], eax
xor ebx, ebx
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x930], eax
xor esi, esi
call fcn.004338fc
cmp dword [eax], ebx
jle 0x4156ad
call fcn.00433902
mov eax, dword [eax]
cmp dword [eax + esi*4], ebx
je 0x41569b
call fcn.00433902
push 0x450840
mov eax, dword [eax]
push dword [eax + esi*4]
call fcn.00433941
add esp, 8
test eax, eax
je 0x4156a7
inc esi
call fcn.004338fc
cmp esi, dword [eax]
jl 0x415674
jmp 0x4156ad
mov dword [0x454e08], ebx
push 0x44c7d8
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 0x4156da
push 0x800
call eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
cmp ax, cx
jne 0x4156fb
mov dword [0x45d1cc], 1
mov eax, 0x454a9c
jmp 0x415706
mov dword [0x45d1cc], ebx
mov eax, 0x454a60
push str.PlugsonMUTEX
push 1
push 0
mov dword [0x455b6c], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
test eax, eax
je 0x415756
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x415756
mov eax, dword [0x455b6c]
push 0x10
push dword [eax]
push dword [eax + 0x34]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x310]
push eax
push 0x104
call esi
lea eax, [ebp - 0x720]
push eax
push 0x104
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x518]
push 0x104
push eax
push 0
call esi
push 0x104
lea eax, [ebp - 0x928]
push eax
push 0
call esi
xor esi, esi
lea eax, [ebp - 0x518]
xor edx, edx
movzx ecx, word [eax]
test cx, cx
je 0x4157c8
cmp ecx, 0x5c
je 0x4157ba
cmp ecx, 0x2f
jne 0x4157bc
mov esi, eax
inc edx
add eax, 2
cmp edx, 0x104
jl 0x4157a8
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test esi, esi
je 0x41583a
xor eax, eax
lea ecx, [ebp - 0x518]
mov word [esi], ax
lea eax, [ebp - 0x310]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41580a
test dx, dx
je 0x415806
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41580a
add eax, 4
add ecx, 4
test dx, dx
jne 0x4157e4
xor eax, eax
jmp 0x41580f
sbb eax, eax
or eax, 1
test eax, eax
je 0x415835
lea eax, [ebp - 0x518]
mov ebx, 1
push eax
call edi
lea eax, [ebp - 0x310]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x41583a
mov ebx, 2
lea eax, [ebp - 0x310]
push str._altexe
push eax
call fcn.00424f17
add esp, 8
test eax, eax
je 0x415863
xor ecx, ecx
or ebx, 4
mov word [eax], cx
lea eax, [ebp - 0x310]
push eax
call edi
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x310]
push 0
push 0
push 0x104
push 0x45cf00
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call edi
push 0x45cf00
push 0x44c068
push 0x104
push 0x45cde0
call fcn.00401100
push str.VentoyPlugson.log
push 0x44c068
push 0x104
push 0x45d020
call fcn.00401100
add esp, 0x20
push 0
push 0
push 3
push 0
push 0
push 0
push 0x45d020
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x92c], eax
cmp eax, 0xffffffff
je 0x41590a
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp - 0x92c]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, 0x100000
jl 0x41590a
push 0x45d020
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push str._Ventoy_Plugson__n
push 1
mov dword [0x455bac], eax
call fcn.00401a20
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004252d0
add esp, 0x14
lea eax, [ebp - 0x108]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x720]
push eax
push 0
push 0xfde9
call edi
lea eax, [ebp - 0x108]
push eax
push str.Current_Directory___s__n
push 1
call fcn.00401a20
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004252d0
add esp, 0x18
lea eax, [ebp - 0x108]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x928]
push eax
push 0
push 0xfde9
call edi
lea eax, [ebp - 0x108]
push eax
push str.Exe_file_path___s__n
push 1
call fcn.00401a20
add esp, 0xc
test bl, 1
je 0x415a13
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004252d0
add esp, 0xc
lea eax, [ebp - 0x108]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x518]
push eax
push 0
push 0xfde9
call edi
lea eax, [ebp - 0x108]
push eax
push str.Change_current_dir_to_exe___s__n
push 1
call fcn.00401a20
add esp, 0xc
test bl, 2
je 0x415a27
push str.Current_directory_check_OK._n
push 1
call fcn.00401a20
add esp, 8
test bl, 4
je 0x415a7a
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.004252d0
add esp, 0xc
lea eax, [ebp - 0x108]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x310]
push eax
push 0
push 0xfde9
call edi
lea eax, [ebp - 0x108]
push eax
push str.altexe_detected__change_current_dir_to___s__n
push 1
call fcn.00401a20
add esp, 0xc
push str.plugson.tar.xz
push 0x45cde0
push str._s_ventoy_s
call fcn.004023e0
add esp, 0xc
test eax, eax
jne 0x415ac1
mov eax, dword [0x455b6c]
push 0x10
push dword [eax]
push dword [eax + 0x38]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret 0x10
mov ebx, dword [ebp - 0x930]
mov edi, 0x45d39c
test ebx, ebx
je 0x415b77
push 0x4507f8
push ebx
call fcn.004249d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x415afc
push 0x4507fc
push ebx
call fcn.004249d0
mov esi, eax
add esp, 8
test esi, esi
je 0x415b31
add esi, 2
nop
mov al, byte [esi]
cmp al, 0x20
je 0x415b0a
cmp al, 9
jne 0x415b10
inc esi
jmp 0x415b00
movsx eax, al
push eax
call fcn.00429820
add esp, 4
test eax, eax
jne 0x415b25
cmp byte [esi], 0x2e
jne 0x415b31
movzx eax, byte [esi]
mov byte [edi], al
inc edi
mov al, byte [esi + 1]
inc esi
jmp 0x415b10
push 0x450800
push ebx
call fcn.004249d0
add esp, 8
test eax, eax
jne 0x415b55
push 0x450804
push ebx
call fcn.004249d0
add esp, 8
test eax, eax
je 0x415b77
push 0xa
add eax, 3
push 0
push eax
call fcn.00426c43
push eax
push 0x44e0b0
push 0x10
push 0x45d3bc
call fcn.00401100
add esp, 0x1c
cmp byte [0x45d39c], 0
jne 0x415b94
push str.127.0.0.1
push 0x20
push 0x45d39c
call fcn.0042939d
add esp, 0xc
cmp byte [0x45d3bc], 0
jne 0x415bb1
push str.24681
push 0x10
push 0x45d3bc
call fcn.0042939d
add esp, 0xc
push str._n
push 1
call fcn.00401a20
push 0x45d3bc
push 0x45d39c
push str._Ventoy_Plugson__s:_s__n
push 1
call fcn.00401a20
push str._n
push 1
call fcn.00401a20
add esp, 0x20
call section..text
call fcn.00401d90
test eax, eax
je 0x415c70
push str.Failed_to_init_www_n
push 1
call fcn.00401a20
mov eax, dword [0x455b6c]
add esp, 8
push 0x10
push dword [eax]
push dword [eax + 0x14]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push str.ventoy_disk_exit_..._n
push 1
call fcn.00401a20
mov eax, dword [0x455b60]
add esp, 8
test eax, eax
je 0x415c38
push eax
call fcn.00425f00
add esp, 4
push dword [0x455bac]
mov dword [0x455b60], 0
mov dword [0x455ba8], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00423c62
mov esp, ebp
pop ebp
ret 0x10
mov ecx, str.www_menulist
call fcn.00401cc0
mov edi, eax
test edi, edi
je 0x415cdc
mov eax, 0x66666667
xor esi, esi
imul dword [edi]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x415cdc
xor ebx, ebx
nop dword [eax + eax]
mov ecx, dword [edi + 0x10c]
lea ebx, [ebx + 5]
mov eax, dword [ecx + ebx - 5]
mov dword [esi*8 + 0x4582f0], eax
mov al, byte [ecx + ebx - 1]
mov byte [esi*8 + 0x4582f4], al
mov eax, 0x66666667
mov byte [esi*8 + 0x4582f5], 0
inc esi
imul dword [edi]
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jl 0x415ca0
cmp dword [0x45c29c], 0
jne 0x415d01
push 0x1000000
call fcn.00425f1b
add esp, 4
mov dword [0x45c29c], eax
add eax, 0x800000
mov dword [0x45900c], eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push 0
push 0x4152d0
push 0
mov dword [0x458fd0], eax
mov eax, dword [ebp - 0x934]
push 0x65
push eax
mov dword [0x45cddc], eax
call dword [sym.imp.USER32.dll_DialogBoxParamA]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00423c62
mov esp, ebp
pop ebp
ret 0x10