Function at 0x1402225d0
Capabilities:
Get storage device properties

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rax - 0x58]
sub rsp, 0x130
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1405420e0]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov rdi, rdx
mov r14, rcx
lea rcx, [rbp - 0x68]
call fcn.14005da24
nop
mov rcx, qword [rbp - 0x58]
dec rcx
lea rax, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rax, qword [rbp - 0x68]
mov qword [rbp - 0x58], rcx
xor r15d, r15d
mov word [rax + rcx*2], r15w
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2000000
lea eax, [r15 + 3]
mov dword [rsp + 0x20], eax
xor r9d, r9d
mov r8d, eax
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rbx, rax
mov qword [rsp + 0x68], rax
cmp rax, 0xffffffffffffffff
jne 0x1402226bf
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x140222932
lea rax, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rax, qword [rbp - 0x68]
mov qword [rsp + 0x28], rax
lea rax, str.CreateFileW_failed_for_volume__ls
mov edx, 0x147
jmp 0x14022275e
mov dword [rsp + 0x40], r15d
mov qword [rbp - 0x44], r15
mov esi, 0x28
mov r8d, esi
xor edx, edx
lea rcx, [rsp + 0x70]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov dword [rbp - 0x48], r15d
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], esi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r9d, [rsi - 0x1c]
lea r8, [rbp - 0x48]
mov edx, 0x2d1400
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
nop dword [rax + rax]
test eax, eax
jne 0x14022277b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x140222932
lea rax, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rax, qword [rbp - 0x68]
mov qword [rsp + 0x28], rax
lea rax, str.DeviceIoControl_failed_for_volume__ls
mov edx, 0x158
lea r8, str.amcorewcd_sourcecommon_src_volumemap.cpp
mov r9d, edi
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0x58]
call fcn.14018588c
jmp 0x140222932
cmp dword [rsp + 0x74], 0x2800
jbe 0x14022282c
call fcn.1400550c0
mov r10, qword [rax + 8]
cmp dword [r10], 3
jbe 0x140222822
lea rax, str.SetVolumeHardwareInformation_failed___STORAGE_DEVICE_DESCRIPTOR_size___10KB
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], 0x98
cmp qword [rdi + 0x18], 8
jb 0x1402227b9
mov rdi, qword [rdi]
lea rcx, [0x1403cb630]
mov rax, r15
test rdi, rdi
je 0x1402227d9
mov rcx, rdi
or rax, 0xffffffffffffffff
inc rax
cmp word [rdi + rax*2], r15w
jne 0x1402227cf
mov qword [rbp], rcx
lea eax, [rax*2 + 2]
mov dword [rbp + 8], eax
mov dword [rbp + 0xc], r15d
lea rax, [rsp + 0x74]
mov qword [rbp + 0x10], rax
mov qword [rbp + 0x18], 4
lea rax, [rbp - 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140483e37]
mov rcx, r10
call fcn.140001208
mov edi, 0x80004004
jmp 0x140222932
mov edx, dword [rsp + 0x74]
lea rcx, [rsp + 0x48]
call fcn.140083118
nop
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x28], eax
mov rsi, qword [rsp + 0x48]
mov qword [rsp + 0x20], rsi
mov r9d, SafeArrayGetDim
lea r8, [rbp - 0x48]
mov edx, 0x2d1400
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
nop dword [rax + rax]
test eax, eax
jne 0x1402228d5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
jns 0x1402228ee
lea rax, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rax, qword [rbp - 0x68]
mov rcx, qword [rbp + 0x58]
mov qword [rsp + 0x28], rax
lea rax, str.DeviceIoControl_failed_for_volume__ls
mov qword [rsp + 0x20], rax
mov r9d, edi
lea r8, str.amcorewcd_sourcecommon_src_volumemap.cpp
mov edx, 0x16e
call fcn.14018588c
jmp 0x1402228ee
lea r8, [rsp + 0x48]
lea rdx, [rbp - 0x68]
mov rcx, r14
call fcn.1402223b4
mov edi, r15d
mov rsi, qword [rsp + 0x48]
test rsi, rsi
je 0x140222932
mov rdx, qword [rsp + 0x58]
sub rdx, rsi
mov rax, rsi
cmp rdx, 0x1000
jb 0x140222929
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140222929
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__invalid_parameter_noinfo_noreturn]
nop dword [rax + rax]
int3
mov rcx, rsi
call fcn.140356b5c
nop
lea rcx, [rbx - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x14022294c
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
nop
lea rcx, [rbp - 0x68]
call fcn.140055f70
mov eax, edi
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140356560
mov rbx, qword [rsp + 0x170]
add rsp, 0x130
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret