Function at 0x140051830
Capabilities:
Enumerate disk volumes
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 - 0x1b0]
sub rsp, 0x2b0
mov rax, qword [0x14017a608]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
xor esi, esi
mov qword [rsp + 0x70], rdx
mov rax, r8
mov dword [rsp + 0x34], esi
mov qword [rsp + 0x58], rax
mov r13d, esi
mov dword [rsp + 0x3c], esi
mov r14d, esi
mov qword [rsp + 0x48], rsi
mov rbx, rdx
mov qword [rsp + 0x50], rsi
mov r12, rcx
mov word [rsp + 0x38], si
mov rcx, qword [0x14017a048]
lea rdx, [0x14017a048]
cmp rcx, rdx
je 0x1400518cc
test dword [rcx + 0x1c], 0x200
je 0x1400518cc
cmp byte [rcx + 0x19], 4
jb 0x1400518cc
mov rcx, qword [rcx + 0x10]
lea edx, [rsi + 0x39]
lea r8, [0x14015aeb8]
call fcn.140006b98
mov rax, qword [rsp + 0x58]
mov r15b, sil
test rbx, rbx
jne 0x1400519b2
mov edi, 0x80004003
lea r12, [0x14017a048]
lea rdx, [rsp + 0x3c]
lea rcx, [rsp + 0x48]
call fcn.14014aae8
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140051909
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
test edi, edi
jns 0x14005193d
mov rcx, qword [0x14017a048]
cmp rcx, r12
je 0x14005196d
test byte [rcx + 0x1c], 1
je 0x140051944
cmp byte [rcx + 0x19], 2
jb 0x140051944
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x46
mov r9d, edi
call fcn.140006bc4
mov rcx, qword [0x14017a048]
cmp rcx, r12
je 0x14005196d
test dword [rcx + 0x1c], 0x200
je 0x14005196d
cmp byte [rcx + 0x19], 4
jb 0x14005196d
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x47
call fcn.140006b98
test r15b, r15b
je 0x140051985
lea rcx, [0x14017b300]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov eax, edi
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.140001d90
mov rbx, qword [rsp + 0x308]
add rsp, 0x2b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov dword [rbx], esi
test rax, rax
je 0x1400518d8
mov rcx, r12
mov qword [rax], rsi
call fcn.14004a1f4
mov edi, eax
test eax, eax
js 0x1400518dd
mov al, byte [0x14017c3e0]
lea rdx, [rsp + 0x38]
and al, 1
lea rcx, [rsp + 0x50]
mov byte [rsp + 0x30], al
call fcn.140093c14
test eax, eax
jns 0x140051a28
mov rcx, qword [0x14017a048]
lea rdx, [0x14017a048]
cmp rcx, rdx
je 0x140051a28
test byte [rcx + 0x1c], 1
je 0x140051a28
cmp byte [rcx + 0x19], 3
jb 0x140051a28
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x3a
mov r9d, eax
call fcn.140006bc4
mov ebx, 0x104
lea rcx, [rbp - 0x70]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
nop dword [rax + rax]
mov qword [rsp + 0x40], rax
cmp rax, 0xffffffffffffffff
jne 0x140051aa5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14017a048]
lea r12, [0x14017a048]
cmp rcx, r12
je 0x140051a8f
test byte [rcx + 0x1c], 1
je 0x140051a8f
cmp byte [rcx + 0x19], 2
jb 0x140051a8f
mov edx, 0x3b
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov r9d, edi
call fcn.140006cec
test edi, edi
jle 0x1400518e4
movzx edi, di
or edi, 0x80070000
jmp 0x1400518e4
mov r15, rax
mov r8d, ebx
lea rdx, [rbp - 0x70]
mov rcx, r15
inc r13d
call qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
nop dword [rax + rax]
test eax, eax
jne 0x140051aa8
mov dword [rsp + 0x3c], r13d
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov r15b, sil
cmp eax, 0x12
jne 0x1400520b2
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
nop dword [rax + rax]
mov ebx, r13d
shl rbx, 7
mov rcx, rbx
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
nop dword [rax + rax]
mov qword [rsp + 0x48], rax
mov rsi, rax
test rax, rax
jne 0x140051b22
mov edi, 0x8007000e
jmp 0x1400518dd
mov r8, rbx
xor edx, edx
mov rcx, rsi
call sub.msvcrt.dll_memset
mov bl, byte [rsp + 0x30]
xor r15d, r15d
test bl, bl
je 0x140051c4a
test r13d, r13d
jne 0x140051b5b
lea r8, str.cVolume___cMaxVolume
mov edx, 0x3ba
lea rcx, str.base_stor_blbengine_serviceengine.cpp
call fcn.14008ac24
lea rcx, [0x14017b300]
mov bl, r15b
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop dword [rax + rax]
mov rcx, qword [r12 + 0x68]
mov r15b, 1
test rcx, rcx
je 0x140051bdd
mov rdx, rsi
call fcn.140149c8c
mov edi, eax
test eax, eax
jns 0x140051bd4
mov rcx, qword [0x14017a048]
lea r12, [0x14017a048]
cmp rcx, r12
je 0x1400518e4
test byte [rcx + 0x1c], r15b
je 0x1400518e4
cmp byte [rcx + 0x19], 2
jb 0x1400518e4
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x3d
mov r9d, eax
call fcn.140006bc4
jmp 0x1400518e4
mov r14d, 1
mov bl, r14b
lea rcx, [0x14017b300]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
xor r15d, r15d
test bl, bl
jne 0x140051c46
mov r8, rsi
mov dl, 1
xor ecx, ecx
call fcn.140047a30
test eax, eax
jns 0x140051c43
mov rcx, qword [0x14017a048]
lea r12, [0x14017a048]
cmp rcx, r12
je 0x140051c3d
test byte [rcx + 0x1c], 1
je 0x140051c3d
cmp byte [rcx + 0x19], 3
jb 0x140051c3d
mov rcx, qword [rcx + 0x10]
lea edx, [r15 + 0x3e]
mov r9d, eax
lea r8, [0x14015aeb8]
call fcn.140006bc4
mov bl, byte [rsp + 0x30]
jmp 0x140051c51
inc r14d
mov bl, byte [rsp + 0x30]
lea r12, [0x14017a048]
mov edx, 0x104
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
nop dword [rax + rax]
mov qword [rsp + 0x40], rax
cmp rax, 0xffffffffffffffff
jne 0x140051cad
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14017a048]
cmp rcx, r12
je 0x140051a8f
test byte [rcx + 0x1c], 1
je 0x140051a8f
cmp byte [rcx + 0x19], 2
jb 0x140051a8f
mov edx, 0x3f
jmp 0x140051a7c
movzx r12d, word [rsp + 0x38]
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x140051ceb
test byte [rcx + 0x1c], 1
je 0x140051ceb
cmp byte [rcx + 0x19], 4
jb 0x140051ceb
mov rcx, qword [rcx + 0x10]
lea r9, [rbp - 0x70]
mov edx, 0x40
lea r8, [0x14015aeb8]
call fcn.1400112c8
test bl, bl
je 0x140051e68
lea rax, [rbp - 0x70]
or rdx, 0xffffffffffffffff
inc rdx
cmp word [rax + rdx*2], r15w
jne 0x140051cfb
lea r8, [rsp + 0x78]
lea rcx, [rbp - 0x70]
call fcn.14008f390
mov edi, eax
test eax, eax
jns 0x140051d21
mov edi, r15d
jmp 0x140051e39
mov rcx, qword [0x14017a048]
lea rbx, [0x14017a048]
mov r15d, dword [rsp + 0x34]
cmp rcx, rbx
je 0x140051da7
test byte [rcx + 0x1c], 1
je 0x140051da7
cmp byte [rcx + 0x19], 4
jb 0x140051da7
lea rdx, [0x14017c478]
or r15d, 1
lea rcx, [rsp + 0x68]
call fcn.140006ed0
or r15d, 2
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x34], r15d
mov rbx, qword [rax]
call fcn.140006ed0
mov rcx, qword [0x14017a048]
lea r8, [0x14015aeb8]
mov edx, 0x41
mov qword [rsp + 0x20], rbx
mov r9, qword [rax]
mov rcx, qword [rcx + 0x10]
call fcn.1400113b0
mov rcx, qword [0x14017a048]
lea rbx, [0x14017a048]
test r15b, 2
je 0x140051dce
mov rcx, qword [rsp + 0x60]
and r15d, 0xfffffffd
mov dword [rsp + 0x34], r15d
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop dword [rax + rax]
mov rcx, qword [0x14017a048]
test r15b, 1
je 0x140051df5
mov rcx, qword [rsp + 0x68]
and r15d, 0xfffffffe
mov dword [rsp + 0x34], r15d
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop dword [rax + rax]
mov rcx, qword [0x14017a048]
mov rax, qword [rsp + 0x78]
cmp rax, qword [0x14017c478]
jne 0x140051e65
mov rax, qword [rbp - 0x80]
cmp rax, qword [0x14017c480]
jne 0x140051e65
cmp rcx, rbx
je 0x140051e36
test byte [rcx + 0x1c], 1
je 0x140051e36
cmp byte [rcx + 0x19], 4
jb 0x140051e36
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x42
call fcn.140006b98
xor r15d, r15d
mov rcx, qword [rsp + 0x40]
lea rdx, [rbp - 0x70]
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_FindNextVolumeW]
nop dword [rax + rax]
test eax, eax
je 0x140051fb3
mov bl, byte [rsp + 0x30]
jmp 0x140051cb3
xor r15d, r15d
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_GetDriveTypeW]
nop dword [rax + rax]
cmp eax, 3
jne 0x140051d19
cmp r14d, r13d
jb 0x140051edb
lea ebx, [r13 + 8]
mov rcx, rsi
mov edx, ebx
shl rdx, 7
call qword [sym.imp.ole32.dll_CoTaskMemRealloc]
nop dword [rax + rax]
mov rsi, rax
test rax, rax
je 0x140051fac
mov r8d, ebx
mov ecx, r13d
sub r8d, r13d
shl rcx, 7
shl r8, 7
add rcx, rax
xor edx, edx
call sub.msvcrt.dll_memset
mov dword [rsp + 0x3c], ebx
mov r13d, ebx
mov qword [rsp + 0x48], rsi
cmp r14d, ebx
jae 0x140051f8a
mov ebx, r14d
lea rcx, [rbp - 0x70]
shl rbx, 7
xor edx, edx
add rbx, rsi
mov r8, rbx
call fcn.140047a30
mov edi, eax
test eax, eax
jns 0x140051f58
cmp eax, 0x8007000e
je 0x140051f8f
mov rcx, qword [0x14017a048]
lea rax, [0x14017a048]
cmp rcx, rax
je 0x140051d19
test dword [rcx + 0x1c], 0x200
je 0x140051d19
cmp byte [rcx + 0x19], 3
jb 0x140051d19
mov rcx, qword [rcx + 0x10]
lea rax, [rbp - 0x70]
mov edx, 0x43
mov qword [rsp + 0x20], rax
mov r9d, edi
lea r8, [0x14015aeb8]
call fcn.14003c8c4
jmp 0x140051d19
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140051f82
mov rdx, qword [rbx + 0x60]
test rdx, rdx
je 0x140051f82
cmp r12w, word [rbx + 0x5c]
jne 0x140051f82
mov r8, r12
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x140051f82
or dword [rbx + 0x58], 2
inc r14d
jmp 0x140051e39
mov edi, 0x8000ffff
lea r12, [0x14017a048]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_FindVolumeClose]
nop dword [rax + rax]
jmp 0x1400518e4
mov edi, 0x8007000e
jmp 0x140051f8f
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 0x12
jne 0x140052062
test r14d, r14d
jne 0x140051fe8
test rsi, rsi
je 0x140052033
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rsi, r15
jmp 0x140052048
cmp r14d, r13d
jbe 0x140052033
mov rcx, qword [0x14017a048]
lea r12, [0x14017a048]
cmp rcx, r12
je 0x140052029
test byte [rcx + 0x1c], 1
je 0x140052029
cmp byte [rcx + 0x19], 2
jb 0x140052029
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x45
mov dword [rsp + 0x20], r13d
mov r9d, r14d
call fcn.14003dbf0
mov edi, 0x8000ffff
jmp 0x140051f96
mov edx, r14d
mov rcx, rsi
call fcn.140113200
mov edi, eax
test eax, eax
js 0x140051f8f
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x48], r15
mov dword [rax], r14d
mov rax, qword [rsp + 0x58]
mov qword [rax], rsi
jmp 0x140051f8f
mov rcx, qword [0x14017a048]
lea r12, [0x14017a048]
cmp rcx, r12
je 0x140052099
test byte [rcx + 0x1c], 1
je 0x140052099
cmp byte [rcx + 0x19], 2
jb 0x140052099
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x44
mov r9d, ebx
call fcn.140006cec
test ebx, ebx
jg 0x1400520a4
mov edi, ebx
jmp 0x140051f96
movzx edi, bx
or edi, 0x80070000
jmp 0x140051f96
mov rcx, qword [0x14017a048]
lea r12, [0x14017a048]
cmp rcx, r12
je 0x1400520e9
test byte [rcx + 0x1c], 1
je 0x1400520e9
cmp byte [rcx + 0x19], 2
jb 0x1400520e9
mov rcx, qword [rcx + 0x10]
lea r8, [0x14015aeb8]
mov edx, 0x3c
mov r9d, edi
call fcn.140006cec
xor r15d, r15d
test edi, edi
jle 0x140051f96
movzx edi, di
jmp 0x1400520a7