Function at 0x40c7b0
Capabilities:
Get disk information
Get disk size
Get volume information via ioctl

Disassembly:
mov r11, rsp
sub rsp, 0x968
mov rax, qword [0x0042baf8]
mov qword [rsp + 0x920], rax
mov qword [r11 + 0x20], rbx
mov qword [r11 - 8], rbp
mov qword [r11 - 0x10], rsi
mov qword [r11 - 0x18], rdi
mov qword [r11 - 0x20], r12
mov qword [r11 - 0x28], r13
lea r13, [rcx + 0x48]
mov qword [r11 - 0x30], r14
mov qword [r11 - 0x38], r15
xor r15d, r15d
mov rbx, rcx
mov r12d, r8d
mov dword [rcx], r15d
mov qword [rcx + 0x28], r15
mov dword [rcx + 0x30], r15d
mov qword [rcx + 0x38], r15
mov qword [rcx + 0x40], r15
mov word [rcx + 0xb0], r15w
mov qword [rcx + 0x178], r15
mov dword [rcx + 0x180], r15d
mov qword [rcx + 0x1b0], r15
mov qword [rcx + 0x1b8], r15
mov qword [rcx + 0x1c0], r15
mov qword [rcx + 0x1c8], r15
mov qword [rcx + 0x1d0], r15
mov qword [rcx + 0x1d8], r15
mov qword [rcx + 0x1e0], r15
mov qword [rcx + 0x1e8], r15
mov word [r13], r15w
mov qword [rcx + 0x198], r15
mov qword [rcx + 0x1a0], r15
mov qword [rcx + 0x1a8], r15
mov dword [rcx + 0x1c], r15d
mov qword [rcx + 0x218], r15
mov qword [rcx + 0x220], r15
mov qword [rcx + 0x228], r15
mov qword [rcx + 0x230], r15
mov qword [rcx + 0x238], r15
mov qword [rcx + 0x240], r15
mov qword [rcx + 0x248], r15
mov qword [rcx + 0x1f0], r15
mov qword [rcx + 0x1f8], r15
mov qword [rcx + 0x200], r15
mov qword [rcx + 0x208], r15
mov qword [rcx + 0x210], r15
mov qword [rcx + 0x250], r15
mov qword [rcx + 0x258], r15
lea rcx, [rsp + 0x78]
mov rbp, rdx
call fcn.0040f6f0
mov rdx, qword [rsp + 0x78]
movzx eax, word [rsp + 0x80]
mov r11, qword [rbx + 0x188]
mov qword [rbx + 0x270], r15
imul rdx, rdx, 0x3e8
test r11, r11
lea rcx, [rdx + rax]
mov qword [rbx + 0x20], rbp
mov qword [rbx + 0x268], rcx
mov qword [rbx + 0x278], rcx
je 0x40ca51
mov r10d, r15d
cmp qword [r11], r10
je 0x40c9f0
mov r9, r15
nop
nop
nop
test rbp, rbp
mov r8, qword [r11 + r9]
je 0x40c9d8
test r8, r8
je 0x40c9d8
lea rdi, [0x00422264]
mov rsi, r8
mov ecx, 2
repe cmpsw word [rsi], word [rdi]
je 0x40c9f0
cmp word [r8], r15w
mov rdi, rbp
je 0x40c9ba
movzx ecx, word [rdi]
test cx, cx
je 0x40c9ba
movzx edx, word [r8]
lea eax, [rdx - 0x41]
cmp ax, 0x19
ja 0x40c991
lea esi, [rdx + 0x20]
jmp 0x40c994
movzx esi, dx
lea eax, [rcx - 0x41]
cmp ax, 0x19
ja 0x40c9a1
add cx, 0x20
cmp si, cx
je 0x40c9ac
cmp dx, 0x3f
jne 0x40ca20
add r8, 2
add rdi, 2
cmp word [r8], r15w
jne 0x40c977
cmp word [r8], 0x2a
jne 0x40c9cc
add r8, 2
cmp word [r8], 0x2a
je 0x40c9c1
cmp word [rdi], r15w
jne 0x40c9d8
cmp word [r8], r15w
je 0x40c9f0
mov rax, qword [rbx + 0x188]
add r9, 8
inc r10d
cmp qword [r9 + rax], r15
jne 0x40c940
movsxd r9, r10d
cmp qword [r11 + r9*8], r15
je 0x40ca51
mov r8, qword [rbx + 0x2b0]
mov r9, qword [r11 + r9*8]
xor edx, edx
mov r8, qword [r8 + 0x178]
lea ecx, [rdx + 4]
mov qword [rsp + 0x20], rbp
call qword [rbx + 0x298]
jmp 0x40d29a
cmp word [r8], 0x2a
jne 0x40c9d8
cmp word [r8 + 2], r15w
je 0x40c9f0
cmp word [rdi], r15w
je 0x40c9d8
lea rdx, [r8 + 2]
mov rcx, rdi
call sym.JkDefragCmd64.exe_MatchMask
cmp eax, 1
je 0x40c9f0
add rdi, 2
cmp word [rdi], r15w
jne 0x40ca34
jmp 0x40c9d8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x58]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40cac2
lea r8, [rsp + 0x60]
lea rdx, str.SeBackupPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x40cac2
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
lea r8, [rsp + 0x68]
mov r9d, 0x10
xor edx, edx
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x6c], rax
mov dword [rsp + 0x68], 1
mov dword [rsp + 0x74], 2
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, rbp
call fcn.00410890
test rax, rax
mov rdx, rax
mov qword [rbx + 0x38], rax
je 0x40d29a
xor eax, eax
mov rdi, rdx
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
not rcx
mov r8d, ecx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
jne 0x40cb1c
mov rdi, qword [rbx + 0x20]
mov rcx, 0xffffffffffffffff
mov r8, rbp
repne scasw ax, word [rdi]
not rcx
mov rdx, rcx
mov rcx, qword [rbx + 0x38]
call fcn.0040f730
mov rcx, qword [rbx + 0x2b0]
mov rdx, qword [rbx + 0x20]
mov rcx, qword [rcx + 0x70]
call qword [rbx + 0x2a8]
mov rcx, qword [rbx + 0x38]
xor edx, edx
call fcn.004107b0
cmp rax, qword [rbx + 0x38]
je 0x40cb4e
cmp word [rax - 2], 0x5c
jne 0x40cb4e
mov word [rax - 2], r15w
mov rdi, qword [rbx + 0x38]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
not rcx
lea rdi, [rcx - 1]
lea rcx, [rcx + rcx + 2]
call fcn.00410900
test rax, rax
mov qword [rbx + 0x40], rax
jne 0x40cb81
mov rcx, qword [rbx + 0x38]
jmp 0x40d295
mov r9, qword [rbx + 0x38]
lea r8, [0x00422588]
lea rdx, [rdi + 2]
mov rcx, rax
call fcn.0040f7a0
mov rcx, qword [rbx + 0x40]
lea rdx, [rbx + 0xb0]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
jne 0x40cca5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov edi, eax
lea rax, [rsp + 0x120]
xor edx, edx
mov ecx, 0x3000
mov r8d, edi
mov dword [rsp + 0x28], 0x200
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea rcx, [rsp + 0x120]
xor edx, edx
call fcn.004107b0
lea rcx, [rsp + 0x120]
cmp rax, rcx
je 0x40cc41
nop
nop
movzx ecx, word [rax - 2]
sub rax, 2
cmp cx, 0x20
je 0x40cc30
cmp cx, 9
je 0x40cc30
cmp cx, 0xa
je 0x40cc30
cmp cx, 0xd
jne 0x40cc41
lea rcx, [rsp + 0x120]
mov word [rax], r15w
cmp rax, rcx
jne 0x40cc10
lea rax, [rsp + 0x120]
lea r8, str.__lu___s
lea rcx, [rsp + 0x520]
mov r9d, edi
mov edx, 0x200
mov qword [rsp + 0x20], rax
call fcn.0040f7a0
mov r8, qword [rbx + 0x2b0]
mov r9, qword [rbx + 0x38]
mov r8, qword [r8 + 0x140]
lea rax, [rsp + 0x520]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [rbx + 0x298]
mov rcx, qword [rbx + 0x38]
call fcn.004109b0
mov rcx, qword [rbx + 0x40]
jmp 0x40d295
lea r8, [rbx + 0xb0]
mov edx, 0x33
mov rcx, r13
call fcn.0040f730
xor edx, edx
mov rcx, r13
call fcn.004107b0
cmp rax, r13
je 0x40ccd4
cmp word [rax - 2], 0x5c
jne 0x40ccd4
mov word [rax - 2], r15w
mov r8, qword [rbx + 0x2b0]
mov rax, qword [rbx + 0x38]
xor edx, edx
mov r8, qword [r8 + 0xe8]
lea ecx, [rdx + 2]
mov r9, r13
mov qword [rsp + 0x20], rax
call qword [rbx + 0x298]
xor r9d, r9d
mov qword [rsp + 0x30], r15
lea r8d, [r9 + 3]
mov edx, 0x80000000
mov rcx, r13
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov qword [rbx + 0x28], rax
jne 0x40ce1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov edi, eax
lea rax, [rsp + 0x120]
xor edx, edx
mov ecx, 0x3000
mov r8d, edi
mov dword [rsp + 0x28], 0x200
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
lea rcx, [rsp + 0x120]
xor edx, edx
call fcn.004107b0
lea rcx, [rsp + 0x120]
cmp rax, rcx
je 0x40cdb1
nop
movzx ecx, word [rax - 2]
sub rax, 2
cmp cx, 0x20
je 0x40cda0
cmp cx, 9
je 0x40cda0
cmp cx, 0xa
je 0x40cda0
cmp cx, 0xd
jne 0x40cdb1
lea rcx, [rsp + 0x120]
mov word [rax], r15w
cmp rax, rcx
jne 0x40cd80
lea rax, [rsp + 0x120]
lea r8, str.__lu___s
lea rcx, [rsp + 0x520]
mov r9d, edi
mov edx, 0x200
mov qword [rsp + 0x20], rax
call fcn.0040f7a0
mov r8, qword [rbx + 0x2b0]
lea rax, [rsp + 0x520]
mov r8, qword [r8 + 0xf0]
mov qword [rsp + 0x28], rax
mov rax, qword [rbx + 0x38]
xor edx, edx
mov r9, r13
mov qword [rsp + 0x20], rax
lea ecx, [rdx + 1]
call qword [rbx + 0x298]
mov rcx, qword [rbx + 0x38]
call fcn.004109b0
mov rcx, qword [rbx + 0x40]
jmp 0x40d295
mov qword [rsp + 0x38], r15
lea rcx, [rsp + 0x40]
lea r8, [rsp + 0x48]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x100]
mov dword [rsp + 0x28], 0x18
mov qword [rsp + 0x20], rcx
mov r9d, 8
mov edx, 0x9006f
mov rcx, rax
mov qword [rsp + 0x48], r15
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40ceb5
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40ceb5
cmp eax, 0xea
je 0x40ceb5
mov r8, qword [rbx + 0x2b0]
mov rax, qword [rbx + 0x38]
mov r9, r13
mov r8, qword [r8 + 0x100]
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [rbx + 0x298]
mov rcx, qword [rbx + 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x38]
call fcn.004109b0
mov rcx, qword [rbx + 0x40]
jmp 0x40d295
mov rdx, qword [rsp + 0x100]
mov rax, qword [rsp + 0x108]
lea r9, [rsp + 0x90]
add rdx, rax
lea r8, [rsp + 0x50]
mov rcx, rbp
mov qword [rbx + 0x1e0], rdx
lea rdx, [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x40cf06
mov rax, qword [rsp + 0x50]
xor edx, edx
div qword [rbx + 0x1e0]
mov qword [rbx + 0x1e8], rax
mov rcx, qword [rbx + 0x28]
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xa0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x90064
mov dword [rsp + 0x28], 0x60
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40d0a2
mov ecx, dword [rsp + 0xcc]
mov rax, qword [rsp + 0xd8]
mov r9, qword [rsp + 0xe0]
mov rsi, qword [rsp + 0xf0]
mov r8, qword [rbx + 0x2b0]
cqo
idiv rcx
mov rdx, qword [rsp + 0xe8]
mov qword [rbx + 0x1e8], rcx
mov dword [rbx + 0x30], 1
mov qword [rbx + 0x1d0], rdx
mov qword [rbx + 0x1b0], r9
mov qword [rbx + 0x1c0], rsi
mov rdi, rax
lea rcx, [r9 + rax]
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x38], rdi
mov qword [rbx + 0x1b8], rcx
lea rcx, [rdx + rdi]
mov qword [rsp + 0x30], rdx
mov qword [rbx + 0x1d8], rcx
xor edx, edx
mov qword [rbx + 0x1c8], rax
mov r8, qword [r8 + 0x108]
mov qword [rsp + 0x28], rax
lea ecx, [rdx + 3]
mov qword [rsp + 0x20], rsi
call qword [rbx + 0x298]
mov rax, qword [rbx + 0x1b8]
mov r8, qword [rbx + 0x2b0]
mov qword [rsp + 0x30], rax
mov rax, qword [rbx + 0x1b0]
mov r8, qword [r8 + 0x110]
xor edx, edx
xor r9d, r9d
lea ecx, [rdx + 3]
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rax
call qword [rbx + 0x298]
mov rax, qword [rbx + 0x1c8]
mov r8, qword [rbx + 0x2b0]
mov r8, qword [r8 + 0x110]
mov qword [rsp + 0x30], rax
mov rax, qword [rbx + 0x1c0]
xor edx, edx
mov r9d, 1
mov dword [rsp + 0x28], 1
lea ecx, [rdx + 3]
mov qword [rsp + 0x20], rax
call qword [rbx + 0x298]
mov rax, qword [rbx + 0x1d8]
mov r8, qword [rbx + 0x2b0]
mov r8, qword [r8 + 0x110]
mov qword [rsp + 0x30], rax
mov rax, qword [rbx + 0x1d0]
xor edx, edx
mov r9d, 2
mov dword [rsp + 0x28], 2
lea ecx, [rdx + 3]
mov qword [rsp + 0x20], rax
call qword [rbx + 0x298]
mov rcx, rbx
call sym.JkDefragCmd64.exe_ShowDiskmap
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d0bb
mov rcx, rbx
call fcn.00409f50
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d0de
lea eax, [r12 - 1]
cmp eax, 2
ja 0x40d0de
mov rcx, rbx
call fcn.0040a620
mov rcx, rbx
call fcn.0040ac20
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d0fb
cmp r12d, 2
je 0x40d0f3
cmp r12d, 3
jne 0x40d0fb
mov rcx, rbx
call fcn.0040be90
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d112
cmp r12d, 4
jne 0x40d112
mov rcx, rbx
call fcn.0040b160
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d129
cmp r12d, 5
jne 0x40d129
mov rcx, rbx
call fcn.0040c460
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d142
cmp r12d, 6
jne 0x40d142
xor edx, edx
mov rcx, rbx
call fcn.0040b940
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d15e
cmp r12d, 7
jne 0x40d15e
lea edx, [r12 - 6]
mov rcx, rbx
call fcn.0040b940
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d17a
cmp r12d, 8
jne 0x40d17a
lea edx, [r12 - 6]
mov rcx, rbx
call fcn.0040b940
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d196
cmp r12d, 9
jne 0x40d196
lea edx, [r12 - 6]
mov rcx, rbx
call fcn.0040b940
mov rax, qword [rbx + 8]
cmp dword [rax], r15d
jne 0x40d1b2
cmp r12d, 0xa
jne 0x40d1b2
lea edx, [r12 - 6]
mov rcx, rbx
call fcn.0040b940
mov edx, 7
mov rcx, rbx
lea r8d, [rdx - 8]
call sym.JkDefragCmd64.exe_CallShowStatus
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x40d1d8
cmp rcx, 0xffffffffffffffff
je 0x40d1d8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rbx + 0x178]
test rsi, rsi
je 0x40d27e
mov rcx, qword [rsi + 8]
test rcx, rcx
je 0x40d1f6
call fcn.00406ac0
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x40d204
call fcn.00406ac0
mov rcx, qword [rsi + 0x30]
test rcx, rcx
je 0x40d220
mov rax, qword [rsi + 0x20]
test rax, rax
je 0x40d21b
cmp rcx, rax
je 0x40d220
call fcn.004109b0
mov rcx, qword [rsi + 0x28]
test rcx, rcx
je 0x40d23c
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x40d237
cmp rcx, rax
je 0x40d23c
call fcn.004109b0
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x40d24a
call fcn.004109b0
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x40d258
call fcn.004109b0
cmp qword [rsi + 0x68], r15
je 0x40d276
nop
mov rcx, qword [rsi + 0x68]
mov rdi, qword [rcx + 0x10]
call fcn.004109b0
cmp rdi, r15
mov qword [rsi + 0x68], rdi
jne 0x40d260
mov rcx, rsi
call fcn.004109b0
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x40d28c
call fcn.004109b0
mov rcx, qword [rbx + 0x40]
test rcx, rcx
je 0x40d29a
call fcn.004109b0
mov r15, qword [rsp + 0x930]
mov r14, qword [rsp + 0x938]
mov r13, qword [rsp + 0x940]
mov r12, qword [rsp + 0x948]
mov rdi, qword [rsp + 0x950]
mov rsi, qword [rsp + 0x958]
mov rbp, qword [rsp + 0x960]
mov rbx, qword [rsp + 0x988]
mov rcx, qword [rsp + 0x920]
call fcn.0041e010
add rsp, 0x968
ret