Function at 0x404f50
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
mov esi, ecx
push 0x3fe
push eax
mov word [ebp - 0x408], ax
lea eax, [ebp - 0x406]
push eax
call fcn.004126f0
add esp, 0xc
push esi
push str.VentoyMountISOByAPI___s_
call fcn.004044f0
add esp, 8
xor eax, eax
mov cl, byte [esi + eax]
test cl, cl
je 0x404fae
cmp cl, 0x7f
ja 0x405077
inc eax
cmp eax, 0x104
jl 0x404f96
push str.This_is_ANSI_encoding
call fcn.004044f0
mov ecx, esi
add esp, 4
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404fc0
push 0x200
lea eax, [ebp - 0x408]
sub ecx, edx
push eax
push ecx
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x42c], xmm0
mov dword [ebp - 0x430], 0
xor edi, edi
movdqu xmmword [ebp - 0x440], xmm0
mov dword [ebp - 0x414], 0
movq qword [ebp - 0x41c], xmm0
mov dword [ebp - 0x42c], 1
lea eax, [ebp - 0x444]
push eax
lea eax, [ebp - 0x42c]
push eax
push 0
push 0xd0000
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x440]
push eax
call dword [sym.imp.VirtDisk.dll_OpenVirtualDisk]
mov esi, eax
cmp esi, 2
je 0x405057
cmp esi, 3
jne 0x4050b3
push esi
push str.OpenVirtualDisk_ErrorCode:_u__now_wait_and_retry...
call fcn.004044f0
add esp, 8
push 0x3e8
call ebx
inc edi
cmp edi, 0xa
jl 0x405022
jmp 0x4050ff
push str.This_is_UTF8_encoding
call fcn.004044f0
mov ecx, esi
add esp, 4
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405090
push 0x200
lea eax, [ebp - 0x408]
sub ecx, edx
push eax
push ecx
push esi
push 0
push 0xfde9
jmp 0x404fdb
test esi, esi
jne 0x4050c6
push str.OpenVirtualDisk_success
call fcn.004044f0
add esp, 4
jmp 0x405107
cmp esi, 0xc03a0014
jne 0x4050f1
push str.VirtualDisk_for_ISO_file_is_not_supported_in_current_system
call fcn.004044f0
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b2c4
mov esp, ebp
pop ebp
ret
push esi
push str.Failed_to_open_virtual_disk_ErrorCode:_u
call fcn.004044f0
add esp, 8
test esi, esi
jne 0x40519d
push str.OpenVirtualDisk_success
call fcn.004044f0
mov esi, dword [ebp - 0x444]
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
test eax, 0x1000000
je 0x40512e
push str.Y:_is_occupied
jmp 0x405133
push str.Y:_is_free_now
call fcn.004044f0
add esp, 4
push str.VentoyMountAnywhere
call fcn.004044f0
add esp, 4
lea eax, [ebp - 0x410]
xorps xmm0, xmm0
movq qword [ebp - 0x410], xmm0
mov dword [ebp - 0x410], 1
push 0
push eax
push 0
push 5
push 0
push esi
call dword [sym.imp.VirtDisk.dll_AttachVirtualDisk]
test eax, eax
je 0x4051b3
push eax
push str.Failed_to_attach_virtual_disk_ErrorCode:_u
call fcn.004044f0
push 1
push str.Failed_to_attach_virtual_disk_ErrorCode:_u
call fcn.004044f0
add esp, 0x10
push dword [ebp - 0x444]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040b2c4
mov esp, ebp
pop ebp
ret
push str.VentoyAttachVirtualDisk_success
call fcn.004044f0
add esp, 4
push dword [ebp - 0x444]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040b2c4
mov esp, ebp
pop ebp
ret