Function at 0x140066f18
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x248
xor esi, esi
mov ebx, r8d
mov rbp, rcx
sar ebx, 0x10
lea r12d, [rsi + 1]
mov ecx, 0xffdf
movzx edi, r8w
and bx, cx
mov rax, rdx
test r12b, dil
je 0x140066f66
test dil, 8
je 0x140066f66
lea esi, [r12 + 7]
and edi, 0xfffffff7
and qword [rsp + 0x40], 0
test rax, rax
jne 0x140066f8d
lea rcx, [rsp + 0x40]
mov edx, 0x200
call fcn.140056fe0
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x298], rax
lea rdx, [0x140000000]
lea rcx, [rsp + 0x58]
mov rax, qword [rdx + 0xf7950]
mov qword [rcx], rax
mov rax, qword [rdx + 0xf7958]
mov qword [rcx + 8], rax
mov eax, dword [rdx + 0xf7960]
xor edx, edx
mov dword [rcx + 0x10], eax
lea rcx, [rsp + 0x6c]
lea r8d, [rdx + 0x14]
call fcn.1400d1fa0
lea r11, [rbp + 0xc]
mov eax, 0x1b
or rcx, 0xffffffffffffffff
and dword [r11 + 4], 0
mov dword [r11 + 8], ecx
mov dword [r11], ecx
mov dword [r11 - 4], ecx
mov dword [r11 - 0xc], ecx
mov dword [r11 - 8], ecx
add r11, 0x18
sub rax, r12
jne 0x140066fd4
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
lea ecx, [rbx - 0x61]
mov r12d, 0x19
mov edx, eax
mov dword [rsp + 0x2a0], eax
cmp cx, r12w
ja 0x14006701b
mov eax, 0xffe0
add bx, ax
xor r14d, r14d
movzx ecx, bx
lea r8d, [r14 + 0x41]
mov dword [rsp + 0x2a8], r14d
sub cx, r8w
cmp cx, r12w
ja 0x140067049
movzx r12d, bx
sub r12d, r8d
mov r14d, r12d
mov dword [rsp + 0x2a8], r12d
movsx ebp, r14w
movsxd rax, esi
cmp ebp, r12d
mov qword [rsp + 0x48], rax
jg 0x1400673af
mov eax, 1
bt edx, ebp
jae 0x14006738a
mov rsi, qword [rsp + 0x290]
lea eax, [r8 + r14]
movsx rbx, r14w
mov word [rsp + 0x60], ax
lea eax, [rbp + 0x41]
lea r15, [rbx + rbx*2]
lea rcx, [rsp + 0x60]
mov dword [rsi + r15*8 + 0x10], eax
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov r9d, 3
mov r13d, eax
cmp eax, r9d
je 0x1400670c4
cmp eax, 2
je 0x1400670c4
xor r8d, r8d
or dword [rsi + r15*8 + 0x10], 0xc000
lea edx, [r9 - 2]
mov cl, r8b
mov dword [rsi + r15*8], r8d
jmp 0x1400670ce
mov edx, 1
xor r8d, r8d
mov cl, dl
cmp eax, edx
je 0x140067379
cmp edi, 8
je 0x1400670fa
cmp edi, 0x10
jne 0x1400670e5
cmp eax, 2
jmp 0x1400670fd
cmp edi, 4
je 0x140067103
cmp cl, r8b
jne 0x140067103
cmp qword [rsp + 0x48], r8
je 0x140067379
cmp eax, 5
jne 0x140067379
or esi, 0xffffffff
cmp eax, 2
jne 0x14006714b
cmp r14w, dx
jg 0x14006714b
lea rax, [0x140000000]
cmp dword [rax + rbx*4 + 0x10c4d0], r8d
je 0x14006714b
movsx esi, word [rax + rbx*4 + 0x10c4d0]
cmp edi, 0x10
jne 0x140067138
cmp esi, 0xb
je 0x140067379
cmp edi, 4
je 0x14006714b
cmp edi, 0x10
je 0x14006714b
cmp esi, 0xb
jne 0x140067379
mov qword [rsp + 0x38], r8
mov dword [rsp + 0x30], 0x20000000
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], r8
mov qword [rsp + 0x50], r8
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x50]
mov r8d, 0x80000000
call fcn.140003590
mov rbx, qword [rsp + 0x50]
xor r8d, r8d
cmp rbx, r8
je 0x140067379
cmp esi, r8d
jge 0x1400671a8
xor edx, edx
mov r9d, ebp
mov rcx, rbx
lea r8d, [rdx + 1]
call fcn.14005cc7c
xor r8d, r8d
mov esi, eax
cmp r13d, 2
jne 0x1400671cb
cmp edi, 0x10
jne 0x1400671bd
cmp esi, 0xb
jne 0x1400671cb
jmp 0x14006736a
cmp edi, 4
je 0x1400671cb
cmp esi, 0xb
jne 0x14006736a
mov r14, qword [rsp + 0x298]
mov dword [rsp + 0xb0], r8d
mov ebp, 0x90
mov r8, rbp
xor edx, edx
mov rcx, r14
call fcn.1400d1fa0
and qword [rsp + 0x38], 0
or dword [r14 + 0x18], 0xffffffff
lea rax, [rsp + 0xb0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov edx, 0x70048
mov rcx, rbx
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, qword [rsp + 0x290]
movzx ebp, word [rcx + r15*8]
test eax, eax
je 0x140067238
mov bp, word [r14 + 0x18]
and dword [rsp + 0xb0], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
and qword [rsp + 0x38], 0
or dword [r14 + 4], 0xffffffff
lea rax, [rsp + 0xb0]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x30], rax
mov edx, 0x2d1080
mov rcx, rbx
mov dword [rsp + 0x28], 0xc
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
cmp qword [rsp + 0x48], r8
je 0x1400672f0
cmp r13d, 5
jne 0x1400672f0
cmp r14d, r8d
je 0x14006736a
mov rax, qword [rsp + 0x298]
lea r9, [0x1400f02d0]
lea rdx, [rsp + 0x80]
movzx ecx, word [rax + 4]
mov word [rsp + 0x80], r8w
call fcn.14005c490
xor r8d, r8d
cmp word [rsp + 0x80], r8w
je 0x14006736a
mov rcx, qword [rsp + 0x290]
movzx eax, word [rsp + 0x60]
mov dword [rcx + r15*8 + 0x10], eax
mov rax, qword [rsp + 0x290]
movsx ebp, bp
cmp r14d, r8d
mov dword [rax + r15*8], ebp
mov r14, rax
je 0x140067318
mov rax, qword [rsp + 0x298]
movsx eax, word [rax + 4]
mov dword [r14 + r15*8 + 4], eax
cmp edi, 4
jne 0x14006732c
mov rdx, rbx
xor ecx, ecx
call fcn.14005975c
mov dword [r14 + r15*8 + 0xc], eax
mov rax, qword [rsp + 0x298]
mov dword [r14 + r15*8 + 8], r13d
mov dword [r14 + r15*8 + 0x14], esi
movsx eax, word [rax + 4]
lea r8, [rsp + 0x58]
lea rdx, str._s:__tpx__d___tp__d__iPartition_d_iDisk_d_r_n
mov dword [rsp + 0x30], eax
lea rcx, [0x14010bee0]
mov r9d, esi
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r13d
call fcn.14001648c
cmp rbx, 0xffffffffffffffff
je 0x140067379
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rsp + 0x2a0]
mov r8d, 0x41
lea eax, [r8 - 0x40]
mov ebp, dword [rsp + 0x2a8]
add bp, ax
mov dword [rsp + 0x2a8], ebp
movsx ebp, bp
cmp ebp, r12d
mov r14d, dword [rsp + 0x2a8]
jle 0x140067063
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x40]
call fcn.14004f564
add rsp, 0x248
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret