Function at 0x180020130
Capabilities:
Get disk information via ioctl
Get disk size

Disassembly:
push rbx
push rdi
push r14
push r15
mov eax, 0x1168
call fcn.180015940
sub rsp, rax
mov rax, qword [0x180039000]
xor rax, rsp
mov qword [rsp + 0x1140], rax
mov rdi, rdx
mov rbx, rcx
mov r8d, 0x1018
mov rcx, rdi
xor edx, edx
call fcn.180011ff0
xor r14d, r14d
xor r9d, r9d
mov qword [rsp + 0x30], r14
lea r8d, [r14 + 3]
mov edx, 0x80100000
mov rcx, rbx
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x1800201a7
lea ebx, [rax + 2]
jmp 0x18002046e
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
xor r8d, r8d
mov edx, 0x70048
mov rcx, r15
mov dword [rsp + 0x28], 0x90
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x180020266
mov eax, dword [rsp + 0x68]
mov dword [rdi + 4], eax
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x10], rax
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xe0]
xor r8d, r8d
mov edx, 0x2d1080
mov rcx, r15
mov dword [rsp + 0x28], 0xc
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x180020303
mov eax, dword [rsp + 0xe8]
mov ecx, dword [rsp + 0xe4]
mov ebx, 1
xor edx, edx
mov dword [rdi + 4], ebx
mov dword [rdi], r14d
mov dword [rdi + 8], eax
mov dword [rdi + 0x18], ecx
call sym.dcapi.dll_dc_dsk_get_size
mov qword [rdi + 0x20], rax
mov ebx, r14d
jmp 0x180020465
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xf0]
xor r8d, r8d
mov edx, 0x74004
mov rcx, r15
mov dword [rsp + 0x28], 0x20
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1800202b9
mov eax, dword [rsp + 0x104]
mov dword [rdi + 4], eax
mov rax, qword [rsp + 0xf8]
jmp 0x1800201f0
mov qword [rsp + 0x38], r14
lea rcx, [rsp + 0x40]
lea rax, [rdi + 0x10]
mov qword [rsp + 0x30], rcx
xor r9d, r9d
xor r8d, r8d
mov edx, 0x7405c
mov rcx, r15
mov dword [rsp + 0x28], 8
mov dword [rdi + 4], r14d
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x1800201f4
mov eax, 1
jmp 0x180020470
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x140]
xor r8d, r8d
mov edx, 0x560000
mov rcx, r15
mov dword [rsp + 0x28], 0x1000
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x180020460
mov ecx, dword [rsp + 0x140]
mov qword [rsp + 0x11a0], rbp
mov ebp, r14d
test ecx, ecx
je 0x180020443
mov qword [rsp + 0x1160], rsi
mov qword [rsp + 0x1158], r12
lea rbx, [rdi + 0x28]
mov qword [rsp + 0x1150], r13
lea r12, [rsp + 0x150]
mov rax, qword [r12]
mov ecx, dword [r12 - 8]
xor edx, edx
mov qword [rbx], rax
mov rax, qword [r12 + 8]
mov dword [rbx - 0x10], ecx
mov qword [rbx + 8], rax
mov rsi, r14
call sym.dcapi.dll_dc_disk_open
mov r13, rax
test rax, rax
je 0x18002040e
mov r14, qword [rax]
mov qword [rsp + 0x38], 0
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x110]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x700a0
mov rcx, r14
mov dword [rsp + 0x28], 0x28
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rsi, qword [rsp + 0x128]
test eax, eax
jne 0x1800203fa
mov rsi, qword [r13 + 0x18]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call fcn.18000f924
xor r14d, r14d
mov ecx, dword [rsp + 0x140]
inc ebp
mov qword [rbx - 8], rsi
add r12, 0x18
add rbx, 0x20
cmp ebp, ecx
jb 0x180020381
mov r13, qword [rsp + 0x1150]
mov r12, qword [rsp + 0x1158]
mov rsi, qword [rsp + 0x1160]
mov rbp, qword [rsp + 0x11a0]
cmp ecx, 1
mov eax, r14d
setne al
mov dword [rdi + 4], ecx
mov ebx, r14d
inc eax
mov dword [rdi], eax
jmp 0x180020465
mov ebx, 0xf
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov rcx, qword [rsp + 0x1140]
xor rcx, rsp
call fcn.18000eda0
add rsp, 0x1168
pop r15
pop r14
pop rdi
pop rbx
ret