Function at 0x18001d040
Capabilities:
Get disk information via ioctl

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rsp + 0xc0], rax
xor esi, esi
mov rdi, rcx
mov r13d, esi
mov dword [rsp + 0x44], esi
mov dword [rcx + 0x303], esi
mov ebp, esi
mov dword [rsp + 0x40], esi
mov r15d, esi
nop dword [rax]
lea rdx, str..PHYSICALDRIVE_d
lea rcx, [rsp + 0x80]
mov r8d, r15d
mov rbx, rsi
call qword [sym.imp.USER32.dll_wsprintfA]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rcx, [rsp + 0x80]
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
mov qword [rsp + 0x48], rax
cmp rax, 0xffffffffffffffff
je 0x18001d67e
mov qword [rsp + 0x38], rsi
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
xor r8d, r8d
mov edx, 0x74004
mov rcx, r12
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov r14, rsi
test eax, eax
mov edx, 0xb40
mov r8d, 0x1000
cmovne r14, qword [rsp + 0x60]
xor ecx, ecx
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rsi, rax
test rax, rax
je 0x18001d673
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x44]
xor r9d, r9d
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov edx, 0x7400c
mov rcx, r12
mov dword [rsp + 0x28], 0xb40
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x18001d250
lea r9d, [rax + 4]
mov edx, 0x70b0
xor ecx, ecx
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
xor r12d, r12d
mov rbp, rax
test rax, rax
je 0x18001d659
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x70050
mov dword [rsp + 0x28], 0x70b0
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x18001d232
xor r8d, r8d
cmp dword [rbp + 4], r8d
jbe 0x18001d22c
lea rdx, [rbp + 0x38]
lea rcx, [rsi + 0x20]
nop word [rax + rax]
mov eax, dword [rdx + 0x10]
mov byte [rcx], 0xff
inc r8d
mov dword [rcx - 4], eax
mov rax, qword [rdx]
add rcx, 0x20
mov qword [rcx - 0x38], rax
mov rax, qword [rdx + 8]
add rdx, 0x90
mov qword [rcx - 0x30], rax
cmp r8d, dword [rbp + 4]
jb 0x18001d200
mov r12d, 1
xor edx, edx
mov r8d, 0x8000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov ebp, dword [rsp + 0x40]
test r12d, r12d
je 0x18001d65d
xor r9d, r9d
xor r10d, r10d
cmp dword [rsi], r9d
jbe 0x18001d4e0
nop
mov r8d, r10d
shl r8, 5
cmp qword [r8 + rsi + 8], 0
jne 0x18001d27b
cmp qword [r8 + rsi + 0x10], 0
je 0x18001d4d4
mov rdx, qword [r8 + rsi + 8]
lea rax, [rbx + 0x7e00]
cmp rax, rdx
jge 0x18001d3d8
cmp r9, rbx
jle 0x18001d374
cmp r9, rdx
jge 0x18001d374
movsxd rax, dword [rdi + 0x303]
mov rcx, rax
imul rcx, rcx, 0x196
inc eax
mov dword [rdi + 0x303], eax
mov rax, r9
mov qword [rcx + rdi + 0x323], rbx
mov byte [rcx + rdi + 0x333], r15b
mov byte [rcx + rdi + 0x334], 0xfe
mov byte [rcx + rdi + 0x335], 0
mov byte [rcx + rdi + 0x337], 0
mov byte [rcx + rdi + 0x338], 0
mov byte [rcx + rdi + 0x339], 0
mov byte [rcx + rdi + 0x3b9], 0
sub rax, rbx
mov qword [rcx + rdi + 0x32b], rax
movsxd rax, dword [rdi + 0x303]
mov rcx, qword [r8 + rsi + 8]
mov rdx, rax
sub rcx, r9
imul rdx, rdx, 0x196
inc eax
mov dword [rdi + 0x303], eax
mov qword [rdx + rdi + 0x323], r9
mov qword [rdx + rdi + 0x32b], rcx
mov byte [rdx + rdi + 0x333], r15b
mov byte [rdx + rdi + 0x334], 0xfe
mov byte [rdx + rdi + 0x335], 0
mov byte [rdx + rdi + 0x337], 0
mov byte [rdx + rdi + 0x338], 0
mov byte [rdx + rdi + 0x339], 0
mov byte [rdx + rdi + 0x3b9], 0
jmp 0x18001d3d8
movsxd rax, dword [rdi + 0x303]
sub rdx, rbx
mov rcx, rax
imul rcx, rcx, 0x196
inc eax
mov dword [rdi + 0x303], eax
mov qword [rcx + rdi + 0x323], rbx
mov qword [rcx + rdi + 0x32b], rdx
mov byte [rcx + rdi + 0x333], r15b
mov byte [rcx + rdi + 0x334], 0xfe
mov byte [rcx + rdi + 0x335], 0
mov byte [rcx + rdi + 0x337], 0
mov byte [rcx + rdi + 0x338], 0
mov byte [rcx + rdi + 0x339], 0
mov byte [rcx + rdi + 0x3b9], 0
movzx eax, byte [r8 + rsi + 0x20]
cmp al, 0xf
je 0x18001d4c0
cmp al, 5
je 0x18001d4c0
test al, al
je 0x18001d4ca
movsxd rax, dword [rdi + 0x303]
mov rcx, rax
imul rcx, rcx, 0x196
inc eax
mov dword [rdi + 0x303], eax
mov rax, qword [r8 + rsi + 8]
mov qword [rcx + rdi + 0x323], rax
mov rax, qword [r8 + rsi + 0x10]
mov rdx, qword [rcx + rdi + 0x323]
mov qword [rcx + rdi + 0x32b], rax
add rax, rdx
cmp rax, r14
jle 0x18001d447
mov rax, r14
sub rax, rdx
mov qword [rcx + rdi + 0x32b], rax
mov byte [rcx + rdi + 0x339], 0
mov byte [rcx + rdi + 0x333], r15b
mov byte [rcx + rdi + 0x334], r10b
movzx eax, byte [r8 + rsi + 0x20]
mov byte [rcx + rdi + 0x336], 0
mov edx, eax
mov byte [rcx + rdi + 0x335], al
sub edx, 1
je 0x18001d499
sub edx, 3
je 0x18001d48f
cmp edx, 7
jne 0x18001d4a1
mov byte [rcx + rdi + 0x336], 6
jmp 0x18001d4a1
mov byte [rcx + rdi + 0x336], 5
jmp 0x18001d4a1
mov byte [rcx + rdi + 0x336], 4
mov byte [rcx + rdi + 0x337], 0
movzx eax, byte [r8 + rsi + 0x22]
mov byte [rcx + rdi + 0x3b9], 0
mov byte [rcx + rdi + 0x338], al
jmp 0x18001d4ca
mov r9, qword [r8 + rsi + 0x10]
add r9, qword [r8 + rsi + 8]
mov rbx, qword [r8 + rsi + 0x10]
add rbx, qword [r8 + rsi + 8]
inc r10d
cmp r10d, dword [rsi]
jb 0x18001d260
cmp rbx, r14
jge 0x18001d5ec
cmp r9, rbx
jle 0x18001d588
cmp r9, r14
jge 0x18001d588
movsxd rax, dword [rdi + 0x303]
mov rcx, rax
imul rcx, rcx, 0x196
inc eax
mov dword [rdi + 0x303], eax
mov rax, r9
mov qword [rcx + rdi + 0x323], rbx
mov byte [rcx + rdi + 0x333], r15b
mov byte [rcx + rdi + 0x334], 0xfe
mov byte [rcx + rdi + 0x335], 0
mov byte [rcx + rdi + 0x337], 0
mov byte [rcx + rdi + 0x338], 0
mov byte [rcx + rdi + 0x339], 0
mov byte [rcx + rdi + 0x3b9], 0
sub rax, rbx
mov qword [rcx + rdi + 0x32b], rax
movsxd rax, dword [rdi + 0x303]
mov rcx, rax
imul rcx, rcx, 0x196
inc eax
sub r14, r9
mov dword [rdi + 0x303], eax
mov qword [rcx + rdi + 0x323], r9
jmp 0x18001d5ac
movsxd rax, dword [rdi + 0x303]
mov rcx, rax
imul rcx, rcx, 0x196
inc eax
sub r14, rbx
mov dword [rdi + 0x303], eax
mov qword [rcx + rdi + 0x323], rbx
mov byte [rcx + rdi + 0x3b9], 0
mov byte [rcx + rdi + 0x339], 0
mov byte [rcx + rdi + 0x338], 0
mov byte [rcx + rdi + 0x337], 0
mov byte [rcx + rdi + 0x335], 0
mov byte [rcx + rdi + 0x334], 0xfe
mov byte [rcx + rdi + 0x333], r15b
mov qword [rcx + rdi + 0x32b], r14
mov rcx, rdi
mov r13d, 1
call fcn.18001cac0
cmp ebp, dword [rdi + 0x303]
jae 0x18001d64d
mov eax, ebp
imul rax, rax, 0x196
lea rbx, [rax + rdi + 0x323]
movzx edx, byte [rbx + 0x10]
mov r9, qword [rbx + 8]
mov r8, qword [rbx]
lea rax, [rbx + 0x16]
lea rcx, [rbx + 0x13]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rdi
call fcn.18001c660
mov rdx, rbx
mov rcx, rdi
call fcn.18001ca10
inc ebp
cmp ebp, dword [rdi + 0x303]
jb 0x18001d602
mov ebp, dword [rdi + 0x303]
mov dword [rsp + 0x40], ebp
jmp 0x18001d65d
mov ebp, dword [rsp + 0x40]
xor edx, edx
mov r8d, 0x8000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov r12, qword [rsp + 0x48]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc r15d
cmp r15d, 0x80
jb 0x18001d090
mov eax, r13d
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.18002d590
lea r11, [rsp + 0xd0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret