Function at 0x140022750
Capabilities:
Get storage device properties

Disassembly:
push rbp
push rsi
push rdi
push rbx
sub rsp, 0xf8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x70], 0xfffffffffffffffe
mov rsi, rcx
mov r8d, dword [rdx]
add r8d, 0x41
lea rdx, str.__c:
lea rdi, [rbp + 0x20]
mov rcx, rdi
call fcn.140042e70
cmp qword [rbp + 0x38], 0x10
jb 0x140022793
mov rdi, qword [rbp + 0x20]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, rdi
xor edx, edx
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x140022921
mov rdi, rax
mov dword [rbp + 0x6c], 0
lea rbx, [rbp + 0x6c]
mov qword [rsp + 0x30], rbx
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0x20
mov rcx, rdi
mov edx, 0x560000
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x140022820
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x14002290c
cmp dword [rbp + 0x6c], 0x20
jne 0x14002290c
cmp dword [rbp - 0x40], 0
je 0x14002290c
mov qword [rbp + 0x60], rdi
mov r8d, dword [rbp - 0x38]
lea rdx, str._PhysicalDrive_d
lea rdi, [rbp - 0x20]
mov rcx, rdi
call fcn.140042e70
cmp qword [rbp - 8], 0x10
jb 0x14002285a
mov rdi, qword [rbp - 0x20]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov rcx, rdi
xor edx, edx
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x140022979
mov rdi, rax
mov qword [rbp], 8
mov dword [rbp + 0x48], 0
mov qword [rbp + 0x40], 0
mov qword [rsp + 0x30], rbx
lea rax, [rbp + 0x40]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0xc
mov r8, rbp
mov rcx, rdi
mov edx, 0x2d1400
mov r9d, 0xc
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140022985
cmp dword [rbp + 0x6c], 0xc
jne 0x140022985
cmp byte [rbp + 0x48], 0
je 0x140022985
mov byte [rsi], 1
mov dword [rsi + 4], 1
jmp 0x1400229f9
mov byte [rsi], 0
mov dword [rsi + 4], 0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14002292b
mov byte [rsi], 0
mov dword [rsi + 4], 0
mov rax, qword [rbp + 0x38]
cmp rax, 0x10
jb 0x14002296a
mov rcx, qword [rbp + 0x20]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140022965
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140022a4a
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.1400fa3b8
mov rax, rsi
add rsp, 0xf8
pop rbx
pop rdi
pop rsi
pop rbp
ret
mov byte [rsi], 0
mov dword [rsi + 4], 0
jmp 0x140022a02
mov dword [rbp + 0x6c], 0
mov qword [rbp + 0x10], 7
mov dword [rbp + 0x58], 0
mov qword [rbp + 0x50], 0
mov qword [rsp + 0x30], rbx
lea rax, [rbp + 0x50]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x28], 0xc
lea r8, [rbp + 0x10]
mov rcx, rdi
mov edx, 0x2d1400
mov r9d, 0xc
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
setne al
cmp dword [rbp + 0x6c], 0xc
sete cl
and cl, al
cmp byte [rbp + 0x58], 0
sete al
and al, cl
movzx eax, al
mov byte [rsi], cl
mov dword [rsi + 4], eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp - 8]
cmp rax, 0x10
mov rdi, qword [rbp + 0x60]
jb 0x140022916
mov rcx, qword [rbp - 0x20]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140022a40
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
cmp rcx, 0x20
jae 0x140022a4a
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.1400fa3b8
jmp 0x140022916
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3