Function at 0x140124694
Capabilities:
Get storage device properties

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov rax, qword [0x140178010]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r12, r8
mov qword [rbp - 0x19], rcx
mov r15, rdx
mov rsi, rcx
mov rcx, qword [0x1401782b0]
lea r14, [0x1401782b0]
cmp rcx, r14
je 0x1401246ff
test byte [rcx + 0x1c], 1
je 0x1401246ff
cmp byte [rcx + 0x19], 4
jb 0x1401246ff
mov rcx, qword [rcx + 0x10]
lea r8, [0x140160568]
mov edx, 0x2d
call fcn.140004c6c
xor eax, eax
xor r13d, r13d
mov dword [rbp - 1], r13d
mov ebx, r13d
mov qword [rbp + 3], rax
mov edi, r13d
mov qword [rbp + 0xb], rax
mov qword [rbp + 0x13], rax
mov dword [rbp + 0x1b], eax
test r15, r15
jne 0x14012473a
lea r8, str.pbIsWriteCapable
mov edx, 0x325
lea rcx, str.base_stor_blbengine_blbengutils_blbdeviceutils.cpp
call fcn.14008624c
test r12, r12
jne 0x140124757
lea r8, str.pbDVD
mov edx, 0x326
lea rcx, str.base_stor_blbengine_blbengutils_blbdeviceutils.cpp
call fcn.14008624c
xor eax, eax
mov qword [rsp + 0x38], r13
mov qword [rbp - 0x11], rax
lea r8, [rbp - 0x11]
mov qword [rbp - 0xd], rax
mov r9d, 0xc
lea rax, [rbp - 0x25]
mov byte [r15], r13b
mov qword [rsp + 0x30], rax
mov edx, 0x2d1400
lea rax, [rbp - 1]
mov dword [rsp + 0x28], 0x20
mov rcx, rsi
mov qword [rsp + 0x20], rax
mov byte [r12], r13b
mov dword [rbp - 0x11], 1
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1401247fc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1401782b0]
cmp rcx, r14
je 0x1401247e9
test byte [rcx + 0x1c], 1
je 0x1401247e9
cmp byte [rcx + 0x19], 2
jb 0x1401247e9
mov rcx, qword [rcx + 0x10]
lea r8, [0x140160568]
mov edx, 0x2e
mov r9d, eax
call fcn.140004c90
mov rcx, qword [0x1401782b0]
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012499e
mov ecx, dword [rbp + 0xf]
mov r14d, r13d
mov eax, ecx
not eax
lea edx, [rcx + 0x50]
and edx, eax
mov dword [rbp - 0x21], edx
mov eax, r14d
lea r13d, [rcx + 0x50]
neg eax
sbb esi, esi
and esi, 4
add esi, 0x1c
add r13d, esi
mov dword [rbp - 0x29], r13d
test rdi, rdi
je 0x140124834
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, r13
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rdi, rax
test rax, rax
je 0x1401249a4
mov r8, r13
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov edx, dword [rbp - 0x21]
mov eax, 0x38
mov word [rdi], ax
mov dword [rdi + 0x20], eax
mov eax, r14d
mov word [rdi + 7], VarUI4FromDisp
neg eax
mov dword [rdi + 0xc], esi
sbb cl, cl
mov dword [rdi + 0x10], 0x14
mov qword [rdi + 0x18], rdx
and cl, 4
add cl, 6
xor r13d, r13d
mov byte [rdi + 6], cl
and byte [rdi + 0x26], 0xea
or byte [rdi + 0x26], 0x2a
or byte [rdi + 0x25], 8
test r14d, r14d
jne 0x1401248aa
mov byte [rdi + 0x28], sil
lea rsi, [rdx + 4]
mov byte [rdi + 0x24], 0x1a
jmp 0x1401248be
mov eax, esi
mov byte [rdi + 0x24], 0x5a
shr eax, 8
mov byte [rdi + 0x2c], sil
lea rsi, [rdx + 8]
mov byte [rdi + 0x2b], al
mov r9d, dword [rbp - 0x29]
lea rax, [rbp - 0x25]
mov rcx, qword [rbp - 0x19]
mov r8, rdi
mov qword [rsp + 0x38], r13
mov edx, 0x4d004
mov qword [rsp + 0x30], rax
add rsi, rdi
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x140124930
test byte [rdi + 0x3a], 0xf
je 0x14012490e
inc r14d
cmp r14d, 2
jae 0x140124987
mov ecx, dword [rbp + 0xf]
jmp 0x14012480e
test byte [rsi + 3], 0x33
je 0x140124918
mov byte [r15], 1
test byte [rsi + 3], 0x30
jne 0x140124929
mov al, byte [rsi + 2]
test al, 0x18
jne 0x140124929
test al, 0x20
je 0x140124987
mov byte [r12], 1
jmp 0x140124987
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x140124979
test byte [rcx + 0x1c], 1
je 0x140124979
cmp byte [rcx + 0x19], 2
jb 0x140124979
mov rcx, qword [rcx + 0x10]
lea rax, str.SCSIOP_MODE_SENSE
test r14d, r14d
mov dword [rsp + 0x20], esi
lea r9, str.SCSIOP_MODE_SENSE10
cmove r9, rax
call fcn.1401232ac
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1401782b0]
lea r14, [0x1401782b0]
test ebx, ebx
jns 0x1401249e7
jmp 0x1401249b7
mov rcx, qword [0x1401782b0]
lea r14, [0x1401782b0]
mov ebx, 0x8007000e
cmp rcx, r14
je 0x140124a0d
test byte [rcx + 0x1c], 1
je 0x1401249e7
cmp byte [rcx + 0x19], 2
jb 0x1401249e7
mov rcx, qword [rcx + 0x10]
lea r8, [0x140160568]
mov edx, 0x30
mov r9d, ebx
call fcn.140004c90
mov rcx, qword [0x1401782b0]
cmp rcx, r14
je 0x140124a0d
test byte [rcx + 0x1c], 1
je 0x140124a0d
cmp byte [rcx + 0x19], 4
jb 0x140124a0d
mov rcx, qword [rcx + 0x10]
lea r8, [0x140160568]
mov edx, 0x31
call fcn.140004c6c
mov eax, ebx
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.1401474d0
mov rbx, qword [rsp + 0xe8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret