Function at 0x140002990
Capabilities:
Get disk size
Get storage device properties

Disassembly:
push rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xc8
mov rax, qword [0x140067008]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov rbx, r9
mov rdi, r8
mov r14, rdx
lea r8, str..PhysicalDrive_d
mov r9d, ecx
mov esi, 1
lea rcx, [rsp + 0x70]
lea edx, [rsi + 0x3f]
call fcn.140001120
xor r12d, r12d
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], r12d
mov r8d, esi
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140002a2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, [rsp + 0x70]
mov ecx, esi
mov r9d, eax
lea rdx, str.CreateFileA__s_failed__u_n
call fcn.140001c50
jmp 0x140002cdc
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x60]
mov dword [rsp + 0x28], 8
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x7405c
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140002a82
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.IOCTL_DISK_GET_LENGTH_INFO_failed__u_n
mov ecx, esi
mov r8d, eax
call fcn.140001c50
jmp 0x140002cdc
test r14, r14
je 0x140002a8f
mov rax, qword [rsp + 0x60]
mov qword [r14], rax
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x50]
lea rax, [rsp + 0x40]
mov dword [rsp + 0x28], 8
mov r9d, ntohs
mov qword [rsp + 0x20], rax
mov edx, 0x2d1400
mov qword [rsp + 0x50], r12
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140002aee
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.IOCTL_STORAGE_QUERY_PROPERTY_failed__u_n
mov ecx, esi
mov r8d, eax
call fcn.140001c50
jmp 0x140002cd3
mov eax, dword [rsp + 0x44]
cmp eax, 0x28
jae 0x140002b0d
mov r8d, eax
lea rdx, str.DevDescHeader.size_invalid__u_n
mov ecx, esi
call fcn.140001c50
jmp 0x140002cd3
mov rcx, rax
call fcn.14002da3c
mov r14, rax
test rax, rax
jne 0x140002b30
lea rdx, str.malloc_failed_n
mov ecx, esi
call fcn.140001c50
jmp 0x140002cd3
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], rax
lea r8, [rsp + 0x50]
mov eax, dword [rsp + 0x44]
mov r9d, ntohs
mov dword [rsp + 0x28], eax
mov edx, 0x2d1400
mov rcx, r15
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140002b85
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.IOCTL_STORAGE_QUERY_PROPERTY_failed__u_n
mov ecx, esi
mov r8d, eax
call fcn.140001c50
jmp 0x140002ccb
mov eax, dword [r14 + 0xc]
mov qword [rsp + 0xc0], rbp
mov rbp, 0xffffffffffffffff
test eax, eax
je 0x140002c30
test rdi, rdi
je 0x140002c30
lea r8, [r14 + rax]
mov edx, 0x80
mov rcx, rdi
call fcn.140031660
mov rdx, rdi
mov rax, rbp
inc rax
cmp byte [rdi + rax], r12b
jne 0x140002bc0
test rax, rax
je 0x140002c00
lea rcx, [rdi - 1]
mov r8, rsi
add rcx, rax
sub r8, rdi
nop dword [rax + rax]
movzx eax, byte [rcx]
cmp al, 0x20
je 0x140002beb
cmp al, 9
jne 0x140002c00
mov byte [rcx], r12b
dec rcx
lea rax, [r8 + rcx]
test rax, rax
jne 0x140002be0
nop word [rax + rax]
movzx eax, byte [rdx]
cmp al, 0x20
je 0x140002c0b
cmp al, 9
jne 0x140002c10
inc rdx
jmp 0x140002c00
test al, al
je 0x140002c2d
sub rdx, rdi
nop word [rax + rax]
mov byte [rdi], al
inc rdi
movzx eax, byte [rdx + rdi]
test al, al
jne 0x140002c20
mov byte [rdi], r12b
mov eax, dword [r14 + 0x10]
test eax, eax
je 0x140002cc0
test rbx, rbx
je 0x140002cc0
lea r8, [r14 + rax]
mov edx, 0x80
mov rcx, rbx
call fcn.140031660
mov rdx, rbx
inc rbp
cmp byte [rbx + rbp], r12b
jne 0x140002c55
test rbp, rbp
je 0x140002c90
lea rcx, [rbx - 1]
add rcx, rbp
sub rsi, rbx
nop dword [rax]
movzx eax, byte [rcx]
cmp al, 0x20
je 0x140002c7b
cmp al, 9
jne 0x140002c90
mov byte [rcx], r12b
dec rcx
lea rax, [rsi + rcx]
test rax, rax
jne 0x140002c70
nop word [rax + rax]
movzx eax, byte [rdx]
cmp al, 0x20
je 0x140002c9b
cmp al, 9
jne 0x140002ca0
inc rdx
jmp 0x140002c90
test al, al
je 0x140002cbd
sub rdx, rbx
nop word [rax + rax]
mov byte [rbx], al
inc rbx
movzx eax, byte [rdx + rbx]
test al, al
jne 0x140002cb0
mov byte [rbx], r12b
mov rbp, qword [rsp + 0xc0]
mov esi, r12d
mov rcx, r14
call fcn.14002da28
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.14002b5c0
add rsp, 0xc8
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret