Function at 0x140065834
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 0x140065882
test dil, 8
je 0x140065882
lea esi, [r12 + 7]
and edi, 0xfffffff7
and qword [rsp + 0x40], 0
test rax, rax
jne 0x1400658a9
lea rcx, [rsp + 0x40]
mov edx, 0x200
call fcn.140055e58
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x298], rax
lea rdx, [0x140000000]
lea rcx, [rsp + 0x58]
mov rax, qword [rdx + 0xf2e50]
mov qword [rcx], rax
mov rax, qword [rdx + 0xf2e58]
mov qword [rcx + 8], rax
mov eax, dword [rdx + 0xf2e60]
xor edx, edx
mov dword [rcx + 0x10], eax
lea rcx, [rsp + 0x6c]
lea r8d, [rdx + 0x14]
call fcn.1400cc8d0
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 0x1400658f0
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 0x140065937
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 0x140065965
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 0x140065ccb
mov eax, 1
bt edx, ebp
jae 0x140065ca6
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 0x1400659e0
cmp eax, 2
je 0x1400659e0
xor r8d, r8d
or dword [rsi + r15*8 + 0x10], 0xc000
lea edx, [r9 - 2]
mov cl, r8b
mov dword [rsi + r15*8], r8d
jmp 0x1400659ea
mov edx, 1
xor r8d, r8d
mov cl, dl
cmp eax, edx
je 0x140065c95
cmp edi, 8
je 0x140065a16
cmp edi, 0x10
jne 0x140065a01
cmp eax, 2
jmp 0x140065a19
cmp edi, 4
je 0x140065a1f
cmp cl, r8b
jne 0x140065a1f
cmp qword [rsp + 0x48], r8
je 0x140065c95
cmp eax, 5
jne 0x140065c95
or esi, 0xffffffff
cmp eax, 2
jne 0x140065a67
cmp r14w, dx
jg 0x140065a67
lea rax, [0x140000000]
cmp dword [rax + rbx*4 + 0x1074a0], r8d
je 0x140065a67
movsx esi, word [rax + rbx*4 + 0x1074a0]
cmp edi, 0x10
jne 0x140065a54
cmp esi, 0xb
je 0x140065c95
cmp edi, 4
je 0x140065a67
cmp edi, 0x10
je 0x140065a67
cmp esi, 0xb
jne 0x140065c95
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 0x140065c95
cmp esi, r8d
jge 0x140065ac4
xor edx, edx
mov r9d, ebp
mov rcx, rbx
lea r8d, [rdx + 1]
call fcn.14005b8bc
xor r8d, r8d
mov esi, eax
cmp r13d, 2
jne 0x140065ae7
cmp edi, 0x10
jne 0x140065ad9
cmp esi, 0xb
jne 0x140065ae7
jmp 0x140065c86
cmp edi, 4
je 0x140065ae7
cmp esi, 0xb
jne 0x140065c86
mov r14, qword [rsp + 0x298]
mov dword [rsp + 0xb0], r8d
mov ebp, 0x90
mov r8, rbp
xor edx, edx
mov rcx, r14
call fcn.1400cc8d0
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 0x140065b54
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 0x140065c0c
cmp r13d, 5
jne 0x140065c0c
cmp r14d, r8d
je 0x140065c86
mov rax, qword [rsp + 0x298]
lea r9, [0x1400eb210]
lea rdx, [rsp + 0x80]
movzx ecx, word [rax + 4]
mov word [rsp + 0x80], r8w
call fcn.14005b21c
xor r8d, r8d
cmp word [rsp + 0x80], r8w
je 0x140065c86
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 0x140065c34
mov rax, qword [rsp + 0x298]
movsx eax, word [rax + 4]
mov dword [r14 + r15*8 + 4], eax
cmp edi, 4
jne 0x140065c48
mov rdx, rbx
xor ecx, ecx
call fcn.140058540
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, [0x140106ec0]
mov r9d, esi
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r13d
call fcn.140015e80
cmp rbx, 0xffffffffffffffff
je 0x140065c95
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 0x14006597f
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x40]
call fcn.14004ea6c
add rsp, 0x248
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret