Function at 0x140021d54
Capabilities:
Get disk size

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x230]
sub rsp, 0x330
mov rax, qword [0x140178010]
xor rax, rsp
mov qword [rbp + 0x220], rax
mov dword [rbp - 0x68], r8d
mov rsi, rcx
mov qword [rbp - 0x78], rdx
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x140021dc3
test byte [rcx + 0x1c], 1
je 0x140021dc3
cmp byte [rcx + 0x19], 4
jb 0x140021dc3
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x1c0
call fcn.140004c6c
xor r14d, r14d
cmp dword [rsi + 0x150], 1
mov r15d, r14d
mov dword [rsp + 0x40], r14d
mov r12d, r14d
mov qword [rsp + 0x78], r14
mov r13d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], r14
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x80], r14
mov qword [rsp + 0x68], r14
mov qword [rbp - 0x38], r14
mov qword [rsp + 0x48], r14
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], r14
jne 0x140021e26
lea r8, str.m_eMediaType___BLB_MT_SHINY
mov edx, 0x27ff
lea rcx, str.base_stor_blbengine_service_backup.cpp
call fcn.14008624c
cmp byte [rsi + 0x186], r14b
jne 0x140021e47
lea r8, str.m_bSystemState
mov edx, 0x2800
lea rcx, str.base_stor_blbengine_service_backup.cpp
call fcn.14008624c
xor edx, edx
lea rcx, [rbp + 0x10]
mov r8d, 0x208
call sub.msvcrt.dll_memset
lea rcx, [rsi + 0x2c8]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [rsi + 0x170]
test ecx, ecx
je 0x140021e9b
mov rax, qword [rsi + 0xd8]
mov edx, ecx
add rax, 0x68
test byte [rax - 0x14], 1
jne 0x140021e8a
cmp byte [rax], r14b
je 0x140021e8a
inc r15d
add rax, 0x170
sub rdx, 1
jne 0x140021e7c
mov dword [rsp + 0x40], r15d
mov ebx, r15d
shl rbx, 3
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov qword [rbp - 0x50], rax
test rax, rax
jne 0x140021ec3
mov ebx, 0x8007000e
mov r14, qword [rsp + 0x48]
jmp 0x14002241f
mov r8, rbx
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov qword [rbp - 0x60], rax
test rax, rax
je 0x140021eb4
mov r8, rbx
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov eax, 0xffffffff
cmp rbx, rax
jbe 0x140021f00
mov ebx, 0x80070216
jmp 0x140021eb9
mov ebx, ebx
mov ecx, ebx
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
xor edi, edi
mov qword [rbp - 0x80], rax
mov r14, rax
test rax, rax
je 0x140021eb4
mov r8d, ebx
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov r15d, edi
cmp dword [rsi + 0x170], edi
jbe 0x140022005
mov eax, r15d
imul r14, rax, 0x170
mov rax, qword [rsi + 0xd8]
test byte [rax + r14 + 0x54], 1
jne 0x140021ff1
cmp byte [rax + r14 + 0x68], dil
je 0x140021ff1
test r13, r13
je 0x140021f6f
mov rcx, r13
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rsp + 0x48], rdi
mov rcx, qword [rsi + 0xd8]
lea rdx, [rsp + 0x48]
add rcx, r14
call fcn.140013e94
mov ebx, eax
test eax, eax
js 0x1400225ea
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x48], rdi
mov rdi, qword [rsi + 0x338]
mov rax, qword [rdi]
mov rbx, qword [rax + 0x50]
mov rcx, rbx
call qword [0x14014cce0]
mov r13, qword [rsp + 0x48]
lea r9, [rbp - 0x48]
mov rdx, r13
lea r8, [rbp - 0x58]
mov rcx, rdi
call rbx
cmp r12d, dword [rsp + 0x40]
jae 0x140022061
mov rcx, qword [rsi + 0xd8]
inc r12d
mov rax, qword [rbp - 0x58]
xor edi, edi
mov qword [rcx + r14 + 0x30], rax
mov rcx, qword [rsi + 0xd8]
mov rax, qword [rbp - 0x48]
mov qword [rcx + r14 + 0x38], rax
inc r15d
cmp r15d, dword [rsi + 0x170]
jb 0x140021f34
mov r14, qword [rbp - 0x80]
mov rcx, qword [rsi + 0x158]
lea r8, [rbp - 0x38]
lea rdx, [0x14014d7b8]
call fcn.140087120
mov ebx, eax
test eax, eax
js 0x140022066
xor edx, edx
lea rcx, [rsi + 0x28]
call fcn.1400fc6dc
xor r15d, r15d
mov ebx, eax
test eax, eax
js 0x140022066
mov rbx, qword [rbp - 0x38]
lea r9, [rsp + 0x60]
mov rcx, rbx
lea r8, [rbp - 0x70]
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x140022075
mov rcx, rbx
call fcn.140133a1c
mov ebx, eax
jmp 0x140022078
mov ebx, 0x8000ffff
mov r14, qword [rsp + 0x48]
mov r15d, dword [rsp + 0x40]
jmp 0x14002241a
mov ebx, r15d
test ebx, ebx
js 0x140022066
lea rcx, [rsi + 0x28]
call fcn.1400fc870
xor r9d, r9d
mov r12d, r9d
mov eax, r9d
mov dword [rsp + 0x70], eax
cmp dword [rsi + 0x170], r9d
jbe 0x140022600
mov rdi, qword [rsi + 0xd8]
imul rcx, rax, 0x170
add rdi, rcx
mov qword [rbp - 0x70], rcx
test byte [rdi + 0x54], 1
jne 0x1400223f5
cmp byte [rdi + 0x68], r9b
je 0x1400223f5
mov r15d, dword [rsp + 0x40]
cmp r12d, r15d
jae 0x1400225f9
test r13, r13
je 0x1400220ea
mov rcx, r13
call qword [sym.imp.ole32.dll_CoTaskMemFree]
and qword [rsp + 0x48], 0
lea rdx, [rsp + 0x48]
mov rcx, rdi
call fcn.140013e94
mov ebx, eax
test eax, eax
js 0x1400225ef
mov rax, qword [rbp - 0x50]
xor r8d, r8d
mov r14, qword [rsp + 0x48]
mov r13d, r12d
mov rcx, r14
lea rdx, [rax + r13*8]
call fcn.14008704c
mov ebx, eax
test eax, eax
js 0x14002241a
xor ebx, ebx
cmp qword [rsp + 0x78], rbx
je 0x14002213f
lea rcx, [rsp + 0x78]
call qword [sym.imp.RPCRT4.dll_RpcStringFreeW]
mov qword [rsp + 0x78], rbx
lea rdx, [rsp + 0x78]
lea rcx, [rdi + 0x44]
call qword [sym.imp.RPCRT4.dll_UuidToStringW]
test eax, eax
jne 0x1400225e0
mov r9, qword [rsp + 0x78]
lea r8, str._s.vhdx
mov edx, 0x104
lea rcx, [rbp + 0x10]
call fcn.1400102c4
mov ebx, eax
test eax, eax
js 0x14002241a
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [rsi + 0x1d8]
lea rdx, [rsp + 0x60]
and qword [rsp + 0x60], 0
call fcn.140086e28
mov ebx, eax
test eax, eax
js 0x1400225d1
mov rax, qword [rbp - 0x60]
lea rdx, [rbp + 0x10]
lea r14, [rax + r13*8]
mov rax, qword [rsp + 0x60]
mov rcx, rax
mov qword [rsp + 0x58], rax
mov r8, r14
call fcn.140087120
mov ebx, eax
test eax, eax
js 0x1400228bd
xor edx, edx
lea rcx, [rsi + 0x28]
call fcn.1400fc6dc
mov ebx, eax
test eax, eax
js 0x140022415
mov rcx, qword [r14]
call fcn.14008d724
lea rcx, [rsi + 0x28]
mov bl, al
call fcn.1400fc870
test bl, bl
je 0x1400222a3
lea rbx, [rdi + 0xe0]
xor r15d, r15d
cmp qword [rbx], r15
je 0x140022269
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x140022244
test byte [rcx + 0x1c], 1
je 0x140022244
cmp byte [rcx + 0x19], 4
jb 0x140022244
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x1c1
call fcn.140004c6c
mov r14, qword [rbp - 0x80]
xor r8d, r8d
mov rcx, qword [rbx]
lea rdx, [r14 + r13*8]
call fcn.14008704c
xor r9d, r9d
mov ebx, eax
test eax, eax
js 0x140022066
jmp 0x1400223f2
test byte [rdi + 0x54], 0x18
jne 0x140022287
lea r8, str.VOLUME_IS_BLOCKLEVEL_pVolCtxt__m_dwVolumeFlags___VOLUME_IS_INCREMENTAL_pVolCtxt__m_dwVolumeFlags_
mov edx, 0x28db
lea rcx, str.base_stor_blbengine_service_backup.cpp
call fcn.14008624c
mov eax, dword [rsp + 0x70]
mov r8, rbx
mov rcx, qword [rbp - 0x60]
mov rdx, qword [rcx + rax*8]
mov rcx, rsi
call fcn.14002e834
jmp 0x140022344
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x1400222bc
mov rcx, rax
call qword [sym.imp.ole32.dll_CoTaskMemFree]
and qword [rsp + 0x50], 0
mov edx, dword [rdi + 0x54]
lea r8, [rsp + 0x50]
xor r9d, r9d
lea rcx, [rdi + 0x44]
call fcn.140089d9c
mov ebx, eax
test eax, eax
js 0x140022415
mov r15, qword [rsp + 0x50]
lea rdx, [rsp + 0x68]
mov rcx, r15
call fcn.14008987c
mov ebx, eax
test eax, eax
js 0x140022066
lea rdx, [rbp - 0x40]
mov rcx, r15
call fcn.140131aac
xor r15d, r15d
mov ebx, eax
test eax, eax
js 0x140022066
mov ecx, dword [rdi + 0x40]
lea rax, [rdi + 0xe0]
mov r9, qword [rdi + 0x60]
mov r8, qword [rsp + 0x68]
mov rdx, qword [r14]
mov qword [rsp + 0x38], rax
mov rax, qword [rbp - 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov rcx, rsi
mov byte [rsp + 0x20], r15b
call fcn.140021b00
mov ebx, eax
test eax, eax
js 0x140022066
mov rax, qword [rbp - 0x80]
mov rcx, qword [rsi + 0xd8]
lea r14, [rax + r13*8]
mov rax, qword [rbp - 0x70]
mov rdx, r14
mov rcx, qword [rcx + rax + 0xe0]
call fcn.140086e28
mov ebx, eax
test eax, eax
js 0x140022066
mov rdx, qword [rdi + 0x60]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_SetVolumeLabelW]
xor r9d, r9d
test eax, eax
jne 0x1400223ee
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x1400223e8
test byte [rcx + 0x1c], 1
je 0x1400223e8
cmp byte [rcx + 0x19], 3
jb 0x1400223e8
mov r9, qword [rdi + 0x60]
lea r8, [0x140151a70]
mov rcx, qword [rcx + 0x10]
movzx eax, dx
or eax, 0x80070000
test edx, edx
cmovle eax, edx
mov edx, 0x1c2
mov dword [rsp + 0x28], eax
mov rax, qword [r14]
mov qword [rsp + 0x20], rax
call fcn.140005e64
xor r9d, r9d
mov ebx, r9d
mov r14, qword [rbp - 0x80]
inc r12d
mov eax, dword [rsp + 0x70]
inc eax
mov dword [rsp + 0x70], eax
cmp eax, dword [rsi + 0x170]
jae 0x140022600
mov r13, qword [rsp + 0x48]
jmp 0x14002209f
mov r14, qword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
mov r13, qword [rsp + 0x58]
lea rcx, [rsi + 0x28]
call fcn.1400fc870
xor edi, edi
test ebx, ebx
jns 0x14002245e
lea rcx, [rsi + 0x58]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
cmp dword [rsi + 0x20], eax
jl 0x140022454
mov ecx, 0x807800c5
cmp ebx, ecx
mov dword [rsi + 0x20], ecx
cmovne eax, ebx
mov dword [rsi + 0x24], eax
lea rcx, [rsi + 0x58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rsp + 0x78], rdi
je 0x140022470
lea rcx, [rsp + 0x78]
call qword [sym.imp.RPCRT4.dll_RpcStringFreeW]
test r13, r13
je 0x14002247e
mov rcx, r13
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rax, qword [rbp - 0x38]
test rax, rax
je 0x140022490
mov rcx, rax
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test r12, r12
je 0x14002249e
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rax, qword [rbp - 0x40]
test rax, rax
je 0x1400224b0
mov rcx, rax
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov r12, qword [rbp - 0x50]
mov r13d, r15d
test r12, r12
je 0x1400224ef
test r15d, r15d
je 0x1400224e6
mov rdi, r12
mov esi, r15d
xor eax, eax
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400224dc
call qword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
mov qword [rdi], rax
add rdi, 8
sub rsi, 1
jne 0x1400224c9
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov r12, qword [rbp - 0x60]
test r12, r12
je 0x14002252b
test r15d, r15d
je 0x140022522
mov rdi, r12
mov rsi, r13
xor eax, eax
mov rcx, qword [rdi]
test rcx, rcx
je 0x140022518
call qword [sym.imp.ole32.dll_CoTaskMemFree]
xor eax, eax
mov qword [rdi], rax
add rdi, 8
sub rsi, 1
jne 0x140022505
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rsi, qword [rbp - 0x80]
test rsi, rsi
je 0x140022563
test r15d, r15d
je 0x14002255a
mov rdi, rsi
xor r15d, r15d
mov rcx, qword [rdi]
test rcx, rcx
je 0x140022550
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov qword [rdi], r15
add rdi, 8
sub r13, 1
jne 0x14002253f
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test r14, r14
je 0x140022571
mov rcx, r14
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x1400225a5
test byte [rcx + 0x1c], 1
je 0x1400225a5
cmp byte [rcx + 0x19], 4
jb 0x1400225a5
mov rcx, qword [rcx + 0x10]
lea r8, [0x140151a70]
mov edx, 0x1c4
call fcn.140004c6c
mov eax, ebx
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.1401474d0
mov rbx, qword [rsp + 0x380]
add rsp, 0x330
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r13, qword [rsp + 0x60]
mov r12, qword [rsp + 0x50]
jmp 0x140022424
mov ebx, 0x8007000e
jmp 0x14002241a
mov r15d, dword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
jmp 0x14002241a
mov ebx, 0x8000ffff
jmp 0x1400225ef
mov r15d, dword [rsp + 0x40]
mov r12d, r9d
mov dword [rbp - 0x70], r9d
test r15d, r15d
je 0x14002282c
mov rcx, qword [rbp - 0x50]
mov r15, r14
mov r13d, dword [rbp - 0x68]
sub rcx, r14
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x68], r14
mov rdi, qword [rsi + 0x338]
mov eax, r9d
mov dword [rsp + 0x70], eax
cmp dword [rdi + 0xd8], r9d
jbe 0x14002275b
mov r14d, eax
cmp r14, qword [rdi + 0xc0]
jb 0x14002267c
lea r8, str.iElement___m_nSize
mov edx, 0x2cd
lea rcx, str.sdkinc_atlmfc_atlcoll.h
call fcn.14008624c
xor r9d, r9d
cmp r14, qword [rdi + 0xc0]
jae 0x1400228dc
mov rax, qword [rdi + 0xb8]
mov r13d, r9d
mov r14, qword [rax + r14*8]
cmp dword [r14 + 0x5c], r9d
jbe 0x140022731
mov edi, r13d
cmp rdi, qword [r14 + 0x68]
jb 0x1400226c2
lea r8, str.iElement___m_nSize
mov edx, 0x2cd
lea rcx, str.sdkinc_atlmfc_atlcoll.h
call fcn.14008624c
xor r9d, r9d
cmp rdi, qword [r14 + 0x68]
jae 0x1400228d1
mov rax, qword [r14 + 0x60]
mov r15, qword [rax + rdi*8]
mov edi, r9d
cmp dword [r15 + 0x68], r9d
jbe 0x14002271f
mov eax, edi
imul rcx, rax, 0x38
mov rax, qword [r15 + 0x60]
mov r12, qword [rcx + rax]
test r12, r12
je 0x140022717
mov rax, qword [rsp + 0x68]
or r8, 0xffffffffffffffff
mov rcx, qword [rsp + 0x60]
mov rcx, qword [rcx + rax]
inc r8
cmp word [rcx + r8*2], r9w
jne 0x1400226f8
mov rdx, qword [r12]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
xor r9d, r9d
test eax, eax
je 0x1400227a7
inc edi
cmp edi, dword [r15 + 0x68]
jb 0x1400226d3
mov r15, qword [rsp + 0x68]
inc r13d
cmp r13d, dword [r14 + 0x5c]
jb 0x140022694
mov eax, dword [rsp + 0x70]
mov rdi, qword [rsi + 0x338]
inc eax
mov dword [rsp + 0x70], eax
cmp eax, dword [rdi + 0xd8]
jb 0x140022648
mov rcx, qword [rsp + 0x60]
mov r12d, dword [rbp - 0x70]
mov r13d, dword [rbp - 0x68]
mov edi, r9d
test r13d, r13d
je 0x140022806
mov r14, qword [rbp - 0x78]
mov rcx, qword [rcx + r15]
or r8, 0xffffffffffffffff
inc r8
cmp word [rcx + r8*2], r9w
jne 0x140022773
mov rdx, qword [r14]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
xor r9d, r9d
test eax, eax
jne 0x140022795
mov rcx, qword [r15]
test rcx, rcx
jne 0x1400227dd
inc edi
add r14, 0x18
cmp edi, r13d
jae 0x140022806
mov rcx, qword [rsp + 0x60]
jmp 0x14002276b
mov r15, qword [rsp + 0x68]
mov rcx, qword [r15]
test rcx, rcx
je 0x140022724
lea rdx, [r12 + 8]
cmp qword [rdx], r9
jne 0x140022724
call fcn.140086e28
xor r9d, r9d
mov ebx, eax
test eax, eax
js 0x140022066
jmp 0x140022724
mov eax, edi
lea rdx, [rax + rax*2]
mov rax, qword [rbp - 0x78]
lea rdx, [rdx + 1]
lea rdx, [rax + rdx*8]
cmp qword [rdx], r9
jne 0x140022806
call fcn.140086e28
xor r9d, r9d
mov ebx, eax
test eax, eax
js 0x140022066
inc r12d
add r15, 8
mov dword [rbp - 0x70], r12d
mov qword [rsp + 0x68], r15
cmp r12d, dword [rsp + 0x40]
jae 0x140022827
mov rcx, qword [rsp + 0x60]
jmp 0x14002262d
mov r15d, dword [rsp + 0x40]
lea rdi, [rsi + 0x2d0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov rcx, qword [0x1401782b0]
lea rax, [0x1401782b0]
cmp rcx, rax
je 0x1400225ef
test byte [rcx + 0x1c], 1
je 0x1400225ef
cmp byte [rcx + 0x19], 4
jb 0x1400225ef
mov rcx, qword [rcx + 0x10]
lea rdx, [rsi + 0x2c8]
mov eax, dword [rdx]
lea r8, [0x140151a70]
mov dword [rsp + 0x60], eax
mov eax, dword [rdx + 4]
mov dword [rsp + 0x64], eax
mov eax, dword [rdi]
mov dword [rbp - 0x78], eax
mov eax, dword [rdi + 4]
mov dword [rbp - 0x74], eax
movabs rax, 0x346dc5d63886594b
mov rdx, qword [rbp - 0x78]
sub rdx, qword [rsp + 0x60]
mul rdx
mov r9, rdx
mov edx, 0x1c3
shr r9, 0xb
call fcn.140010678
jmp 0x1400225ef
mov r14, qword [rsp + 0x48]
mov r12, qword [rsp + 0x50]
mov r13, qword [rsp + 0x60]
jmp 0x140022424
mov ecx, 0x80070057
call fcn.140001b20
int3
mov ecx, 0x80070057
call fcn.140001b20
int3