Function at 0x14005f04c
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 0x14005f09a
test dil, 8
je 0x14005f09a
lea esi, [r12 + 7]
and edi, 0xfffffff7
and qword [rsp + 0x40], 0
test rax, rax
jne 0x14005f0c1
lea rcx, [rsp + 0x40]
mov edx, 0x200
call fcn.14004bd00
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x298], rax
lea rdx, [0x140000000]
lea rcx, [rsp + 0x58]
mov rax, qword [rdx + 0xdea30]
mov qword [rcx], rax
mov rax, qword [rdx + 0xdea38]
mov qword [rcx + 8], rax
mov eax, dword [rdx + 0xdea40]
xor edx, edx
mov dword [rcx + 0x10], eax
lea rcx, [rsp + 0x6c]
lea r8d, [rdx + 0x14]
call fcn.1400b93b0
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 0x14005f108
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 0x14005f14f
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 0x14005f17d
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 0x14005f4e3
mov eax, 1
bt edx, ebp
jae 0x14005f4be
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 0x14005f1f8
cmp eax, 2
je 0x14005f1f8
xor r8d, r8d
or dword [rsi + r15*8 + 0x10], 0xc000
lea edx, [r9 - 2]
mov cl, r8b
mov dword [rsi + r15*8], r8d
jmp 0x14005f202
mov edx, 1
xor r8d, r8d
mov cl, dl
cmp eax, edx
je 0x14005f4ad
cmp edi, 8
je 0x14005f22e
cmp edi, 0x10
jne 0x14005f219
cmp eax, 2
jmp 0x14005f231
cmp edi, 4
je 0x14005f237
cmp cl, r8b
jne 0x14005f237
cmp qword [rsp + 0x48], r8
je 0x14005f4ad
cmp eax, 5
jne 0x14005f4ad
or esi, 0xffffffff
cmp eax, 2
jne 0x14005f27f
cmp r14w, dx
jg 0x14005f27f
lea rax, [0x140000000]
cmp dword [rax + rbx*4 + 0xf2378], r8d
je 0x14005f27f
movsx esi, word [rax + rbx*4 + 0xf2378]
cmp edi, 0x10
jne 0x14005f26c
cmp esi, 0xb
je 0x14005f4ad
cmp edi, 4
je 0x14005f27f
cmp edi, 0x10
je 0x14005f27f
cmp esi, 0xb
jne 0x14005f4ad
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.1400034e0
mov rbx, qword [rsp + 0x50]
xor r8d, r8d
cmp rbx, r8
je 0x14005f4ad
cmp esi, r8d
jge 0x14005f2dc
xor edx, edx
mov r9d, ebp
mov rcx, rbx
lea r8d, [rdx + 1]
call fcn.140051d94
xor r8d, r8d
mov esi, eax
cmp r13d, 2
jne 0x14005f2ff
cmp edi, 0x10
jne 0x14005f2f1
cmp esi, 0xb
jne 0x14005f2ff
jmp 0x14005f49e
cmp edi, 4
je 0x14005f2ff
cmp esi, 0xb
jne 0x14005f49e
mov r14, qword [rsp + 0x298]
mov dword [rsp + 0xb0], r8d
mov ebp, 0x90
mov r8, rbp
xor edx, edx
mov rcx, r14
call fcn.1400b93b0
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 0x14005f36c
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 0x14005f424
cmp r13d, 5
jne 0x14005f424
cmp r14d, r8d
je 0x14005f49e
mov rax, qword [rsp + 0x298]
lea r9, [0x1400d7790]
lea rdx, [rsp + 0x80]
movzx ecx, word [rax + 4]
mov word [rsp + 0x80], r8w
call fcn.14005158c
xor r8d, r8d
cmp word [rsp + 0x80], r8w
je 0x14005f49e
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 0x14005f44c
mov rax, qword [rsp + 0x298]
movsx eax, word [rax + 4]
mov dword [r14 + r15*8 + 4], eax
cmp edi, 4
jne 0x14005f460
mov rdx, rbx
xor ecx, ecx
call fcn.14004e170
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, [0x1400de9d0]
mov dword [rsp + 0x30], eax
lea rcx, [0x1400f1e30]
mov r9d, esi
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r13d
call fcn.140012fac
cmp rbx, 0xffffffffffffffff
je 0x14005f4ad
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 0x14005f197
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rsp + 0x40]
call fcn.140044f24
add rsp, 0x248
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret