Function at 0x140006894
Capabilities:
Get disk information

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3f0]
sub rsp, 0x4f0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x3e0], rax
mov rdi, r8
mov qword [rbp - 0x70], r8
mov r15, rdx
mov dword [rsp + 0x50], ecx
xor ebx, ebx
lea rcx, str.AsrpGetMorePartitionInfo
lea esi, [rbx + 1]
call fcn.140007418
mov r14d, 0x206
mov qword [rsp + 0x40], rbx
mov r8d, r14d
mov word [rbp - 0x40], bx
xor edx, edx
lea rcx, [rbp - 0x3e]
call sub.msvcrt.dll_memset
mov r8d, r14d
mov word [rbp + 0x1d0], bx
xor edx, edx
lea rcx, [rbp + 0x1d2]
call sub.msvcrt.dll_memset
xor edx, edx
mov word [rbp - 0x68], bx
lea r8d, [rbx + 0x26]
lea rcx, [rbp - 0x66]
call sub.msvcrt.dll_memset
or eax, 0xffffffff
mov qword [rsp + 0x48], rbx
or r12, 0xffffffffffffffff
mov dword [rsp + 0x74], eax
mov qword [rbp - 0x78], r12
mov r14d, ebx
mov dword [rsp + 0x64], eax
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x80], rbx
test rdi, rdi
je 0x14000695b
mov qword [rdi], rbx
test r15, r15
je 0x140049564
test rdi, rdi
je 0x1400495d3
cmp dword [r15 + 4], ebx
je 0x14004964b
lea rax, [rsp + 0x68]
mov qword [rsp + 0x68], rbx
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetControlMiniNT
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x68]
mov edi, ebx
test eax, eax
sete dil
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
jbe 0x14004960c
test edi, edi
jne 0x140049618
call fcn.140004ed0
movsxd rdi, eax
test eax, eax
je 0x140049653
cmp edi, esi
jne 0x1400069ec
lea rcx, [rsp + 0x74]
call fcn.14000547c
test eax, eax
je 0x140049690
lea rcx, [rbp + 0x1d0]
call fcn.140005570
test eax, eax
je 0x1400496c0
mov r13d, 3
mov qword [rsp + 0x30], rbx
mov r8d, r13d
mov dword [rsp + 0x28], 0x2000000
xor r9d, r9d
mov dword [rsp + 0x20], r13d
mov edx, 0x80000000
lea rcx, [rbp + 0x1d0]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov qword [rbp - 0x78], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140049bd9
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rcx
xor r9d, r9d
mov rcx, rax
xor r8d, r8d
mov edx, 0x560000
call fcn.1400064f4
test eax, eax
je 0x140049705
lea rcx, [rsp + 0x48]
call fcn.140005e5c
test eax, eax
je 0x14004974a
mov rcx, qword [rsp + 0x48]
cmp word [rcx], bx
je 0x140006aac
mov rax, r12
inc rax
cmp word [rcx + rax*2], bx
jne 0x140006a8b
cmp word [rcx + rax*2 - 2], 0x5c
jne 0x140006aac
inc r12
cmp word [rcx + r12*2], bx
jne 0x140006a9c
mov word [rcx + r12*2 - 2], bx
mov qword [rsp + 0x30], rbx
xor r9d, r9d
mov dword [rsp + 0x28], 0x2000000
mov r8d, r13d
mov edx, 0x80000000
mov dword [rsp + 0x20], r13d
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov r12, rax
mov qword [rsp + 0x58], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140049ba9
lea rax, [rbp - 0x80]
mov qword [rsp + 0x28], rbx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 0x560000
mov rcx, r12
call fcn.1400064f4
test eax, eax
je 0x1400497dd
mov eax, dword [r15 + 4]
lea ecx, [rax + rax*2]
shl ecx, 3
call fcn.140005bd0
mov qword [rsp + 0x40], rax
mov rdx, rax
test rax, rax
je 0x14004980d
mov ecx, ebx
mov dword [rsp + 0x70], ebx
cmp dword [r15 + 4], ebx
jbe 0x140006b81
mov r10, rdi
mov qword [rsp + 0x68], rdi
lea rdi, [0x14015a290]
mov r13d, 2
mov eax, ecx
lea r14, [rax + rax*8]
add r14, r14
lea rax, [rax + rax*2]
lea r12, [rdx + rax*8]
mov dword [r12 + 8], ecx
cmp dword [r15 + r14*8 + 0x48], ebx
jne 0x140006c1c
add ecx, esi
mov dword [rsp + 0x70], ecx
cmp ecx, dword [r15 + 4]
jb 0x140006b4f
mov r12, qword [rsp + 0x58]
mov rax, qword [rbp - 0x70]
mov rcx, rbx
mov r14, qword [rsp + 0x48]
mov qword [rax], rdx
call qword [sym.imp.api_ms_win_core_com_l1_1_1.dll_CoTaskMemFree]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_core_com_l1_1_1.dll_CoTaskMemFree]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.api_ms_win_core_com_l1_1_1.dll_CoTaskMemFree]
mov rcx, r14
call qword [sym.imp.api_ms_win_core_com_l1_1_1.dll_CoTaskMemFree]
mov rcx, qword [rbp - 0x78]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140006bc8
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rdx, [r12 - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x140006bdc
mov rcx, r12
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
lea rcx, str.AsrpGetMorePartitionInfo
call fcn.1400073f0
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
mov eax, esi
mov rcx, qword [rbp + 0x3e0]
xor rcx, rsp
call fcn.1400305f0
mov rbx, qword [rsp + 0x548]
add rsp, 0x4f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp dword [r15 + r14*8 + 0x30], ebx
jne 0x140006c30
mov al, byte [r15 + r14*8 + 0x50]
cmp al, 0xf
jbe 0x140006cfe
cmp dword [r15 + r14*8 + 0x30], esi
je 0x14004985e
mov rax, qword [rsp + 0x78]
mov ecx, ebx
mov r11d, dword [rsp + 0x50]
mov r9d, dword [rax]
test r9d, r9d
je 0x140006c78
mov r8, qword [rsp + 0x78]
mov eax, ecx
lea rdx, [rax + rax*2]
cmp dword [r8 + rdx*8 + 8], r11d
jne 0x140006c71
mov rax, qword [r15 + r14*8 + 0x38]
cmp qword [r8 + rdx*8 + 0x10], rax
je 0x140006d13
add ecx, esi
cmp ecx, r9d
jb 0x140006c4f
mov rax, qword [rbp - 0x80]
mov ecx, ebx
mov r9d, dword [rax]
test r9d, r9d
je 0x140006cae
mov r8, qword [rbp - 0x80]
mov eax, ecx
lea rdx, [rax + rax*2]
cmp dword [r8 + rdx*8 + 8], r11d
jne 0x140006ca7
mov rax, qword [r15 + r14*8 + 0x38]
cmp qword [r8 + rdx*8 + 0x10], rax
je 0x140006d43
add ecx, esi
cmp ecx, r9d
jb 0x140006c86
mov edx, dword [r15 + r14*8 + 0x48]
lea r9, [rbp - 0x40]
mov ecx, r11d
call fcn.140008598
test eax, eax
je 0x140049b88
mov rdx, r12
lea rcx, [rbp - 0x40]
call fcn.140006d60
test eax, eax
je 0x140049899
mov rcx, qword [0x14015a290]
mov r10, qword [rsp + 0x68]
cmp r10, r13
je 0x1400498d2
mov rdx, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x70]
jmp 0x140006b70
mov r8d, 0x8021
bt r8d, eax
jae 0x140006c30
jmp 0x140006b70
or word [r12 + 0xc], r13w
movzx eax, word [r12 + 0xc]
cmp r10, rsi
jne 0x140006d4e
cmp dword [rsp + 0x74], r11d
jne 0x140006d4e
or ax, 4
mov word [r12 + 0xc], ax
cmp r10, r13
jne 0x140006c78
jmp 0x140049886
or word [r12 + 0xc], si
jmp 0x140006cae
cmp r10, r13
jne 0x140006c78
jmp 0x140006d2b
mov r9d, 0x57
mov esi, ebx
mov ebx, r9d
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x140049c18
test byte [rcx + 0x1c], 8
je 0x140049c18
lea edx, [r9 - 0x3b]
lea rax, str.pDriveLayoutEx
jmp 0x1400495b9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x20
lea rax, str.GetRdisk0DeviceNumber_dwRDisk0DevNumber_
mov rcx, qword [0x14015a290]
mov rcx, qword [rcx + 0x10]
lea r8, [0x1401304d8]
mov qword [rsp + 0x20], rax
call fcn.1400d5cb0
jmp 0x140049c18
mov r9d, 0x57
mov esi, ebx
mov ebx, r9d
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x140049c18
test byte [rcx + 0x1c], 8
je 0x140049c18
lea edx, [r9 - 0x3a]
lea rax, str.ppPartitionTable
jmp 0x1400495b9
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
nop
jmp 0x1400069be
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x14004964b
mov r13d, 2
test byte [rcx + 0x1c], r13b
je 0x14004964b
mov rcx, qword [rcx + 0x10]
lea edx, [r13 + 0x1c]
lea r8, [0x1401304d8]
call fcn.1400d5a44
mov rcx, rbx
jmp 0x140006b90
mov r9d, 0x65e
mov esi, ebx
mov ebx, r9d
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x140049c18
test byte [rcx + 0x1c], 8
je 0x140049c18
mov edx, 0x1f
lea rax, str.ERROR_UNSUPPORTED_TYPE
jmp 0x1400495b9
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rax, rdi
je 0x140049c18
test byte [rax + 0x1c], 8
je 0x140049c18
jmp 0x14004959d
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rax, rdi
je 0x140049c18
test byte [rax + 0x1c], 8
je 0x140049c18
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x21
lea rax, str.AsrGetSystemVolumeGlobalRootPath__wszSysVolPath__ARRAYSIZE_wszSysVolPath___
jmp 0x1400495b2
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rax, rdi
je 0x140049c18
test byte [rax + 0x1c], 8
je 0x140049c18
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x23
lea rax, str.DoVolumeIoctlCall_hSystemVolume__IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS__NULL__0___void__pSystemVolExtents__NULL_
jmp 0x1400495b2
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rax, rdi
je 0x1400497d3
test byte [rax + 0x1c], 8
je 0x1400497d3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x24
lea rax, str.GetBootVolumeGuidName_pwszBootVolGuidName_
jmp 0x140049799
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x26
lea rax, str.DoVolumeIoctlCall_hBootVolume__IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS__NULL__0___void__pBootVolExtents__NULL_
mov rcx, qword [0x14015a290]
lea r8, [0x1401304d8]
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx + 0x10]
call fcn.1400d5cb0
jmp 0x1400497d3
mov rcx, qword [rcx + 0x10]
lea r9, str.hBootVolume
mov edx, 0x25
lea r8, [0x1401304d8]
call fcn.1400d6fe8
mov r14, qword [rsp + 0x48]
jmp 0x140049c18
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rax, rdi
je 0x140049b57
test byte [rax + 0x1c], 8
je 0x140049b57
jmp 0x140049784
mov r9d, 0xe
mov esi, ebx
mov ebx, r9d
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x140049b57
test byte [rcx + 0x1c], 8
je 0x140049b57
mov rcx, qword [rcx + 0x10]
lea rax, str.pPartitionTable
lea edx, [r9 + 0x19]
mov qword [rsp + 0x20], rax
lea r8, [0x1401304d8]
call fcn.1400d5cb0
jmp 0x140049b57
mov rax, qword [r15 + r14*8 + 0x50]
sub rax, qword [0x140128458]
jne 0x140049878
mov rax, qword [r15 + r14*8 + 0x58]
sub rax, qword [0x140128460]
test rax, rax
je 0x140006b70
jmp 0x140006c3b
mov eax, dword [r15 + r14*8 + 0x48]
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x64], r11d
jmp 0x140006c78
mov rcx, qword [0x14015a290]
cmp rcx, rdi
je 0x140006ce2
test byte [rcx + 0x1c], r13b
je 0x140006ce2
mov rcx, qword [rcx + 0x10]
lea r9, [rbp - 0x40]
mov edx, 0x29
lea r8, [0x1401304d8]
call fcn.1400d5b58
nop
jmp 0x140006cdb
cmp dword [r15 + r14*8 + 0x30], esi
jne 0x140049907
mov rax, qword [r15 + r14*8 + 0x50]
sub rax, qword [0x140128478]
jne 0x1400498f3
mov rax, qword [r15 + r14*8 + 0x58]
sub rax, qword [0x140128480]
test rax, rax
jne 0x140049907
mov r8d, dword [rsp + 0x50]
mov eax, dword [rsp + 0x64]
mov edx, dword [rsp + 0x60]
jmp 0x140049928
mov r8d, dword [rsp + 0x50]
mov eax, dword [rsp + 0x64]
cmp r8d, eax
jne 0x140006cf0
mov edx, dword [rsp + 0x60]
cmp dword [r15 + r14*8 + 0x48], edx
jne 0x140006cf0
cmp r8d, eax
jne 0x140049934
cmp dword [r15 + r14*8 + 0x48], edx
je 0x140049965
cmp rcx, rdi
je 0x140049965
test byte [rcx + 0x1c], 4
je 0x140049965
mov eax, dword [r15 + r14*8 + 0x48]
mov r9d, r8d
mov rcx, qword [rcx + 0x10]
lea r8, [0x1401304d8]
mov edx, 0x2a
mov dword [rsp + 0x20], eax
call fcn.1400d5c68
mov r8d, dword [rsp + 0x50]
mov eax, dword [r15 + r14*8 + 0x48]
lea r9, str._GLOBALROOT
mov dword [rsp + 0x28], eax
lea rcx, [rbp - 0x40]
mov dword [rsp + 0x20], r8d
mov edx, 0x104
lea r8, str._sDeviceHarddisk_dPartition_d_
call fcn.140008be0
test eax, eax
js 0x140049b66
mov dword [rsp + 0x38], 0x14
lea rax, [rbp - 0x68]
mov qword [rsp + 0x30], rax
lea rcx, [rbp - 0x40]
mov byte [r12 + 0xe], bl
xor r9d, r9d
mov qword [rsp + 0x28], rbx
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x20], rbx
mov word [rbp - 0x68], bx
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetVolumeInformationW]
test eax, eax
jne 0x140049a6e
mov rax, qword [0x14015a290]
cmp rax, rdi
je 0x140049a14
test byte [rax + 0x1c], 4
je 0x140049a14
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov rcx, qword [0x14015a290]
mov r12d, dword [rsp + 0x50]
mov r9d, r12d
mov dword [rsp + 0x28], eax
mov eax, dword [r15 + r14*8 + 0x48]
mov rcx, qword [rcx + 0x10]
mov dword [rsp + 0x20], eax
call fcn.1400de2dc
jmp 0x140049a19
mov r12d, dword [rsp + 0x50]
cmp r12d, dword [rsp + 0x64]
jne 0x140049abb
mov eax, dword [rsp + 0x60]
cmp dword [r15 + r14*8 + 0x48], eax
jne 0x140049abb
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
cmp rax, rdi
je 0x140049b52
test byte [rax + 0x1c], 8
je 0x140049b52
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x2d
lea rax, str.::GetLastError__
jmp 0x140049ada
lea rdx, [r12 + 0xe]
lea rcx, [rbp - 0x68]
call fcn.1400e841c
test eax, eax
jne 0x140049abb
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
cmp rax, rdi
je 0x140049b52
test byte [rax + 0x1c], 8
je 0x140049b52
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x2e
lea rax, str.GetFileSytemType__wszFsName__pPartitionTable_dwIndex_.FileSystemType__
jmp 0x140049ada
mov r10, qword [rsp + 0x68]
jmp 0x140006cf0
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov r9d, eax
mov edx, 0x28
lea rax, str.DiskBuildDevicePartitionPath__dwDeviceNumber__pCurPtnEx__PartitionNumber__FALSE__ARRAY_COUNT_PARAM_wszDevicePath___
mov rcx, qword [0x14015a290]
lea r8, [0x1401304d8]
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx + 0x10]
call fcn.1400d5cb0
jmp 0x140049b52
mov eax, dword [r15 + r14*8 + 0x48]
lea r9, str._GLOBALROOT
mov r12d, dword [rsp + 0x50]
lea r8, str._sDeviceHarddisk_dPartition_d_
mov dword [rsp + 0x28], eax
lea rcx, [rbp - 0x40]
mov edx, 0x104
mov dword [rsp + 0x20], r12d
call fcn.140008be0
mov rcx, qword [0x14015a290]
lea r8, [0x1401304d8]
mov r9d, eax
mov edx, 0x2b
lea rax, str.::StringCchPrintf__wszDevicePath__ARRAYSIZE_wszDevicePath___L__sDeviceHarddisk_dPartition_d___L__GLOBALROOT___dwDeviceNumber__pCurPtnEx__PartitionNumber__
mov qword [rsp + 0x20], rax
mov rcx, qword [rcx + 0x10]
call fcn.1400d5cb0
mov r12, qword [rsp + 0x58]
mov r14, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
jmp 0x140006b90
mov ecx, eax
mov esi, ebx
call fcn.1400e32f8
mov ebx, eax
mov rax, qword [0x14015a290]
cmp rax, rdi
je 0x140049b52
test byte [rax + 0x1c], 8
je 0x140049b52
jmp 0x140049af8
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rax, qword [0x14015a290]
cmp rax, rdi
je 0x140049b52
test byte [rax + 0x1c], 8
je 0x140049b52
jmp 0x140049ac5
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x1400497d3
test byte [rcx + 0x1c], 8
je 0x1400497d3
jmp 0x1400497b7
mov esi, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x14015a290]
lea rdi, [0x14015a290]
cmp rcx, rdi
je 0x140049c18
test byte [rcx + 0x1c], 8
je 0x140049c18
mov rcx, qword [rcx + 0x10]
lea r9, str.hSystemVolume
mov edx, 0x22
lea r8, [0x1401304d8]
call fcn.1400d6fe8
mov rcx, rsi
jmp 0x140006b90