Function at 0x180017de0
Capabilities:
Get disk information
Get disk size

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rbp + 0x38], rax
mov rdi, rdx
movzx r14d, cx
call sym.SafeBase64.dll_OpenVolumeDriver
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180018035
lea rdx, [rbp - 0x60]
mov rcx, rax
call fcn.180016f50
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x180018035
xor eax, eax
mov qword [rsp + 0x180], r12
mov qword [rdi], rax
movzx ecx, r14w
mov qword [rdi + 8], rax
mov qword [rdi + 0x10], rax
mov qword [rdi + 0x18], rax
mov qword [rdi + 0x20], rax
mov qword [rdi + 0x28], rax
mov qword [rdi + 0x30], rax
mov qword [rdi + 0x38], rax
mov dword [rdi + 0x40], eax
mov dword [rdi + 0x24], 0x200
mov qword [rsp + 0x188], r15
call sym.SafeBase64.dll_OpenVolumeDriver
xor ebx, ebx
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x180017e8d
mov r15d, ebx
jmp 0x180017ece
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x78]
mov dword [rsp + 0x28], 0x20
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, 0x560000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, rsi
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rdi + 0x24]
test r15d, r15d
mov r15, qword [rsp + 0x188]
je 0x180017ef0
mov rax, qword [rbp - 0x70]
cqo
idiv rcx
mov r8, rax
mov rax, qword [rbp - 0x78]
jmp 0x180017f00
mov rax, qword [rbp - 0x50]
cqo
idiv rcx
mov r8, rax
mov rax, qword [rbp - 0x58]
cqo
idiv rcx
mov edx, 7
mov qword [rdi], rax
mov eax, edx
mov qword [rdi + 0x18], r8
cmp dword [rbp - 0x60], 0
jne 0x180017f1d
movzx eax, byte [rbp - 0x40]
add eax, 0xfffffffc
cmp eax, 0xa
ja case.0x180017f37.5
lea r8, [0x180000000]
mov ecx, dword [r8 + rax*4 + 0x18054]
add rcx, r8
jmp rcx
mov edx, 5
jmp case.0x180017f37.7
mov edx, 6
jmp case.0x180017f37.7
movzx ecx, r14w
call sym.SafeBase64.dll_GetFileSystemType
mov edx, eax
mov dword [rdi + 0x2c], edx
lea r9, [rsp + 0x44]
movzx eax, r14w
lea r8, [rdi + 0x24]
and eax, 0xdf
lea rdx, [rdi + 0x20]
mov dword [rdi + 0x34], eax
lea rcx, [rbp + 0x30]
movabs rax, 0x5c003a0043
mov qword [rbp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov word [rbp + 0x30], r14w
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceW]
mov r12, qword [rsp + 0x180]
test eax, eax
jne 0x180017fb8
mov rax, qword [rdi + 0x18]
mov rcx, rax
mov dword [rdi + 0x20], 1
mov dword [rdi + 0x24], 0x200
jmp 0x180017fc0
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x44]
mov qword [rdi + 8], rcx
lea r9, [rsp + 0x50]
lea rcx, [rbp + 0x30]
mov qword [rdi + 0x10], rax
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x180018009
mov r8d, dword [rdi + 0x20]
xor edx, edx
mov rax, qword [rsp + 0x50]
shl r8d, 9
div r8
xor edx, edx
mov qword [rdi + 8], rax
mov rax, qword [rsp + 0x58]
div r8
mov qword [rdi + 0x10], rax
lea rcx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
lea rdx, [rsp + 0x60]
movzx ecx, r14w
mov dword [rdi + 0x30], eax
call sym.SafeBase64.dll_GetDiskNumber
test eax, eax
mov eax, 1
cmovne ebx, dword [rsp + 0x64]
mov dword [rdi + 0x28], ebx
jmp 0x180018037
xor eax, eax
mov rcx, qword [rbp + 0x38]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x140
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret