Function at 0x4066c0
Capabilities:
Get disk information

Disassembly:
mov rax, rsp
sub rsp, 0x9e8
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax - 8], r12
mov qword [rax - 0x10], r13
mov rax, qword [0x00454a00]
xor rax, rsp
mov qword [rsp + 0x9c0], rax
call fcn.00413cb8
mov r11, rax
xor r13d, r13d
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x406720
mov ecx, 0x80004005
call fcn.00401000
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x48], rax
call fcn.00413cb8
mov r11, rax
mov ecx, r13d
test rax, rax
setne cl
test ecx, ecx
jne 0x406752
mov ecx, 0x80004005
call fcn.00401000
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
mov ecx, dword [0x00456488]
sub ecx, 2
je 0x406831
sub ecx, 1
je 0x406782
cmp ecx, 1
je 0x4067cc
jmp 0x406907
lea rdx, [0x00438f90]
lea rcx, [0x00456340]
call fcn.004218e0
mov rbx, rax
test rax, rax
je 0x4067cc
mov r8, rax
mov edx, 0x400
lea rcx, [rsp + 0x5c0]
call fcn.00422920
mov rcx, rbx
call fcn.004212d0
movzx r11d, byte [rsp + 0x5c0]
mov byte [0x0044a00a], r11b
jmp 0x4067d3
mov r11b, byte [0x0044a00a]
movsx r8d, r11b
lea rdx, str.._c:
lea rcx, [rsp + 0x2a0]
call fcn.004209a0
lea rcx, [rsp + 0x2a0]
call fcn.00401be0
mov r9d, eax
lea r8, [rsp + 0x190]
lea rdx, str.Info__:___dp_volume__Find_the_CDRom__s_and_Send_rewind___d_n
lea rcx, [rsp + 0x50]
call fcn.00403500
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.004042c0
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x406907
mov dil, 0x61
nop
nop
nop
movzx esi, dil
mov r8d, esi
lea rdx, [0x00439bf4]
lea rcx, [rsp + 0x4b0]
call fcn.004209a0
mov r8d, 0x104
lea rdx, [rsp + 0x190]
lea rcx, [rsp + 0x4b0]
call qword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
je 0x4068ee
lea rcx, [rsp + 0x190]
call fcn.004204b0
lea rdx, str.cdrom
lea rcx, [rsp + 0x190]
call fcn.0041ff80
test rax, rax
je 0x4068ee
mov r8d, esi
lea rdx, str.._c:
lea rcx, [rsp + 0x2a0]
call fcn.004209a0
lea rcx, [rsp + 0x2a0]
call fcn.00401be0
mov r9d, eax
lea r8, [rsp + 0x190]
lea rdx, str.Info__:___dp_all_Find_the_CDRom__s_and_Send_rewind___d_n
lea rcx, [rsp + 0x50]
call fcn.00403500
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.004042c0
add dil, 1
cmp dil, 0x7a
jbe 0x406840
mov ecx, 0x1388
call qword [sym.imp.KERNEL32.dll_Sleep]
mov r9d, 4
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x406975
lea rcx, str.Error_:_SetupDiGetClassDevs_error...
call fcn.004042c0
nop
lea rdx, [rbx - 0x18]
mov ebx, ebp
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, ebp
test eax, eax
jg 0x40694d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x40696b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, 0x4e26
jmp 0x406ee4
mov dword [rsp + 0x170], 0x20
mov r12d, r13d
lea r8, [rsp + 0x170]
xor edx, edx
mov rcx, rax
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x406e89
nop
mov rsi, r13
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x58], r13d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x5c]
mov r8d, 1
lea rdx, [rsp + 0x170]
mov rcx, rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x406a5b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x406e69
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x406e69
test rsi, rsi
je 0x406a12
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [rsp + 0x40]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x5c]
mov r8d, 1
lea rdx, [rsp + 0x170]
mov rcx, rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x4069e6
mov rdi, rsi
cmp byte [rsi], 0
je 0x406e60
nop
nop
nop
mov eax, dword [rsp + 0x40]
add rax, rsi
cmp rdi, rax
jae 0x406e60
mov rcx, rdi
call fcn.004204b0
mov rcx, rdi
call fcn.00402a20
test eax, eax
je 0x406d0d
mov r8, rdi
lea rdx, str.Info__:_Find_device__ID:__s..._n
lea rcx, [rsp + 0x48]
call fcn.00403500
mov rcx, qword [rsp + 0x48]
call fcn.004042c0
lea rdx, [0x00439010]
mov rcx, rdi
call fcn.0041ff80
test rax, rax
jne 0x406e16
lea rdx, str.vdf_enum_vbus
mov rcx, rdi
call fcn.0041ff80
test rax, rax
jne 0x406dca
lea rdx, str.sensorshwgpssensor
mov rcx, rdi
call fcn.0041ff80
test rax, rax
jne 0x406d7b
xor edx, edx
mov r8d, 0xff
lea rcx, [rsp + 0x3b0]
call fcn.00420630
lea r8, [rsp + 0x3b0]
lea rdx, [rsp + 0x170]
mov rcx, rbp
call fcn.00402390
lea rdx, [0x00439958]
lea rcx, [rsp + 0x3b0]
call fcn.0041ff80
test rax, rax
je 0x406d2c
lea rcx, str.Info__:_This_device_is_a_mass_storage_or_composite_device__so_delete_by_rules._n
call fcn.004042c0
lea rdx, str.mi_
mov rcx, rdi
call fcn.0041ff80
test rax, rax
je 0x406bdf
lea rdx, str.mi_00
mov rcx, rdi
call fcn.0041ff80
test rax, rax
jne 0x406bdf
lea rdx, str.mi_01
mov rcx, rdi
call fcn.0041ff80
test rax, rax
jne 0x406bdf
lea rcx, str.Info__:_It_is_a_mult_port_mass_storage_device__delete_it._n
call fcn.004042c0
lea r11, [rsp + 0xb0]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [r11], rax
mov rax, qword [rcx + 8]
mov qword [r11 + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [r11 + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [r11 + 0x18], rax
lea rdx, [rsp + 0xb0]
mov rcx, rbp
call fcn.004047c0
jmp 0x406d0d
mov ecx, dword [0x00456488]
sub ecx, 1
je 0x406d0d
cmp ecx, 1
je 0x406cc3
xor r9d, r9d
mov r8d, dword [rsp + 0x184]
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x44]
call qword [sym.imp.SETUPAPI.dll_CM_Get_DevNode_Status]
test eax, eax
jne 0x406c7d
test byte [rsp + 0x44], 8
je 0x406c2e
lea rcx, str.Info__:_This_Device_is_present__dont_remove__n
call fcn.004042c0
jmp 0x406d0d
lea rdx, [rsp + 0x150]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0x150]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_This_Device_is_present_But_not_started__remove_it__n
call fcn.004042c0
jmp 0x406d0d
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0x70]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_Cant_find_devnodes_status__Delete_this_device_n
call fcn.004042c0
jmp 0x406d0d
lea rdx, [rsp + 0x130]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0x130]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_Delete_All_Device__remove_it__n
call fcn.004042c0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
movsxd rcx, eax
lea rdi, [rdi + rcx + 1]
cmp byte [rdi], 0
je 0x406e60
jmp 0x406a70
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0xf0]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_This_device_is_not_a_mass_storage_or_composite_device__so_delete_it._n
call fcn.004042c0
jmp 0x406e60
lea rdx, [rsp + 0x110]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0x110]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_Remove_the_virtual_gps_device_always__n
call fcn.004042c0
jmp 0x406e60
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0x90]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_Remove_the_virtual_bus_always__n
call fcn.004042c0
jmp 0x406e60
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0x170]
mov rax, qword [rcx]
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
lea rdx, [rsp + 0xd0]
mov rcx, rbp
call fcn.004047c0
lea rcx, str.Info__:_Remove_the_virtual_bus_always__n
call fcn.004042c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
add r12d, 1
lea r8, [rsp + 0x170]
mov edx, r12d
mov rcx, rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4069a0
mov rcx, rbp
call qword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
call fcn.004062f0
lea rcx, str.Info__:_Remove_device_register_Info__END..._n
call fcn.004042c0
nop
lea rdx, [rbx - 0x18]
mov ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, ebx
test eax, eax
jg 0x406ec4
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x406ee2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
mov rcx, qword [rsp + 0x9c0]
xor rcx, rsp
call fcn.00420600
mov rbx, qword [rsp + 0x9f0]
mov rbp, qword [rsp + 0x9f8]
mov rsi, qword [rsp + 0xa00]
mov rdi, qword [rsp + 0xa08]
mov r12, qword [rsp + 0x9e0]
mov r13, qword [rsp + 0x9d8]
add rsp, 0x9e8
ret