Function at 0x100142228
Capabilities:
Get storage device properties

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0x90
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov rsi, rdx
mov rbp, rcx
mov rcx, qword [0x1001653b8]
lea r15, [0x1001653b8]
mov eax, 4
cmp rcx, r15
je 0x100142289
test byte [rcx + 0x1c], 1
je 0x100142289
cmp byte [rcx + 0x19], al
jb 0x100142289
mov rcx, qword [rcx + 0x10]
lea edx, [rax + 6]
lea r8, [0x100002e00]
call fcn.10001c7b8
xor ebx, ebx
lea rcx, [rsp + 0x54]
xor edx, edx
and dword [rsp + 0x50], ebx
lea r8d, [rbx + 0x1c]
call sub.msvcrt.dll_memset
and qword [rsp + 0x30], rbx
and dword [rsp + 0x28], ebx
and dword [rsi], ebx
lea r8d, [rbx + 1]
xor r9d, r9d
mov edx, 0xc0000000
mov rcx, rbp
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x100142327
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1001653b8]
lea edi, [rbx + 2]
cmp rcx, r15
je 0x100142314
test byte [rcx + 0x1c], 1
je 0x100142314
cmp byte [rcx + 0x19], dil
jb 0x100142314
mov rcx, qword [rcx + 0x10]
lea edx, [rbx + 0xb]
lea r8, [0x100002e00]
mov r9, rbp
mov dword [rsp + 0x20], eax
call fcn.10001daa4
mov rcx, qword [0x1001653b8]
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
jmp 0x100142528
xor eax, eax
lea r8, [rsp + 0x70]
mov r9d, 0xc
and qword [rsp + 0x38], rax
mov dword [rsp + 0x74], eax
and dword [rsp + 0x74], eax
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x78], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov edx, 0x2d1400
mov rcx, r12
mov dword [rsp + 0x28], 0x20
mov dword [rsp + 0x70], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1001423b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1001653b8]
mov edi, 2
cmp rcx, r15
je 0x10014245c
test byte [rcx + 0x1c], 1
je 0x10014245c
cmp byte [rcx + 0x19], dil
jb 0x10014245c
lea edx, [rdi + 0xa]
jmp 0x100142445
cmp dword [rsp + 0x40], 0x20
je 0x1001423d7
lea r8, [0x100015358]
lea rcx, [0x100015378]
mov edx, 0x4d
call fcn.100099ad8
xor eax, eax
xor r9d, r9d
xor r8d, r8d
and qword [rsp + 0x38], rax
lea edi, [rax + 8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], eax
lea rax, [rsp + 0x40]
mov edx, 0x2d0c14
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov rcx, r12
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x48], edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x10014246f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1001653b8]
mov edi, 2
cmp rcx, r15
je 0x10014245c
test byte [rcx + 0x1c], 1
je 0x10014245c
cmp byte [rcx + 0x19], dil
jb 0x10014245c
lea edx, [rdi + 0xb]
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002e00]
mov r9, rbp
mov dword [rsp + 0x20], eax
call fcn.10001daa4
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
jmp 0x100142518
cmp dword [rsp + 0x40], edi
je 0x10014248d
lea r8, [0x1000153b0]
lea rcx, [0x100015378]
mov edx, 0x61
call fcn.100099ad8
mov dl, byte [rsp + 0x68]
mov r10b, byte [rsp + 0x4e]
xor ecx, ecx
lea edi, [rcx + 2]
cmp dl, 7
cmove ecx, edi
xor eax, eax
lea r8d, [rdi + 2]
cmp dl, r8b
cmove eax, r8d
or ecx, eax
xor eax, eax
test r10b, r10b
setne al
or ecx, eax
or dword [rsi], ecx
mov r11d, dword [rsi]
mov rcx, qword [0x1001653b8]
cmp rcx, r15
je 0x100142518
test byte [rcx + 0x1c], 1
je 0x100142518
cmp byte [rcx + 0x19], r8b
jb 0x100142518
mov rcx, qword [rcx + 0x10]
xor r9d, r9d
cmp dl, r8b
sete r9b
xor r8d, r8d
mov dword [rsp + 0x38], r11d
mov dword [rsp + 0x30], r9d
cmp dl, 7
movzx eax, r10b
sete r8b
lea edx, [rdi + 0xc]
mov r9, rbp
mov dword [rsp + 0x28], r8d
lea r8, [0x100002e00]
mov dword [rsp + 0x20], eax
call fcn.10014214c
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
test ebx, ebx
jns 0x100142560
cmp rcx, r15
je 0x100142586
test byte [rcx + 0x1c], 1
je 0x100142560
cmp byte [rcx + 0x19], dil
jb 0x100142560
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002e00]
mov edx, 0xf
mov r9, rbp
mov dword [rsp + 0x20], ebx
call fcn.10001daa4
mov rcx, qword [0x1001653b8]
cmp rcx, r15
je 0x100142586
test byte [rcx + 0x1c], 1
je 0x100142586
cmp byte [rcx + 0x19], 4
jb 0x100142586
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002e00]
mov edx, 0x10
call fcn.10001c7b8
mov eax, ebx
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.10014e480
mov rbx, qword [rsp + 0xd0]
add rsp, 0x90
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret