Function at 0x140051680
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, 0x328
mov rsi, rcx
mov rax, qword [rdx]
mov eax, dword [rax]
bt eax, r8d
jae 0x140051785
mov ebp, r8d
add ebp, 0x41
mov word [rsp + 0x48], bp
mov dword [rsp + 0x4a], 0x5c003a
mov word [rsp + 0x4e], 0
lea rcx, [rsp + 0x48]
call sub.KERNEL32.dll_GetDriveTypeW
mov edi, eax
and eax, 0xfffffffe
cmp eax, 2
jne 0x140051785
lea rbx, [rsp + 0x11e]
mov r8d, 0x20a
mov rcx, rbx
xor edx, edx
call sub.VCRUNTIME140.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 r15, [rsp + 0x50]
mov qword [rsp + 0x30], r15
movdqu xmmword [rsp + 0x20], xmm0
mov dword [rsp + 0x38], 0x20
lea rcx, [rsp + 0x48]
mov rdx, rbx
mov r8d, 0x105
xor r9d, r9d
call sub.KERNEL32.dll_GetVolumeInformationW
test eax, eax
je 0x140051785
mov ecx, 2
nop word cs:[rax + rax]
cmp word [rsp + rcx*2 + 0x11a], 0
je 0x1400517a0
cmp word [rsp + rcx*2 + 0x11c], 0
je 0x1400517a6
cmp word [rsp + rcx*2 + 0x11e], 0
je 0x1400517a9
add rcx, 3
cmp rcx, 0x107
jne 0x140051750
mov ecx, 0x105
jmp 0x1400517b6
mov qword [rsi], 3
add rcx, 0xfffffffffffffffe
jmp 0x1400517a9
dec rcx
cmp rcx, 0x106
jae 0x140051abe
lea rax, [rsp + rcx*2]
add rax, 0x11e
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0xa0], rax
mov word [rsp + 0xa8], 0
lea rcx, [rsp + 0xd8]
lea rdx, [rsp + 0x98]
call fcn.1400532a0
mov rax, qword [rsp + 0xd8]
mov rbx, qword [rsp + 0xe8]
cmp word [rsp + 0x50], 0
mov qword [rsp + 0xb8], rax
je 0x1400519a8
cmp word [rsp + 0x52], 0
je 0x1400519b6
cmp word [rsp + 0x54], 0
je 0x1400519c1
cmp word [rsp + 0x56], 0
je 0x1400519cc
cmp word [rsp + 0x58], 0
je 0x1400519d7
cmp word [rsp + 0x5a], 0
je 0x1400519e2
cmp word [rsp + 0x5c], 0
je 0x1400519ed
cmp word [rsp + 0x5e], 0
je 0x1400519f8
cmp word [rsp + 0x60], 0
je 0x140051a03
cmp word [rsp + 0x62], 0
je 0x140051a0e
cmp word [rsp + 0x64], 0
je 0x140051a19
cmp word [rsp + 0x66], 0
je 0x140051a24
cmp word [rsp + 0x68], 0
je 0x140051a2f
cmp word [rsp + 0x6a], 0
je 0x140051a3a
cmp word [rsp + 0x6c], 0
je 0x140051a45
cmp word [rsp + 0x6e], 0
je 0x140051a50
cmp word [rsp + 0x70], 0
je 0x140051a5b
cmp word [rsp + 0x72], 0
je 0x140051a66
cmp word [rsp + 0x74], 0
je 0x140051a6e
cmp word [rsp + 0x76], 0
je 0x140051a76
cmp word [rsp + 0x78], 0
je 0x140051a7e
cmp word [rsp + 0x7a], 0
je 0x140051a86
cmp word [rsp + 0x7c], 0
je 0x140051a8e
cmp word [rsp + 0x7e], 0
je 0x140051a96
cmp word [rsp + 0x80], 0
je 0x140051a9e
cmp word [rsp + 0x82], 0
je 0x140051aa6
cmp word [rsp + 0x84], 0
je 0x140051aae
cmp word [rsp + 0x86], 0
je 0x140051ab6
cmp word [rsp + 0x88], 0
je 0x140051ad1
cmp word [rsp + 0x8a], 0
je 0x140051ad9
cmp word [rsp + 0x8c], 0
je 0x140051ae1
cmp word [rsp + 0x8e], 1
mov r14d, 0x20
sbb r14, 0
jmp 0x140051ae7
mov r12d, 1
xor r14d, r14d
jmp 0x140051c38
mov r14d, 1
jmp 0x140051ae7
mov r14d, 2
jmp 0x140051ae7
mov r14d, 3
jmp 0x140051ae7
mov r14d, 4
jmp 0x140051ae7
mov r14d, 5
jmp 0x140051ae7
mov r14d, 6
jmp 0x140051ae7
mov r14d, 7
jmp 0x140051ae7
mov r14d, 8
jmp 0x140051ae7
mov r14d, 9
jmp 0x140051ae7
mov r14d, 0xa
jmp 0x140051ae7
mov r14d, 0xb
jmp 0x140051ae7
mov r14d, 0xc
jmp 0x140051ae7
mov r14d, 0xd
jmp 0x140051ae7
mov r14d, 0xe
jmp 0x140051ae7
mov r14d, 0xf
jmp 0x140051ae7
mov r14d, 0x10
jmp 0x140051ae7
mov r14d, 0x11
jmp 0x140051ae7
mov r14d, 0x12
jmp 0x140051ae7
mov r14d, 0x13
jmp 0x140051ae7
mov r14d, 0x14
jmp 0x140051ae7
mov r14d, 0x15
jmp 0x140051ae7
mov r14d, 0x16
jmp 0x140051ae7
mov r14d, 0x17
jmp 0x140051ae7
mov r14d, 0x18
jmp 0x140051ae7
mov r14d, 0x19
jmp 0x140051ae7
mov r14d, 0x1a
jmp 0x140051ae7
mov r14d, 0x1b
jmp 0x140051ae7
lea r8, str.C:Userslakti.cargo_registry_srcindex.crates.io_6f17d22bba15001f_sysinfo_0.29.8_srcwindowsdisk.rs
mov edx, 0x105
call fcn.140057820
ud2
mov r14d, 0x1c
jmp 0x140051ae7
mov r14d, 0x1d
jmp 0x140051ae7
mov r14d, 0x1e
movzx eax, byte [0x140085280]
mov rcx, qword [0x1400851f8]
test rcx, rcx
jne 0x140051b13
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14005201a
mov rcx, rax
mov qword [0x1400851f8], rax
xor edx, edx
mov r8, r14
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14005201a
mov r12, rax
cmp r14, 0x10
jb 0x140051b4b
lea rax, [r12 + r14]
lea rcx, [rsp + r14*2]
add rcx, 0x50
cmp r15, rax
setb al
cmp r12, rcx
jae 0x140051bb5
test al, al
je 0x140051bb5
xor eax, eax
mov rcx, rax
not rcx
add rcx, r14
mov rdx, r14
and rdx, 3
je 0x140051b72
nop
movzx r8d, byte [rsp + rax*2 + 0x50]
mov byte [r12 + rax], r8b
inc rax
dec rdx
jne 0x140051b60
cmp rcx, 3
jb 0x140051c38
nop dword [rax]
movzx ecx, byte [rsp + rax*2 + 0x50]
mov byte [r12 + rax], cl
movzx ecx, byte [rsp + rax*2 + 0x52]
mov byte [r12 + rax + 1], cl
movzx ecx, byte [rsp + rax*2 + 0x54]
mov byte [r12 + rax + 2], cl
movzx ecx, byte [rsp + rax*2 + 0x56]
mov byte [r12 + rax + 3], cl
add rax, 4
cmp r14, rax
jne 0x140051b80
jmp 0x140051c38
mov eax, r14d
and eax, 0x30
movdqa xmm0, xmmword [0x14005f7a0]
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 0x140051c2f
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 0x140051c2f
movdqa xmm1, xmmword [rsp + 0x90]
pand xmm1, xmm0
pand xmm0, xmmword [rsp + 0xa0]
packuswb xmm1, xmm0
movdqu xmmword [r12 + 0x20], xmm1
cmp r14, rax
jne 0x140051b4d
movabs rax, 0x5c002e005c005c
mov qword [rsp + 0xf0], rax
mov word [rsp + 0xf8], bp
mov dword [rsp + 0xfa], 0x3a
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
lea rcx, [rsp + 0xf0]
xor edx, edx
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140051fff
mov r13, rax
mov qword [rsp + 0xd0], rbx
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0x98], 0
lea rcx, [rsp + 0x48]
lea rbx, [rsp + 0xc0]
lea r9, [rsp + 0x98]
xor edx, edx
mov r8, rbx
call sub.KERNEL32.dll_GetDiskFreeSpaceExW
test eax, eax
je 0x140051fad
mov rbp, qword [rsp + 0xc0]
test rbp, rbp
je 0x140051fad
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0x108], rax
mov qword [rsp + 0x110], 7
mov byte [rsp + 0x118], 0
mov dword [rsp + 0xc8], 0
mov qword [rsp + 0xc0], 0
mov dword [rsp + 0x94], 0
lea rax, [rsp + 0x94]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], rbx
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0xc
lea r8, [rsp + 0x110]
mov rcx, r13
mov edx, 0x2d1400
mov r9d, 0xc
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor r15d, r15d
cmp byte [rsp + 0xc8], 0
sete r15b
cmp dword [rsp + 0x94], 0xc
mov ecx, 2
cmovne r15, rcx
test eax, eax
cmove r15, rcx
mov eax, 1
mov qword [rsp + 0xb0], rax
mov rbx, qword [rsp + 0xd0]
test rbx, rbx
je 0x140051dff
js 0x140052049
movzx eax, byte [0x140085280]
mov rcx, qword [0x1400851f8]
test rcx, rcx
jne 0x140051deb
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14005203a
add byte [rax], al
mov rcx, 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi], 3
test r14, r14
jne 0x140051fc2
jmp 0x140051fd4
call fcn.14000a710
ud2