Function at 0x140067f8c
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 r14, rcx
sar ebx, 0x10
lea ebp, [rsi + 1]
mov ecx, 0xffdf
movzx edi, r8w
and bx, cx
mov rax, rdx
test bpl, dil
je 0x140067fd7
test dil, 8
je 0x140067fd7
lea esi, [rbp + 7]
and edi, 0xfffffff7
and qword [rsp + 0x48], 0
test rax, rax
jne 0x140067ffe
lea rcx, [rsp + 0x48]
mov edx, 0x200
call fcn.140057f90
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x298], rax
lea rdx, [0x140000000]
lea rcx, [rsp + 0x58]
mov rax, qword [rdx + 0xf9a28]
mov qword [rcx], rax
mov rax, qword [rdx + 0xf9a30]
mov qword [rcx + 8], rax
mov eax, dword [rdx + 0xf9a38]
xor edx, edx
mov dword [rcx + 0x10], eax
lea rcx, [rsp + 0x6c]
lea r8d, [rdx + 0x14]
call fcn.1400d4180
lea r11, [r14 + 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, rbp
jne 0x140068045
call qword [sym.imp.KERNEL32.dll_GetLogicalDrives]
lea ecx, [rbx - 0x61]
mov ebp, 0x19
mov dword [rsp + 0x2a0], eax
cmp cx, bp
ja 0x140068088
mov ecx, 0xffe0
add bx, cx
xor edx, edx
movzx ecx, bx
lea r8d, [rdx + 0x41]
mov dword [rsp + 0x2a8], edx
sub cx, r8w
cmp cx, bp
ja 0x1400680b0
movzx ebp, bx
sub ebp, r8d
mov edx, ebp
mov dword [rsp + 0x2a8], edx
movsx r12d, dx
movsxd rsi, esi
cmp r12d, ebp
mov qword [rsp + 0x40], rsi
jg 0x140068269
mov ecx, 1
bt eax, r12d
jae 0x140068241
lea eax, [r8 + rdx]
movsx rbx, dx
lea rcx, [rsp + 0x60]
mov word [rsp + 0x60], ax
lea eax, [r12 + 0x41]
lea r15, [rbx + rbx*2]
mov dword [r14 + r15*8 + 0x10], eax
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov r9d, 3
mov r13d, eax
cmp eax, r9d
je 0x140068126
cmp eax, 2
je 0x140068126
xor r8d, r8d
or dword [r14 + r15*8 + 0x10], 0xc000
lea eax, [r9 - 2]
mov cl, r8b
mov dword [r14 + r15*8], r8d
jmp 0x140068130
mov eax, 1
xor r8d, r8d
mov cl, al
cmp r13d, eax
je 0x140068230
cmp edi, 8
je 0x14006815c
cmp edi, 0x10
jne 0x140068149
cmp r13d, 2
jmp 0x140068160
cmp edi, 4
je 0x140068166
cmp cl, r8b
jne 0x140068166
cmp rsi, r8
je 0x140068230
cmp r13d, 5
jne 0x140068230
or esi, 0xffffffff
cmp r13d, 2
jne 0x1400681af
cmp word [rsp + 0x2a8], ax
jg 0x1400681af
lea rax, [0x140000000]
cmp dword [rax + rbx*4 + 0x10e508], r8d
je 0x1400681af
movsx esi, word [rax + rbx*4 + 0x10e508]
cmp edi, 0x10
jne 0x1400681a0
cmp esi, 0xb
je 0x14006822b
cmp edi, 4
je 0x1400681af
cmp edi, 0x10
je 0x1400681af
cmp esi, 0xb
jne 0x14006822b
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.140003568
mov rbx, qword [rsp + 0x50]
xor r8d, r8d
cmp rbx, r8
je 0x14006822b
cmp esi, r8d
jge 0x140068208
xor edx, edx
mov r9d, r12d
mov rcx, rbx
lea r8d, [rdx + 1]
call fcn.14005dcc0
xor r8d, r8d
mov esi, eax
cmp r13d, 2
jne 0x140068299
cmp edi, 0x10
jne 0x14006828f
cmp esi, 0xb
jne 0x140068299
cmp rbx, 0xffffffffffffffff
je 0x14006822b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0x40]
mov eax, dword [rsp + 0x2a0]
mov r8d, 0x41
lea ecx, [r8 - 0x40]
mov r12d, dword [rsp + 0x2a8]
add r12w, cx
mov dword [rsp + 0x2a8], r12d
movsx r12d, r12w
cmp r12d, ebp
mov edx, dword [rsp + 0x2a8]
jle 0x1400680ca
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x48]
call fcn.14005041c
add rsp, 0x248
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp edi, 4
je 0x140068299
cmp esi, 0xb
jne 0x14006821c
mov r12, qword [rsp + 0x298]
mov dword [rsp + 0xb0], r8d
xor edx, edx
mov rcx, r12
mov r8d, 0x90
call fcn.1400d4180
and qword [rsp + 0x38], 0
or dword [r12 + 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], 0x90
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
movzx r14d, word [r14 + r15*8]
test eax, eax
je 0x140068302
mov r14w, word [r12 + 0x18]
and dword [rsp + 0xb0], 0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
and qword [rsp + 0x38], 0
or dword [r12 + 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], r12
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov r12d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
cmp qword [rsp + 0x40], r8
je 0x1400683cf
cmp r13d, 5
jne 0x1400683cf
cmp r12d, r8d
jne 0x140068386
cmp rbx, 0xffffffffffffffff
je 0x140068379
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0x290]
jmp 0x14006822b
mov rax, qword [rsp + 0x298]
lea r9, [0x1400f2380]
lea rdx, [rsp + 0x80]
movzx ecx, word [rax + 4]
mov word [rsp + 0x80], r8w
call fcn.14005d4d4
xor r8d, r8d
cmp word [rsp + 0x80], r8w
je 0x14006836a
mov rcx, qword [rsp + 0x290]
movzx eax, word [rsp + 0x60]
mov dword [rcx + r15*8 + 0x10], eax
movsx eax, r14w
mov r14, qword [rsp + 0x290]
mov dword [r14 + r15*8], eax
cmp r12d, r8d
je 0x1400683f5
mov rax, qword [rsp + 0x298]
movsx eax, word [rax + 4]
mov dword [r14 + r15*8 + 4], eax
cmp edi, 4
jne 0x140068409
mov rdx, rbx
xor ecx, ecx
call fcn.14005a794
mov dword [r14 + r15*8 + 0xc], eax
mov dword [r14 + r15*8 + 8], r13d
mov dword [r14 + r15*8 + 0x14], esi
jmp 0x14006821c