Function at 0x140040ad8
Capabilities:
Get disk information via ioctl

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
mov rax, qword [0x1400de7a8]
xor rax, rsp
mov qword [rbp + 0x2f], rax
mov qword [rbp - 0x21], rdx
call fcn.140044688
mov r15, rax
mov qword [rbp - 0x19], rax
xor r14d, r14d
mov ebx, 0x80070000
cmp rax, 0xffffffffffffffff
jne 0x140040b46
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov esi, eax
test eax, eax
jle 0x140040b3e
movzx esi, ax
or esi, ebx
test esi, esi
js 0x140040daf
mov qword [rbp - 0x39], r14
lea rdx, [rbp - 0x39]
mov rcx, r15
call fcn.140043f28
mov rdi, qword [rbp - 0x39]
test eax, eax
js 0x140040d9e
mov qword [rsp + 0x20], r14
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.DEVOBJ.dll_DevObjCreateDeviceInfoList]
nop dword [rax + rax]
mov r13, rax
mov qword [rbp - 9], rax
cmp rax, 0xffffffffffffffff
jne 0x140040ba9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov esi, eax
test eax, eax
jle 0x140040ba1
movzx esi, ax
or esi, ebx
test esi, esi
js 0x140040d8d
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov r9d, SafeArrayGetLBound
xor r8d, r8d
lea rdx, [0x1400b5078]
mov rcx, r13
call qword [sym.imp.DEVOBJ.dll_DevObjGetClassDevs]
nop dword [rax + rax]
test eax, eax
je 0x140040bdb
mov r12d, r14d
jmp 0x140040bed
call fcn.14001be00
mov esi, eax
mov r12d, r14d
test eax, eax
js 0x140040d8d
mov dword [rbp - 0x49], r12d
mov dword [rbp + 0xf], 0x20
lea rax, [rbp + 0xf]
mov qword [rsp + 0x20], rax
mov r9d, r12d
lea r8, [0x1400b5078]
xor edx, edx
mov rcx, r13
call qword [sym.imp.DEVOBJ.dll_DevObjEnumDeviceInterfaces]
nop dword [rax + rax]
test eax, eax
jne 0x140040c3a
call fcn.14001be00
mov esi, eax
cmp eax, 0x80070103
je 0x140040d8a
test eax, eax
js 0x140040d7d
mov qword [rbp - 0x41], r14
lea r8, [rbp - 0x41]
mov rdx, r13
lea rcx, [rbp + 0xf]
call fcn.140043e30
mov esi, eax
mov rbx, qword [rbp - 0x41]
test eax, eax
js 0x140040d70
lea rax, [rbx + 4]
mov qword [rbp - 0x29], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 1]
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
nop dword [rax + rax]
mov r14, rax
mov qword [rbp - 0x11], rax
cmp rax, 0xffffffffffffffff
jne 0x140040cbe
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov esi, eax
test eax, eax
jle 0x140040cb6
movzx esi, ax
or esi, 0x80070000
test esi, esi
js 0x140040d54
xor eax, eax
mov qword [rbp - 1], rax
mov dword [rbp + 7], eax
and qword [rsp + 0x38], rax
lea rax, [rbp - 0x31]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], SafeArrayGetLBound
lea rax, [rbp - 1]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x2d1080
mov rcx, r14
call qword [sym.imp.api_ms_win_core_io_l1_1_0.dll_DeviceIoControl]
nop dword [rax + rax]
test eax, eax
je 0x140040d08
xor esi, esi
jmp 0x140040d13
call fcn.14001be00
mov esi, eax
test eax, eax
js 0x140040d54
mov r14d, dword [rbp - 0x49]
mov rbx, qword [rbp - 0x29]
mov r15, qword [rbp - 0x21]
cmp r14d, dword [rdi]
jae 0x140040d48
mov eax, r14d
lea rcx, [rax + rax*2]
mov eax, dword [rbp + 3]
cmp dword [rdi + rcx*8 + 8], eax
jne 0x140040d41
mov rdx, rbx
mov rcx, r15
call fcn.14002e12c
mov esi, eax
inc r14d
test esi, esi
jns 0x140040d1f
mov rbx, qword [rbp - 0x41]
mov r15, qword [rbp - 0x19]
mov r14, qword [rbp - 0x11]
lea rax, [r14 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140040d6d
mov rcx, r14
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
xor r14d, r14d
mov edx, 8
mov rcx, rbx
call fcn.1400252b8
inc r12d
test esi, esi
jns 0x140040bf1
jmp 0x140040d8d
mov esi, r14d
mov rcx, r13
call qword [sym.imp.DEVOBJ.dll_DevObjDestroyDeviceInfoList]
nop dword [rax + rax]
jmp 0x140040da1
mov esi, r14d
mov edx, 0x20
mov rcx, rdi
call fcn.1400252b8
nop
lea rax, [r15 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140040dc8
mov rcx, r15
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov eax, esi
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140024c10
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret