Function at 0x1001279e8
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
sub rsp, 0x90
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x80], rax
mov r15, r8
mov r14, rdx
mov rsi, rcx
mov qword [rsp + 0x48], rcx
mov rcx, qword [0x1001653b8]
lea rbp, [0x1001653b8]
cmp rcx, rbp
je 0x100127a53
test byte [rcx + 0x1c], 1
je 0x100127a53
cmp byte [rcx + 0x19], 4
jb 0x100127a53
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002f20]
mov edx, 0x2b
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
xor edi, edi
test r14, r14
jne 0x100127a88
lea r8, [0x100013ce0]
lea rcx, [0x100013c70]
mov edx, 0x30f
call fcn.100099ad8
test r15, r15
jne 0x100127aa5
lea r8, [0x100013cf4]
lea rcx, [0x100013c70]
mov edx, 0x310
call fcn.100099ad8
xor eax, eax
mov byte [r14], bl
lea r8, [rsp + 0x70]
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 + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov r9d, 0xc
mov edx, 0x2d1400
mov rcx, rsi
mov dword [rsp + 0x28], 0x20
mov byte [r15], bl
mov dword [rsp + 0x70], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x100127b55
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1001653b8]
cmp rcx, rbp
je 0x100127b42
test byte [rcx + 0x1c], 1
je 0x100127b42
cmp byte [rcx + 0x19], 2
jb 0x100127b42
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002f20]
mov edx, 0x2c
mov r9d, eax
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x100127d30
mov ecx, dword [rsp + 0x60]
mov eax, ecx
lea edx, [rcx + 0x50]
not eax
and edx, eax
xor ebp, ebp
mov dword [rsp + 0x40], edx
mov eax, ebp
neg eax
sbb esi, esi
and esi, 4
add esi, 0x1c
lea r13d, [rsi + rcx + 0x50]
test rdi, rdi
je 0x100127b87
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov ecx, r13d
mov r12d, r13d
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rdi, rax
test rax, rax
je 0x100127d08
mov r8, r12
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov edx, dword [rsp + 0x40]
mov byte [rdi + 7], 0x12
mov byte [rdi + 8], 1
mov dword [rdi + 0xc], esi
mov dword [rdi + 0x10], 0x14
mov qword [rdi + 0x18], rdx
mov r12d, 0x38
mov eax, ebp
mov word [rdi], r12w
mov dword [rdi + 0x20], r12d
neg eax
sbb cl, cl
and cl, 4
add cl, 6
mov byte [rdi + 6], cl
and byte [rdi + 0x26], 0xea
or byte [rdi + 0x26], 0x2a
or byte [rdi + 0x25], 8
test ebp, ebp
jne 0x100127c02
mov byte [rdi + 0x28], sil
mov byte [rdi + 0x24], 0x1a
lea rsi, [rdx + rdi + 4]
jmp 0x100127c17
mov eax, esi
mov byte [rdi + 0x2c], sil
mov byte [rdi + 0x24], 0x5a
shr eax, 8
lea rsi, [rdx + rdi + 8]
mov byte [rdi + 0x2b], al
and qword [rsp + 0x38], rbx
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
mov r9d, r13d
mov r8, rdi
mov edx, 0x4d004
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x100127c9d
test byte [rdi + 0x3a], 0xf
je 0x100127c64
inc ebp
cmp ebp, 2
jae 0x100127d0d
mov ecx, dword [rsp + 0x60]
jmp 0x100127b68
mov al, byte [rsi + 3]
mov cl, 0x10
test al, 1
jne 0x100127c79
test al, 2
jne 0x100127c79
test cl, al
jne 0x100127c79
test al, 0x20
je 0x100127c7d
mov byte [r14], 1
mov al, byte [rsi + 3]
test cl, al
jne 0x100127c97
test al, 0x20
jne 0x100127c97
mov al, byte [rsi + 2]
test al, 8
jne 0x100127c97
test cl, al
jne 0x100127c97
test al, 0x20
je 0x100127d0d
mov byte [r15], 1
jmp 0x100127d0d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1001653b8]
lea rax, [0x1001653b8]
cmp rcx, rax
je 0x100127cf8
test byte [rcx + 0x1c], 1
je 0x100127cf8
cmp byte [rcx + 0x19], 2
jb 0x100127cf8
mov rcx, qword [rcx + 0x10]
lea rax, [0x100013d00]
test ebp, ebp
lea r9, [0x100013d18]
lea r8, [0x100002f20]
mov edx, 0x2d
cmove r9, rax
mov dword [rsp + 0x20], esi
call fcn.100126660
mov rcx, qword [0x1001653b8]
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
jmp 0x100127d14
mov ebx, 0x8007000e
mov rcx, qword [0x1001653b8]
test rdi, rdi
je 0x100127d29
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1001653b8]
lea rbp, [0x1001653b8]
test ebx, ebx
jns 0x100127d64
cmp rcx, rbp
je 0x100127d8a
test byte [rcx + 0x1c], 1
je 0x100127d64
cmp byte [rcx + 0x19], 2
jb 0x100127d64
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002f20]
mov edx, 0x2e
mov r9d, ebx
call fcn.10001c7dc
mov rcx, qword [0x1001653b8]
cmp rcx, rbp
je 0x100127d8a
test byte [rcx + 0x1c], 1
je 0x100127d8a
cmp byte [rcx + 0x19], 4
jb 0x100127d8a
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002f20]
mov edx, 0x2f
call fcn.10001c7b8
mov eax, ebx
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.10014e480
mov rbx, qword [rsp + 0xe8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret