Function at 0x100127a8c
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 0x100127af7
test byte [rcx + 0x1c], 1
je 0x100127af7
cmp byte [rcx + 0x19], 4
jb 0x100127af7
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002ee0]
mov edx, 0x2b
call fcn.10001c854
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 0x100127b2c
lea r8, [0x100013c50]
lea rcx, [0x100013be0]
mov edx, 0x30f
call fcn.10009a050
test r15, r15
jne 0x100127b49
lea r8, [0x100013c64]
lea rcx, [0x100013be0]
mov edx, 0x310
call fcn.10009a050
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 0x100127bf9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1001653b8]
cmp rcx, rbp
je 0x100127be6
test byte [rcx + 0x1c], 1
je 0x100127be6
cmp byte [rcx + 0x19], 2
jb 0x100127be6
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002ee0]
mov edx, 0x2c
mov r9d, eax
call fcn.10001c878
mov rcx, qword [0x1001653b8]
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x100127dd4
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 0x100127c2b
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 0x100127dac
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 0x100127ca6
mov byte [rdi + 0x28], sil
mov byte [rdi + 0x24], 0x1a
lea rsi, [rdx + rdi + 4]
jmp 0x100127cbb
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 0x100127d41
test byte [rdi + 0x3a], 0xf
je 0x100127d08
inc ebp
cmp ebp, 2
jae 0x100127db1
mov ecx, dword [rsp + 0x60]
jmp 0x100127c0c
mov al, byte [rsi + 3]
mov cl, 0x10
test al, 1
jne 0x100127d1d
test al, 2
jne 0x100127d1d
test cl, al
jne 0x100127d1d
test al, 0x20
je 0x100127d21
mov byte [r14], 1
mov al, byte [rsi + 3]
test cl, al
jne 0x100127d3b
test al, 0x20
jne 0x100127d3b
mov al, byte [rsi + 2]
test al, 8
jne 0x100127d3b
test cl, al
jne 0x100127d3b
test al, 0x20
je 0x100127db1
mov byte [r15], 1
jmp 0x100127db1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x1001653b8]
lea rax, [0x1001653b8]
cmp rcx, rax
je 0x100127d9c
test byte [rcx + 0x1c], 1
je 0x100127d9c
cmp byte [rcx + 0x19], 2
jb 0x100127d9c
mov rcx, qword [rcx + 0x10]
lea rax, [0x100013c70]
test ebp, ebp
lea r9, [0x100013c88]
lea r8, [0x100002ee0]
mov edx, 0x2d
cmove r9, rax
mov dword [rsp + 0x20], esi
call fcn.100126704
mov rcx, qword [0x1001653b8]
movzx ebx, si
or ebx, 0x80070000
test esi, esi
cmovle ebx, esi
jmp 0x100127db8
mov ebx, 0x8007000e
mov rcx, qword [0x1001653b8]
test rdi, rdi
je 0x100127dcd
mov rcx, rdi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1001653b8]
lea rbp, [0x1001653b8]
test ebx, ebx
jns 0x100127e08
cmp rcx, rbp
je 0x100127e2e
test byte [rcx + 0x1c], 1
je 0x100127e08
cmp byte [rcx + 0x19], 2
jb 0x100127e08
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002ee0]
mov edx, 0x2e
mov r9d, ebx
call fcn.10001c878
mov rcx, qword [0x1001653b8]
cmp rcx, rbp
je 0x100127e2e
test byte [rcx + 0x1c], 1
je 0x100127e2e
cmp byte [rcx + 0x19], 4
jb 0x100127e2e
mov rcx, qword [rcx + 0x10]
lea r8, [0x100002ee0]
mov edx, 0x2f
call fcn.10001c854
mov eax, ebx
mov rcx, qword [rsp + 0x80]
xor rcx, rsp
call fcn.10014e600
mov rbx, qword [rsp + 0xe8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret