Function at 0x40b4c0
Capabilities:
Get disk information
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x590
mov eax, dword [0x43d004]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [0x43e380]
push ebx
push esi
push edi
push 0x104
mov dword [ebp - 0x570], eax
mov ebx, ecx
lea eax, [ebp - 0x154]
mov dword [ebp - 0x574], ebx
push 0
push eax
mov dword [ebp - 0x564], 0
mov dword [ebp - 0x55c], 0x5c3a3f
call fcn.00418c40
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x580], eax
push 0x437e90
call fcn.0040f530
mov edi, dword [ebx + 0x10]
add esp, 4
mov edx, dword [ebx + 0x14]
mov ecx, edi
mov esi, 1
call fcn.0042c390
movsd xmm1, qword [0x43b198]
movaps xmm2, xmm0
divsd xmm2, xmm1
mov eax, edi
and eax, 0x3fffffff
or eax, 0
divsd xmm2, xmm1
divsd xmm2, xmm1
jne 0x40b566
mov eax, dword [ebx + 0x14]
shrd edi, eax, 0x1e
jmp 0x40b5a8
movsd xmm3, qword [0x43b130]
xor eax, eax
movd xmm1, esi
cvtdq2pd xmm1, xmm1
comisd xmm1, xmm2
jbe 0x40b587
movaps xmm0, xmm1
subsd xmm0, xmm2
jmp 0x40b58e
movaps xmm0, xmm2
subsd xmm0, xmm1
divsd xmm0, xmm1
comisd xmm3, xmm0
ja 0x40b5a6
inc eax
add esi, esi
cmp eax, 0xc
jl 0x40b570
cvttsd2si edi, xmm2
jmp 0x40b5a8
mov edi, esi
push edi
mov edi, dword [ebp - 0x570]
lea eax, [ebx + 0xa0]
push eax
lea eax, [ebx + 0x20]
mov ecx, 0x437b0c
push eax
push dword [ebx + 4]
test edi, edi
mov eax, 0x437b08
cmove eax, ecx
push eax
push dword [ebp + 8]
push str.InstallVentoy2PhyDrive_try_d__s_PhyDrive_d____s__s__dGB__
call fcn.0040f530
add esp, 0x1c
push 0x437e90
call fcn.0040f530
add esp, 4
test edi, edi
je 0x40b615
push 0x4400
call fcn.0041c36a
add esp, 4
mov esi, eax
mov dword [ebp - 0x580], esi
push 0x4400
push 0
push esi
call fcn.00418c40
add esp, 0xc
jmp 0x40b617
xor esi, esi
push 0
push 8
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b138]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x10]
push eax
push ecx
test edi, edi
je 0x40b6c9
mov ecx, esi
call fcn.00410820
mov eax, dword [esi + 0x420]
add esp, 8
mov edi, dword [esi + 0x428]
mov ecx, dword [esi + 0x424]
sub edi, eax
mov dword [ebp - 0x57c], eax
mov eax, dword [esi + 0x42c]
sbb eax, ecx
mov dword [ebp - 0x578], ecx
add edi, 1
mov dword [ebp - 0x584], edi
mov edi, dword [esi + 0x4a0]
adc eax, 0
mov dword [ebp - 0x590], edi
mov edi, dword [esi + 0x4a4]
mov dword [ebp - 0x588], eax
mov dword [ebp - 0x58c], edi
jmp 0x40b71b
xor edx, edx
lea ecx, [ebp - 0x354]
call fcn.004105f0
mov eax, dword [ebp - 0x18e]
add esp, 8
mov dword [ebp - 0x57c], eax
mov eax, dword [ebp - 0x18a]
mov dword [ebp - 0x584], eax
mov eax, dword [ebp - 0x17e]
mov dword [ebp - 0x578], 0
mov dword [ebp - 0x588], 0
mov dword [ebp - 0x590], eax
mov dword [ebp - 0x58c], 0
push str.Lock_disk_for_clean_.............................
call fcn.0040f530
mov ecx, dword [ebx + 4]
mov dl, 1
push 0
call fcn.004081a0
add esp, 8
mov dword [ebp - 0x568], eax
cmp eax, 0xffffffff
jne 0x40b76b
push str.Failed_to_open_physical_disk
call fcn.0040f530
add esp, 4
push esi
call fcn.0041bffb
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00417710
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x154]
call fcn.004080f0
add esp, 4
cmp byte [ebp - 0x154], 0
jne 0x40b7d1
push str.No_drive_letter_was_assigned...
call fcn.0040f530
add esp, 4
mov byte [ebp - 0x555], 0x44
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov cl, byte [ebp - 0x555]
shr eax, 3
test al, 1
je 0x40b7b8
nop dword [eax]
shr eax, 1
inc cl
test al, 1
jne 0x40b7b0
movsx eax, cl
push eax
push str.GetFirstUnusedDriveLetter__C:_...
mov byte [ebp - 0x55c], cl
call fcn.0040f530
add esp, 8
jmp 0x40b841
lea edi, [ebp - 0x154]
lea ecx, [edi + 1]
nop word [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x40b7e0
sub edi, ecx
test edi, edi
jle 0x40b841
lea ebx, [ebp + edi - 0x155]
nop dword [eax]
nop dword [eax + eax]
mov al, byte [ebx]
mov byte [ebp - 0x55c], al
lea eax, [ebp - 0x55c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x55c]
push eax
push str.Delete_mountpoint__s_ret:_u_code:_u
call fcn.0040f530
dec edi
lea ebx, [ebx - 1]
add esp, 0x10
test edi, edi
jg 0x40b800
mov ebx, dword [ebp - 0x574]
mov al, byte [ebp - 0x55c]
mov byte [ebp - 0x555], al
movsx eax, al
push eax
push str.Will_use__C:_as_volume_mountpoint
call fcn.0040f530
mov esi, dword [ebp - 0x568]
lea eax, [ebp - 0x560]
add esp, 8
push 0
push eax
push 0
push 0
push 0
push 0
push 0x9001c
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 9
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b140]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov edi, dword [ebx + 4]
mov ecx, 1
push 0
push 0
push 0x402bc0
mov edx, edi
call fcn.00402600
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 edi
push str.VDS_DeleteAllPartitions__d_ret:_d___s_
call fcn.0040f530
add esp, 0x10
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x40b926
call esi
push eax
push str.Notice:_Could_not_delete_partitions:_0x_x__but_we_continue.
call fcn.0040f530
add esp, 8
push str.Deleting_all_partitions_........................._OK
call fcn.0040f530
add esp, 4
push 0
push 0xa
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b148]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Lock_disk_for_write_.............................
call fcn.0040f530
mov ecx, dword [ebx + 4]
mov dl, 1
push 1
call fcn.004081a0
mov edi, eax
add esp, 8
mov dword [ebp - 0x574], edi
cmp edi, 0xffffffff
jne 0x40b9bd
push str.Failed_to_GetPhysicalHandle_for_write.
call fcn.0040f530
add esp, 4
mov dword [ebp - 0x564], 1
jmp 0x40be30
push 0
lea eax, [ebp - 0x560]
push eax
push 0
push 0
push 0
push 0
push 0x70140
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov eax, dword [ebp - 0x584]
add eax, dword [ebp - 0x57c]
mov ecx, dword [ebp - 0x588]
adc ecx, dword [ebp - 0x578]
push 0
push 0xb
push 0x402
push dword [0x43fc40]
mov dword [0x43fce8], edi
mov dword [0x43fce0], eax
mov dword [0x43fce4], ecx
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b150]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
cmp dword [ebp - 0x570], 1
jne 0x40ba72
cmp dword [ebx + 8], 0
jne 0x40ba72
push str.Wait_for_format_part1_...
call fcn.0040f530
add esp, 4
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.Formatting_part1_exFAT_...
call fcn.0040f530
add esp, 4
push dword [ebx + 0x14]
push dword [ebx + 0x10]
call fcn.00409e50
add esp, 8
test eax, eax
je 0x40baad
push str.FormatPart1exFAT_failed.
call fcn.0040f530
add esp, 4
mov dword [ebp - 0x564], 1
jmp 0x40be30
push 0
push 0xc
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b158]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Writing_part2_FAT_img_...
call fcn.0040f530
add esp, 4
mov ecx, edi
push dword [ebp - 0x58c]
push dword [ebp - 0x590]
call fcn.004096c0
add esp, 8
test eax, eax
je 0x40bb38
push str.FormatPart2Fat_failed.
call fcn.0040f530
add esp, 4
mov dword [ebp - 0x564], 1
jmp 0x40be30
push 0
push 0x2e
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b178]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Writing_Boot_Image_.............................
call fcn.0040f530
mov edx, dword [ebp - 0x570]
add esp, 4
mov ecx, edi
call fcn.00409d20
test eax, eax
je 0x40bbba
push str.WriteGrubStage1ToPhyDrive_failed.
call fcn.0040f530
add esp, 4
mov dword [ebp - 0x564], 1
jmp 0x40be30
push 0
push 0x2f
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b180]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
push str.Writing_Partition_Table_........................
call fcn.0040f530
add esp, 4
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x570], 0
push 0
je 0x40bdad
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 0x56c]
mov eax, dword [ebx + 0x14]
sub ecx, 0x200
push edx
sbb eax, 0
mov dword [ebp - 0x56c], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x568], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov esi, dword [ebp - 0x580]
lea edx, [ebp - 0x554]
mov ecx, esi
call fcn.00410b80
push 0
lea eax, [ebp - 0x560]
push eax
push 0x200
lea eax, [ebp - 0x554]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40bcb7
mov dword [ebp - 0x564], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x560]
push str.Write_GPT_Backup_Head_Failed__dwSize:_u___u__ErrCode:_u
call fcn.0040f530
add esp, 0x10
jmp 0x40be30
mov ecx, dword [ebx + 0x10]
lea edx, [ebp - 0x56c]
mov eax, dword [ebx + 0x14]
sub ecx, 0x4200
push 0
push edx
sbb eax, 0
mov dword [ebp - 0x56c], ecx
push eax
push ecx
push edi
mov dword [ebp - 0x568], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x560]
push eax
push 0x4000
lea eax, [esi + 0x400]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40bd32
mov dword [ebp - 0x564], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x560]
push str.Write_GPT_Backup_Part_Table_Failed__dwSize:_u___u__ErrCode:_u
call fcn.0040f530
add esp, 0x10
jmp 0x40be30
push 0
lea eax, [ebp - 0x56c]
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0x56c], xmm0
push dword [ebp - 0x568]
push dword [ebp - 0x56c]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x560]
push eax
push 0x4400
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40bda1
mov dword [ebp - 0x564], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4400
push dword [ebp - 0x560]
push str.Write_GPT_Info_Failed__dwSize:_u___u__ErrCode:_u
call fcn.0040f530
add esp, 0x10
jmp 0x40be30
push str.Write_GPT_Info_OK_...
call fcn.0040f530
jmp 0x40bdfd
lea eax, [ebp - 0x560]
push eax
push 0x200
lea eax, [ebp - 0x354]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40bded
mov dword [ebp - 0x564], 1
call esi
push eax
push dword [ebp - 0x560]
push str.Write_MBR_Failed__dwSize:_u_ErrCode:_u
call fcn.0040f530
add esp, 0xc
jmp 0x40be30
push str.Write_MBR_OK_...
call fcn.0040f530
lea esi, [ebp - 0x354]
add esp, 4
lea eax, [ebp - 0x560]
mov ecx, 0x80
lea edi, [ebx + 0x288]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x574]
push 0
push eax
push 0
push 0
push 0
push 0
push 0x70140
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0
push 0x30
push 0x402
push dword [0x43fc40]
call dword [sym.imp.USER32.dll_SendMessageW]
movsd xmm0, qword [0x43b188]
lea eax, [ebp - 0x4c]
sub esp, 8
movsd qword [esp], xmm0
push str.Status____.0lf__
push 0x40
push eax
call fcn.00401010
add esp, 0x14
lea eax, [ebp - 0x4c]
push eax
push dword [0x43fc48]
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov esi, dword [ebp - 0x564]
test esi, esi
jne 0x40bfe1
push str.Mounting_Ventoy_Partition_.......................
call fcn.0040f530
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x104
xor edi, edi
lea eax, [ebp - 0x154]
push edi
push eax
call fcn.00418c40
mov ecx, dword [ebx + 4]
lea edx, [ebp - 0x154]
add esp, 8
call fcn.004080f0
add esp, 4
lea eax, [ebp - 0x154]
push eax
push str.Logical_drive_letter_after_write_ventoy:___s_
call fcn.0040f530
add esp, 8
nop word [eax + eax]
mov cl, byte [ebp + esi - 0x154]
test cl, cl
je 0x40bf38
mov byte [ebp - 0x55c], cl
call fcn.00410440
test eax, eax
lea eax, [ebp - 0x55c]
push eax
je 0x40bf1d
push str._s_is_ventoy_part2__delete_mountpoint
call fcn.0040f530
add esp, 8
lea eax, [ebp - 0x55c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteVolumeMountPointA]
jmp 0x40bf2f
push str._s_is_ventoy_part1__already_mounted
call fcn.0040f530
add esp, 8
mov edi, 1
inc esi
cmp esi, 0x104
jb 0x40bee0
cmp edi, 1
mov edi, dword [ebp - 0x574]
je 0x40bfcc
push str.need_to_mount_ventoy_part1...
call fcn.0040f530
add esp, 4
lea edx, [ebp - 0x154]
push 0
push ecx
push dword [ebp - 0x578]
mov ecx, dword [ebx + 4]
push dword [ebp - 0x57c]
call fcn.00407e90
add esp, 0x10
test eax, eax
jne 0x40bfbf
mov al, byte [ebp - 0x555]
mov byte [ebp - 0x55c], al
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x55c]
push eax
call dword [sym.imp.KERNEL32.dll_SetVolumeMountPointA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x154]
push eax
lea eax, [ebp - 0x55c]
push eax
push str.SetVolumeMountPoint___s____s__bRet:_u_code:_u
call fcn.0040f530
add esp, 0x14
jmp 0x40bfcc
push str.Failed_to_find_ventoy_volume
call fcn.0040f530
add esp, 4
push 0x437b04
call fcn.0040f530
mov esi, dword [ebp - 0x564]
add esp, 4
jmp 0x40bfe8
mov edx, ebx
call fcn.0040e890
mov eax, dword [ebp - 0x580]
test eax, eax
je 0x40bffb
push eax
call fcn.0041bffb
add esp, 4
cmp edi, 0xffffffff
je 0x40c007
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00417710
mov esp, ebp
pop ebp
ret