Function at 0x140020310
Capabilities:
Get disk information via ioctl

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r15
sub rsp, 0x150
mov rax, qword [0x14005d338]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rdi, qword [rsp + 0x1a0]
mov r15, rcx
mov qword [rsp + 0x58], rcx
mov rbx, r8
mov rcx, qword [rsp + 0x1c8]
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x80], r9
mov qword [rsp + 0x78], rdx
mov qword [rcx], 0xffffffffffffffff
mov rcx, rdx
mov qword [rsp + 0x50], rdi
call qword [sym.imp.VBoxRT.dll_RTDvmMapGetValidVolumes]
xor esi, esi
lea r9, [rsp + 0x70]
mov r8d, eax
mov dword [rsp + 0x64], eax
mov rdx, rbx
mov qword [rsp + 0x70], rsi
mov rcx, r15
mov ebp, eax
call fcn.14001fdf0
test eax, eax
js 0x1400207e6
mov qword [rsp + 0x148], r12
lea rbx, [rsi - 1]
mov qword [rsp + 0x140], r13
mov r12d, esi
mov r13d, dword [rsp + 0x1b0]
mov qword [rsp + 0x138], r14
lea r14d, [rsi + 1]
test ebp, ebp
je 0x140020717
mov r15, qword [rsp + 0x70]
lea rbp, [r15 + 0x28]
nop dword [rax]
mov rcx, qword [rsp + 0x78]
mov qword [rsp + 0x68], 0xffffffffffffffff
test r12d, r12d
jne 0x140020400
lea rdx, [rsp + 0x68]
call qword [sym.imp.VBoxRT.dll_RTDvmMapQueryFirstVolume]
jmp 0x14002040e
lea r8, [rsp + 0x68]
mov rdx, rbx
call qword [sym.imp.VBoxRT.dll_RTDvmMapQueryNextVolume]
mov edx, eax
test eax, eax
js 0x1400206c4
mov rcx, rbx
call qword [sym.imp.VBoxRT.dll_RTDvmVolumeRelease]
mov rbx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x88]
mov rcx, rbx
mov qword [rsp + 0x98], rbx
mov qword [rax], rbx
call qword [sym.imp.VBoxRT.dll_RTDvmVolumeGetSize]
mov qword [rbp - 8], rax
lea r8, [rsp + 0x90]
mov eax, r12d
mov rcx, rbx
mov qword [rsp + 0x90], rsi
lea rdi, [rax + rax*2]
shl rdi, 4
add rdi, r15
mov qword [rsp + 0xa0], rdi
lea rdx, [rdi + 0x18]
call qword [sym.imp.VBoxRT.dll_RTDvmVolumeQueryRange]
mov edx, eax
test eax, eax
js 0x140020695
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.VBoxRT.dll_RTDvmVolumeGetIndex]
mov r15d, eax
cmp eax, 0x20
jae 0x14002066c
mov ecx, eax
mov edx, r14d
shl edx, cl
test dword [rsp + 0x1b0], edx
je 0x14002066c
btr r13d, eax
test dword [rsp + 0x1b8], edx
je 0x1400204c0
or dword [rbp], 2
cmp byte [rsp + 0x1c0], sil
jne 0x140020510
mov rax, qword [rbp - 0x10]
lea rdx, str.D:_tinderboxawin_7.0_srcVBoxStorageVMDK.cpp
mov rdi, qword [rsp + 0x50]
mov rcx, rdi
mov qword [rbp - 0x18], rax
call qword [sym.imp.VBoxRT.dll_RTStrDupTag]
mov qword [rbp - 0x28], rax
cmp rax, 0x1000
jb 0x140020506
movabs rcx, 0xffff800000000000
test rcx, rax
je 0x140020679
mov eax, 0xffffffc0
jmp 0x1400207ce
mov rcx, qword [rsp + 0x80]
xor eax, eax
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0xb0], eax
mov qword [rbp - 0x18], rsi
mov dword [rsp + 0x60], esi
call qword [sym.imp.VBoxRT.dll_RTFileToNative]
mov qword [rsp + 0x38], rsi
xor r9d, r9d
mov rcx, rax
xor r8d, r8d
lea rax, [rsp + 0x60]
mov edx, 0x2d1080
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xa8]
mov dword [rsp + 0x28], 0xc
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x14002058f
mov r8d, dword [rsp + 0xac]
lea rdx, str..Harddisk_uPartition_u
mov r9d, r15d
mov rcx, rdi
call fcn.1400253f0
jmp 0x14002060d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdi, qword [rsp + 0x58]
mov ebx, eax
mov rdi, qword [rdi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call qword [sym.imp.VBoxRT.dll_RTErrConvertFromWin32]
mov rcx, qword [rsp + 0x50]
lea r8, str.D:_tinderboxawin_7.0_srcVBoxStorageVMDK.cpp
mov dword [rsp + 0x40], ebx
mov edx, eax
mov rax, qword [rsp + 0x58]
mov r9d, 0x11a4
mov qword [rsp + 0x38], rcx
lea rcx, str.VMDK:_Image_path:__s._IOCTL_STORAGE_GET_DEVICE_NUMBER_failed_on__s:__u
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rcx
lea rcx, str.int___cdecl_vmdkRawDescWinMakePartitionName_struct_VMDKIMAGE__const_char__struct_RTFILEINT__unsigned_int_char__
mov qword [rsp + 0x20], rcx
mov rcx, qword [rax + 0x20]
call fcn.140015a10
test eax, eax
js 0x1400207ce
mov rbx, qword [rsp + 0x98]
mov rdi, qword [rsp + 0xa0]
mov rax, qword [rbp - 0x28]
cmp rax, 0x1000
jb 0x140020506
movabs rcx, 0xffff800000000000
test rcx, rax
jne 0x140020506
mov eax, dword [rsp + 0x1a8]
mov r8d, r15d
mov r9, qword [rsp + 0x50]
mov rdx, rdi
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x20], rax
call fcn.140021140
test eax, eax
js 0x1400207ce
jmp 0x140020674
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x28], rsi
mov rdi, qword [rsp + 0x50]
inc r12d
add rbp, 0x30
cmp r12d, dword [rsp + 0x64]
jae 0x140020712
mov r15, qword [rsp + 0x70]
jmp 0x1400203e0
mov rax, qword [rsp + 0x50]
mov r9d, 0x11ea
mov rcx, qword [rsp + 0x58]
mov dword [rsp + 0x48], edx
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], r12d
mov rax, qword [rcx]
mov qword [rsp + 0x30], rax
lea rax, str.VMDK:_Image_path:__s._Failed_to_get_location_of_volume__u_on__s___Rrc_
jmp 0x1400206ec
mov rcx, qword [rsp + 0x58]
mov r9d, 0x11d9
mov dword [rsp + 0x48], edx
mov qword [rsp + 0x40], rdi
mov dword [rsp + 0x38], r12d
mov rax, qword [rcx]
mov qword [rsp + 0x30], rax
lea rax, str.VMDK:_Image_path:__s._Volume_enumeration_failed_at_volume__u_on__s___Rrc_
mov rcx, qword [rcx + 0x20]
lea r8, str.D:_tinderboxawin_7.0_srcVBoxStorageVMDK.cpp
mov qword [rsp + 0x28], rax
lea rax, str.int___cdecl_vmdkRawDescDoPartitions_struct_VMDKIMAGE__struct_RTDVMINTERNAL__struct_VDISKRAW__struct_RTFILEINT__const_char__unsigned_int_unsigned_int_unsigned_int_bool_struct_RTDVMVOLUMEINTERNAL__
mov qword [rsp + 0x20], rax
call fcn.140015a10
jmp 0x1400207ce
mov r15, qword [rsp + 0x58]
mov rcx, rbx
call qword [sym.imp.VBoxRT.dll_RTDvmVolumeRelease]
mov rax, qword [rsp + 0x88]
mov qword [rax], 0xffffffffffffffff
test r13d, r13d
je 0x1400207cc
mov ebx, esi
lea rbp, [0x14004c48c]
test r13d, r14d
je 0x140020773
test rsi, rsi
lea r8, [0x14004c490]
mov edx, 0x60
lea rcx, [rsp + 0xc0]
cmovne r8, rbp
mov r9d, ebx
sub rdx, rsi
add rcx, rsi
call qword [sym.imp.VBoxRT.dll_RTStrPrintf]
add rsi, rax
inc ebx
rol r14d, 1
cmp ebx, 0x20
jb 0x140020741
mov rcx, qword [r15 + 0x20]
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x40], rax
lea r8, str.D:_tinderboxawin_7.0_srcVBoxStorageVMDK.cpp
mov rax, qword [r15]
mov r9d, 0x125c
mov qword [rsp + 0x38], rdi
mov edx, 0xfffffffe
mov qword [rsp + 0x30], rax
lea rax, str.VMDK:_Image_path:__s._Not_all_the_specified_partitions_for_drive__s_was_found:__s
mov qword [rsp + 0x28], rax
lea rax, str.int___cdecl_vmdkRawDescDoPartitions_struct_VMDKIMAGE__struct_RTDVMINTERNAL__struct_VDISKRAW__struct_RTFILEINT__const_char__unsigned_int_unsigned_int_unsigned_int_bool_struct_RTDVMVOLUMEINTERNAL__
mov qword [rsp + 0x20], rax
call fcn.140015a10
jmp 0x1400207ce
xor eax, eax
mov r13, qword [rsp + 0x140]
mov r12, qword [rsp + 0x148]
mov r14, qword [rsp + 0x138]
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.140044190
add rsp, 0x150
pop r15
pop rdi
pop rsi
pop rbp
pop rbx
ret