Function at 0x422860
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, 0x3a8
mov rsi, rcx
mov eax, dword [rdx]
bt eax, r8d
jae 0x422965
mov ebp, r8d
add ebp, 0x41
mov word [rsp + 0x40], bp
mov dword [rsp + 0x42], 0x5c003a
mov word [rsp + 0x46], 0
lea rcx, [rsp + 0x40]
call sub.KERNEL32.dll_GetDriveTypeW
mov edi, eax
and eax, 0xfffffffe
cmp eax, 2
jne 0x422965
lea rbx, [rsp + 0x19e]
mov r8d, 0x20a
mov rcx, rbx
xor edx, edx
call sub.msvcrt.dll_memset
pxor xmm0, xmm0
movdqa xmmword [rsp + 0x80], xmm0
movdqa xmmword [rsp + 0x70], xmm0
movdqa xmmword [rsp + 0x60], xmm0
movdqa xmmword [rsp + 0x50], xmm0
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
movdqu xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x38], 0x20
lea rcx, [rsp + 0x40]
mov rdx, rbx
mov r8d, 0x105
xor r9d, r9d
call sub.KERNEL32.dll_GetVolumeInformationW
test eax, eax
je 0x422965
mov ecx, 2
nop word cs:[rax + rax]
cmp word [rsp + rcx*2 + 0x19a], 0
je 0x422980
cmp word [rsp + rcx*2 + 0x19c], 0
je 0x422986
cmp word [rsp + rcx*2 + 0x19e], 0
je 0x422989
add rcx, 3
cmp rcx, 0x107
jne 0x422930
mov ecx, 0x105
jmp 0x422996
mov qword [rsi], 3
add rsp, 0x3a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
add rcx, 0xfffffffffffffffe
jmp 0x422989
dec rcx
cmp rcx, 0x106
jae 0x422ca0
lea rax, [rsp + rcx*2]
add rax, 0x19e
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0xa0], rax
mov word [rsp + 0xa8], 0
lea rcx, [rsp + 0xf8]
lea rdx, [rsp + 0x98]
call sym._ZN95__LT_alloc..string..String_u20_as_u20_core..iter..traits..collect..FromIterator_LT_char_GT__GT_9from_iter17he29720028f95e
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x90], rax
mov r15, qword [rsp + 0x108]
movzx ebx, word [rsp + 0x50]
test bx, bx
je 0x422b8a
cmp word [rsp + 0x52], 0
je 0x422b98
cmp word [rsp + 0x54], 0
je 0x422ba3
cmp word [rsp + 0x56], 0
je 0x422bae
cmp word [rsp + 0x58], 0
je 0x422bb9
cmp word [rsp + 0x5a], 0
je 0x422bc4
cmp word [rsp + 0x5c], 0
je 0x422bcf
cmp word [rsp + 0x5e], 0
je 0x422bda
cmp word [rsp + 0x60], 0
je 0x422be5
cmp word [rsp + 0x62], 0
je 0x422bf0
cmp word [rsp + 0x64], 0
je 0x422bfb
cmp word [rsp + 0x66], 0
je 0x422c06
cmp word [rsp + 0x68], 0
je 0x422c11
cmp word [rsp + 0x6a], 0
je 0x422c1c
cmp word [rsp + 0x6c], 0
je 0x422c27
cmp word [rsp + 0x6e], 0
je 0x422c32
cmp word [rsp + 0x70], 0
je 0x422c3d
cmp word [rsp + 0x72], 0
je 0x422c48
cmp word [rsp + 0x74], 0
je 0x422c50
cmp word [rsp + 0x76], 0
je 0x422c58
cmp word [rsp + 0x78], 0
je 0x422c60
cmp word [rsp + 0x7a], 0
je 0x422c68
cmp word [rsp + 0x7c], 0
je 0x422c70
cmp word [rsp + 0x7e], 0
je 0x422c78
cmp word [rsp + 0x80], 0
je 0x422c80
cmp word [rsp + 0x82], 0
je 0x422c88
cmp word [rsp + 0x84], 0
je 0x422c90
cmp word [rsp + 0x86], 0
je 0x422c98
cmp word [rsp + 0x88], 0
je 0x422cb3
cmp word [rsp + 0x8a], 0
je 0x422cbb
cmp word [rsp + 0x8c], 0
je 0x422cc3
cmp word [rsp + 0x8e], 1
mov r14d, 0x20
sbb r14, 0
jmp 0x422cc9
mov r12d, 1
xor r14d, r14d
jmp 0x422dac
mov r14d, 1
jmp 0x422cc9
mov r14d, 2
jmp 0x422cc9
mov r14d, 3
jmp 0x422cc9
mov r14d, 4
jmp 0x422cc9
mov r14d, 5
jmp 0x422cc9
mov r14d, 6
jmp 0x422cc9
mov r14d, 7
jmp 0x422cc9
mov r14d, 8
jmp 0x422cc9
mov r14d, 9
jmp 0x422cc9
mov r14d, 0xa
jmp 0x422cc9
mov r14d, 0xb
jmp 0x422cc9
mov r14d, 0xc
jmp 0x422cc9
mov r14d, 0xd
jmp 0x422cc9
mov r14d, 0xe
jmp 0x422cc9
mov r14d, 0xf
jmp 0x422cc9
mov r14d, 0x10
jmp 0x422cc9
mov r14d, 0x11
jmp 0x422cc9
mov r14d, 0x12
jmp 0x422cc9
mov r14d, 0x13
jmp 0x422cc9
mov r14d, 0x14
jmp 0x422cc9
mov r14d, 0x15
jmp 0x422cc9
mov r14d, 0x16
jmp 0x422cc9
mov r14d, 0x17
jmp 0x422cc9
mov r14d, 0x18
jmp 0x422cc9
mov r14d, 0x19
jmp 0x422cc9
mov r14d, 0x1a
jmp 0x422cc9
mov r14d, 0x1b
jmp 0x422cc9
lea r8, str._root_.cargo_registry_src_index.crates.io_6f17d22bba15001f_sysinfo_0.29.2_src_windows_disk.rs
mov edx, 0x105
call dbg.slice_end_index_len_fail
ud2
mov r14d, 0x1c
jmp 0x422cc9
mov r14d, 0x1d
jmp 0x422cc9
mov r14d, 0x1e
mov rax, qword [0x005757d8]
movzx eax, byte [rax]
mov edx, 1
mov rcx, r14
call sym.__rust_alloc
test rax, rax
je 0x422d80
mov r12, rax
cmp r14, 0x10
jae 0x422cf9
xor eax, eax
jmp 0x4231f4
mov eax, r14d
and eax, 0x30
movdqa xmm0, xmmword [0x00543380]
movdqa xmm1, xmmword [rsp + 0x50]
pand xmm1, xmm0
movdqa xmm2, xmmword [rsp + 0x60]
pand xmm2, xmm0
packuswb xmm1, xmm2
movdqu xmmword [r12], xmm1
cmp rax, 0x10
je 0x4231eb
movdqa xmm1, xmmword [rsp + 0x70]
pand xmm1, xmm0
movdqa xmm2, xmmword [rsp + 0x80]
pand xmm2, xmm0
packuswb xmm1, xmm2
movdqu xmmword [r12 + 0x10], xmm1
cmp eax, 0x20
je 0x4231eb
movdqa xmm1, xmmword [rsp + 0x90]
pand xmm1, xmm0
pand xmm0, xmmword [rsp + 0xa0]
packuswb xmm1, xmm0
movdqu xmmword [r12 + 0x20], xmm1
jmp 0x4231eb
mov ecx, 1
mov rdx, r14
call dbg.handle_alloc_error
jmp 0x423182
mov qword [rsp + 0x168], r12
mov qword [rsp + 0x170], r14
mov qword [rsp + 0x178], r14
movabs rax, 0x5c002e005c005c
mov qword [rsp + 0xd8], rax
mov word [rsp + 0xe0], bp
mov dword [rsp + 0xe2], 0x3a
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
lea rcx, [rsp + 0xd8]
xor edx, edx
mov r8d, 3
xor r9d, r9d
call sub.KERNEL32.dll_CreateFileW
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x422fab
mov ebp, ebx
mov qword [rsp + 0x140], 0
mov qword [rsp + 0x98], 0
lea rcx, [rsp + 0x40]
lea r8, [rsp + 0x140]
lea r9, [rsp + 0x98]
xor edx, edx
call sub.KERNEL32.dll_GetDiskFreeSpaceExW
test eax, eax
je 0x422fc0
mov rax, qword [rsp + 0x140]
test rax, rax
mov ebx, ebp
je 0x422fc2
mov qword [rsp + 0xf0], rax
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0x15c], 7
mov byte [rsp + 0x164], 0
mov dword [rsp + 0xd0], 0
mov qword [rsp + 0xc8], 0
mov dword [rsp + 0x4c], 0
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0xc
lea r8, [rsp + 0x15c]
mov rcx, r13
mov edx, 0x2d1400
mov r9d, 0xc
call sub.KERNEL32.dll_DeviceIoControl
xor ebx, ebx
cmp byte [rsp + 0xd0], 0
sete bl
cmp dword [rsp + 0x4c], 0xc
mov ecx, 2
cmovne rbx, rcx
test eax, eax
cmove rbx, rcx
lea rcx, [rsp + 0x98]
mov rdx, qword [rsp + 0x90]
mov r8, r15
call sym.std::sys::windows::os_str::Slice::to_owned::h408b8379e5e99787
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xc0], rax
movdqu xmm0, xmmword [rsp + 0xa8]
movdqa xmmword [rsp + 0x180], xmm0
test r14, r14
je 0x423010
mov rax, qword [0x005757d8]
movzx eax, byte [rax]
mov edx, 1
mov rcx, r14
call sym.__rust_alloc
mov r15, rax
test rax, rax
jne 0x423016
mov ecx, 1
mov rdx, r14
call dbg.handle_alloc_error
jmp 0x423182
mov rcx, 0xffffffffffffffff
call fcn.004fb96c
mov qword [rsi], 3
jmp 0x422fd1
mov ebx, ebp
mov qword [rsi], 3
mov rcx, r13
call fcn.004fb96c
test bx, bx
je 0x422fe7
mov r8d, 1
mov rcx, r12
mov rdx, r14
call sym.__rust_dealloc
mov rdx, qword [rsp + 0x100]
test rdx, rdx
je 0x42296c
mov r8d, 1
mov rcx, qword [rsp + 0x90]
call sym.__rust_dealloc
jmp 0x42296c
mov r15d, 1
mov rcx, r15
mov rdx, r12
mov r8, r14
call sym.memcpy
mov qword [rsp + 0x110], r15
mov qword [rsp + 0x118], r14
mov qword [rsp + 0x120], r14
mov r15, qword [rsp + 0x40]
mov rax, qword [0x005757d8]
movzx eax, byte [rax]
mov ecx, 8
mov edx, 2
call sym.__rust_alloc
test rax, rax
je 0x423173
mov qword [rax], r15
mov qword [rsp + 0x128], rax
mov qword [rsp + 0x130], 4
mov qword [rsp + 0x138], 4
lea rax, [rsp + 0x40]
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0x46]
mov qword [rsp + 0xa0], rax
mov word [rsp + 0xa8], 0
lea rcx, [rsp + 0x140]
lea rdx, [rsp + 0x98]
call sym._ZN95__LT_alloc..string..String_u20_as_u20_core..iter..traits..collect..FromIterator_LT_char_GT__GT_9from_iter17he29720028f95e
cmp edi, 2
mov rax, qword [rsp + 0xb8]
mov qword [rsi + 0x10], rax
mov rax, qword [rsp + 0xc0]
mov qword [rsi + 0x18], rax
movaps xmm0, xmmword [rsp + 0x180]
movups xmmword [rsi + 0x20], xmm0
mov rax, qword [rsp + 0x120]
mov qword [rsi + 0x40], rax
movups xmm0, xmmword [rsp + 0x110]
movups xmmword [rsi + 0x30], xmm0
mov rax, qword [rsp + 0x138]
mov qword [rsi + 0x58], rax
movups xmm0, xmmword [rsp + 0x128]
movups xmmword [rsi + 0x48], xmm0
movdqu xmm0, xmmword [rsp + 0x140]
movdqu xmmword [rsi + 0x60], xmm0
mov rax, qword [rsp + 0x150]
mov qword [rsi + 0x70], rax
mov qword [rsi], rbx
mov qword [rsi + 8], 0xffffffffffffffff
mov rax, qword [rsp + 0xf0]
mov qword [rsi + 0x78], rax
mov rax, qword [rsp + 0xe8]
mov qword [rsi + 0x80], rax
sete byte [rsi + 0x88]
mov rcx, r13
call fcn.004fb96c
test bp, bp
jne 0x422fd6
jmp 0x422fe7
mov ecx, 2
mov edx, 8
call dbg.handle_alloc_error
ud2
cmp r14, rax
je 0x422dac
movzx ecx, byte [rsp + rax*2 + 0x50]
mov byte [r12 + rax], cl
inc rax
jmp 0x4231eb