Function at 0x1400ad424
Capabilities:
Get disk information
Get disk size
Get storage device properties

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x398
cmp r8d, 0x1f
ja 0x1400ad859
mov ebx, r8d
mov rsi, rcx
mov rax, qword [rdx]
mov eax, dword [rax]
bt eax, r8d
jae 0x1400ad7fb
add ebx, 0x41
lea rcx, [rsp + 0x48]
mov word [rcx], bx
mov dword [rcx + 2], 0x5c003a
and word [rcx + 6], 0
call sub.kernel32.dll_GetDriveTypeW
mov edi, eax
lea eax, [rdi - 4]
cmp eax, 0xfffffffe
jb 0x1400ad7fb
lea r14, [rsp + 0x18e]
mov r8d, 0x20a
mov rcx, r14
xor edx, edx
call sub.msvcrt.dll_memset
xorps xmm0, xmm0
lea rax, [rsp + 0x140]
movaps xmmword [rax + 0x30], xmm0
movaps xmmword [rax + 0x20], xmm0
movaps xmmword [rax + 0x10], xmm0
movaps xmmword [rax], xmm0
mov qword [rsp + 0x30], rax
movups xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x38], 0x20
lea rcx, [rsp + 0x48]
mov rdx, r14
mov r8d, 0x105
xor r9d, r9d
call sub.kernel32.dll_GetVolumeInformationW
test eax, eax
je 0x1400ad7fb
xor eax, eax
mov r8, rax
cmp rax, 0x105
je 0x1400ad4ff
lea rax, [r8 + 1]
cmp word [rsp + r8*2 + 0x18e], 0
jne 0x1400ad4e4
lea r9, str..cargo_registry_srcindex.crates.io_6f17d22bba15001f_sysinfo_0.29.7_srcwindowsdisk.rs
lea rcx, [rsp + 0x18e]
mov edx, 0x105
call fcn.1400a6f25
mov r8, rdx
lea r15, [rsp + 0xf8]
mov rcx, r15
mov rdx, rax
call fcn.1400a799a
mov r14, qword [r15]
mov r15, qword [r15 + 0x10]
xor eax, eax
mov r8, rax
cmp rax, 0x20
je 0x1400ad550
lea rax, [r8 + 1]
cmp word [rsp + r8*2 + 0x140], 0
jne 0x1400ad537
lea r9, str..cargo_registry_srcindex.crates.io_6f17d22bba15001f_sysinfo_0.29.7_srcwindowsdisk.rs
lea rcx, [rsp + 0x140]
mov edx, 0x20
call fcn.1400a6f25
lea r8, [rax + rdx*2]
lea rcx, [rsp + 0x88]
mov rdx, rax
call fcn.1400a505e
movabs rax, 0x5c002e005c005c
lea rcx, [rsp + 0x132]
mov qword [rcx], rax
mov word [rcx + 8], bx
mov dword [rcx + 0xa], 0x3a
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor edx, edx
mov r8d, 3
xor r9d, r9d
call sub.kernel32.dll_CreateFileW
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400ad82a
mov qword [rsp + 0x58], rbx
lea r8, [rsp + 0xd0]
and qword [r8], 0
lea r9, [rsp + 0x60]
and qword [r9], 0
lea rcx, [rsp + 0x48]
xor edx, edx
call sub.kernel32.dll_GetDiskFreeSpaceExW
test eax, eax
je 0x1400ad819
mov r13, qword [rsp + 0xd0]
test r13, r13
je 0x1400ad819
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x80], rax
lea r8, [rsp + 0x120]
mov qword [r8], 7
lea rax, [rsp + 0x110]
and dword [rax + 8], 0
mov byte [r8 + 8], 0
and qword [rax], 0
lea rcx, [rsp + 0x54]
and dword [rcx], 0
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x20], rax
and qword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0xc
mov rcx, rbx
mov edx, 0x2d1400
mov r9d, 0xc
call sub.kernel32.dll_DeviceIoControl
xor ebp, ebp
cmp byte [rsp + 0x118], 0
sete bpl
cmp dword [rsp + 0x54], 0xc
mov ecx, 2
cmovne rbp, rcx
test eax, eax
cmove rbp, rcx
lea rcx, [rsp + 0x60]
mov rdx, r14
mov r8, r15
call fcn.14009aa30
movups xmm0, xmmword [rsp + 0x60]
movups xmm1, xmmword [rsp + 0x70]
movaps xmmword [rsp + 0xe0], xmm1
movaps xmmword [rsp + 0xd0], xmm0
mov r14, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x98]
mov rcx, rbx
xor edx, edx
call fcn.14002dfdd
mov r15, rax
mov r12, rdx
mov rcx, rax
mov rdx, r14
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov qword [rsp + 0xa0], r15
mov qword [rsp + 0xa8], r12
mov qword [rsp + 0xb0], rbx
mov ecx, 4
xor edx, edx
call fcn.1400a7ca7
lea rcx, [rsp + 0x48]
mov r8, qword [rcx]
mov qword [rax], r8
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xc0], rdx
mov qword [rsp + 0xc8], 4
lea r9, str..cargo_registry_srcindex.crates.io_6f17d22bba15001f_sysinfo_0.29.7_srcwindowsdisk.rs
mov edx, 4
mov r8d, 3
call fcn.1400a6f25
mov r8, rdx
lea rcx, [rsp + 0x60]
mov rdx, rax
call fcn.1400a799a
movaps xmm0, xmmword [rsp + 0xd0]
movaps xmm1, xmmword [rsp + 0xe0]
movups xmmword [rsi + 0x20], xmm1
movups xmmword [rsi + 0x10], xmm0
mov rax, qword [rsp + 0xb0]
mov qword [rsi + 0x40], rax
movups xmm0, xmmword [rsp + 0xa0]
movups xmmword [rsi + 0x30], xmm0
mov rax, qword [rsp + 0xc8]
mov qword [rsi + 0x58], rax
movups xmm0, xmmword [rsp + 0xb8]
movups xmmword [rsi + 0x48], xmm0
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rsi + 0x60], xmm0
mov rax, qword [rsp + 0x70]
mov qword [rsi + 0x70], rax
or qword [rsi + 8], 0xffffffffffffffff
cmp edi, 2
mov qword [rsi], rbp
mov qword [rsi + 0x78], r13
mov rax, qword [rsp + 0x80]
mov qword [rsi + 0x80], rax
sete byte [rsi + 0x88]
mov eax, dword [rsp + 0x60]
mov ecx, dword [rsp + 0x63]
mov dword [rsi + 0x8c], ecx
mov dword [rsi + 0x89], eax
mov rcx, qword [rsp + 0x58]
call sub.kernel32.dll_CloseHandle
jmp 0x1400ad83d
mov qword [rsi], 3
mov rax, rsi
add rsp, 0x398
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsi], 3
mov rcx, rbx
call sub.kernel32.dll_CloseHandle
jmp 0x1400ad83d
mov rcx, 0xffffffffffffffff
call sub.kernel32.dll_CloseHandle
mov qword [rsi], 3
lea rcx, [rsp + 0x88]
call fcn.14002e741
lea rcx, [rsp + 0xf8]
call fcn.14002e741
jmp 0x1400ad802
lea rcx, [0x140138660]
lea r8, str..cargo_registry_srcindex.crates.io_6f17d22bba15001f_sysinfo_0.29.7_srcwindowsdisk.rs
mov edx, 0x24
call fcn.14000e3b0
ud2