Function at 0x405795
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
push ebx
push esi
push edi
push str.CDevList::CreateSnapshot__...
push 3
mov esi, ecx
call fcn.0044fe2e
xor ebx, ebx
pop ecx
pop ecx
mov dword [esi + 4], 1
cmp dword [esi + 0x400c], ebx
je 0x4057c9
mov ecx, esi
call fcn.004053b1
mov ecx, dword [esi + 8]
call fcn.004076be
mov dword [esi + 0x4020], ebx
call fcn.0042c2d3
push 6
pop ecx
push 4
push ebx
mov dword [esi + 0x4018], eax
push ebx
xor eax, eax
mov dword [ebp - 0x2c], 0x1c
lea edi, [ebp - 0x28]
push ebx
mov dword [esi + 0x401c], edx
rep stosd dword es:[edi], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x405e73
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
lea ecx, [ebp - 0x2c]
push ecx
push ebx
mov dword [ebp - 4], ebx
push eax
jmp 0x40582e
inc dword [ebp - 4]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
call edi
test eax, eax
jne 0x405821
call fcn.0042c2d3
sub eax, dword [esi + 0x4018]
sbb edx, dword [esi + 0x401c]
push edx
push eax
push dword [ebp - 4]
push str.CDevList::CreateSnapshot___i_devices_to_check_time_I64u
push 1
call fcn.0044fe2e
add esp, 0x14
xor edi, edi
mov ebx, 0x1000
jmp 0x4058b6
lea eax, [ebp - 0x2c]
push eax
push edi
push dword [ebp - 8]
mov dword [ebp - 0x2c], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x4058be
test edi, 3
je 0x40588b
mov eax, dword [ebp - 4]
dec eax
cmp edi, eax
jne 0x4058a9
push dword [ebp - 4]
lea eax, [edi + 1]
push eax
push str.Enumerating_device__i_of__i
push 0
push 1
push dword [0x50eff4]
call fcn.00405f8f
add esp, 0x18
push dword [ebp - 0x18]
mov ecx, esi
push 0
call fcn.004046f4
inc edi
cmp dword [esi + 0x400c], ebx
jl 0x405862
push dword [ebp - 8]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [0x510c44]
xor ebx, ebx
push ebx
call fcn.00405514
test eax, eax
jne 0x4058c7
call fcn.0042c2d3
sub eax, dword [esi + 0x4018]
sbb edx, dword [esi + 0x401c]
push edx
push eax
push edi
push dword [esi + 0x400c]
push str.CDevList::CreateSnapshot__kept__i_of__i_devices_time_I64u__result:
push 1
call fcn.0044fe2e
add esp, 0x18
cmp dword [esi + 0x400c], ebx
mov dword [ebp - 4], ebx
jle 0x405977
lea edi, [esi + 0xc]
mov eax, dword [edi]
lea ecx, [eax + 0xe38]
push ecx
push dword [eax + 0x14]
push dword [eax + 0x10]
push dword [ebp - 4]
push str.Dev__02u__devinst_u_devinstparent_u__s
push 1
call fcn.0044fe2e
xor ecx, ecx
add esp, 0x18
cmp dword [esi + 0x400c], ecx
jle 0x405966
mov eax, dword [edi]
mov ebx, dword [eax + 0x14]
lea edx, [esi + 0xc]
mov dword [ebp - 8], edx
mov edx, dword [ebp - 8]
mov edx, dword [edx]
cmp dword [edx + 0x10], ebx
je 0x40595f
add dword [ebp - 8], 4
inc ecx
cmp ecx, dword [esi + 0x400c]
jl 0x405946
jmp 0x405966
mov ecx, dword [esi + ecx*4 + 0xc]
mov dword [eax + 0x28], ecx
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
cmp eax, dword [esi + 0x400c]
jl 0x405910
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
jle 0x405a60
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
lea edi, [esi + 0xc]
mov eax, dword [edi]
cmp dword [eax + 0x3a74], 0
je 0x405a4b
push 0x4568c0
add eax, 0x1838
push eax
call ebx
test eax, eax
jne 0x4059ea
mov eax, dword [edi]
push 0x4568b8
add eax, 0x1838
push eax
call ebx
test eax, eax
jne 0x4059ea
mov eax, dword [edi]
push str.eXtensible
add eax, 0x1838
push eax
call ebx
test eax, eax
jne 0x4059ea
mov eax, dword [edi]
push str.Host_Router
add eax, 0x1838
push eax
call ebx
test eax, eax
je 0x405a4b
push 0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [edi]
push 0x17
mov dword [ebp - 0xc], 0x100
push dword [eax + 0x10]
call dword [sym.imp.CFGMGR32.dll_CM_Get_DevNode_Registry_PropertyW]
test eax, eax
jne 0x405a4b
push 0x456880
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x405a4b
mov eax, dword [edi]
push dword [eax + 0x10]
mov ecx, dword [esi]
call fcn.0040e391
cmp eax, 0xffffffff
jne 0x405a4b
mov eax, dword [edi]
push dword [eax + 0x10]
mov ecx, dword [esi]
push 0x4551b0
call fcn.0040e3ba
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
cmp eax, dword [esi + 0x400c]
jl 0x405991
call fcn.0042c2d3
sub eax, dword [esi + 0x4018]
push eax
push str.CDevList::CreateSnapshot_end_T_u
push 1
mov dword [esi + 0x4020], eax
call fcn.0044fe2e
and dword [ebp - 4], 0
add esp, 0xc
cmp dword [esi + 0x400c], 0
jle 0x405b6f
lea ebx, [esi + 0xc]
mov edi, dword [ebx]
push 0x200
lea eax, [edi + 0x2c]
push eax
push dword [edi + 0x10]
mov ecx, esi
call fcn.004017ed
push dword [edi + 0x14]
mov ecx, esi
mov dword [edi + 0x82c], eax
call fcn.00401c56
mov dword [edi + 0x28], eax
test eax, eax
je 0x405af5
push str.ROOTVOLMGR_
add eax, 0xe38
push eax
call fcn.0042958c
test eax, eax
je 0x405af5
mov eax, dword [edi + 0x3b84]
test eax, eax
je 0x405af5
push dword [eax + 0x83c]
mov ecx, esi
push dword [eax + 0x840]
call fcn.00401ecd
mov dword [edi + 0x28], eax
push str.Device_Parameters
lea eax, [edi + 0xe38]
push eax
push str.SystemCurrentControlSetEnum
lea eax, [ebp - 0x43c]
push 0x455538
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push 0x80
lea eax, [edi + 0x1638]
push eax
push str.CustomName
lea eax, [ebp - 0x43c]
push eax
push 0x80000002
call fcn.00428e72
test eax, eax
je 0x405b5a
lea eax, [edi + 0x1638]
push eax
push dword [edi + 0x10]
push str._u_CustomName_s
push 3
call fcn.0044fe2e
add esp, 0x10
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x400c]
jl 0x405a95
mov ecx, esi
call fcn.004051c7
mov eax, dword [esi + 8]
and dword [ebp - 4], 0
cmp dword [eax + 0x18], 0
jle 0x405beb
mov dword [ebp - 8], 0x1c
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + eax]
xor edi, edi
cmp dword [esi + 0x400c], edi
jle 0x405bd9
lea edx, [esi + 0xc]
mov ecx, dword [edx]
cmp dword [ecx + 0x3abc], 0
je 0x405bcd
mov ebx, dword [eax + 0x83c]
cmp dword [ecx + 0x3ab4], ebx
jne 0x405bcd
mov ebx, dword [ecx + 0x3ab0]
cmp ebx, dword [eax + 0x840]
jne 0x405bcd
mov ecx, dword [ecx + 0x10]
mov dword [eax + 0x14], ecx
inc edi
add edx, 4
cmp edi, dword [esi + 0x400c]
jl 0x405ba0
inc dword [ebp - 4]
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 4]
add dword [ebp - 8], 4
cmp ecx, dword [eax + 0x18]
jl 0x405b8a
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
jle 0x405c45
lea ebx, [esi + 0xc]
mov edi, dword [ebx]
cmp dword [edi + 0x3ab8], 0
je 0x405c34
mov eax, dword [edi + 0x3b84]
test eax, eax
je 0x405c34
cmp dword [eax + 0x83c], 1
jne 0x405c34
mov eax, dword [eax + 0x14]
test eax, eax
je 0x405c34
push eax
mov ecx, esi
call fcn.00401c56
test eax, eax
je 0x405c34
push edi
mov ecx, eax
call fcn.00401063
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x400c]
jl 0x405bfb
mov dword [ebp - 8], 1
push dword [ebp - 8]
lea eax, [ebp - 0x3c]
push str.COM_i
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x104
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x405d72
xor edi, edi
cmp dword [esi + 0x400c], edi
mov dword [ebp - 4], edi
jle 0x405cc5
lea ebx, [esi + 0xc]
mov eax, dword [ebx]
add eax, 0xfc8
cmp word [eax], 0x43
jne 0x405cb9
lea ecx, [ebp - 0x3c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x405cb9
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
mov word [eax*2 + 0x4a9688], di
inc edi
add ebx, 4
cmp edi, dword [esi + 0x400c]
jl 0x405c8f
and dword [ebp - 0xc], 0
cmp dword [ebp - 4], 1
jle 0x405d72
xor ebx, ebx
cmp dword [ebp - 4], ebx
jle 0x405d39
movsx eax, word [ebx*2 + 0x4a9688]
mov byte [ebx + 0x4a8688], 0
mov edi, dword [esi + eax*4 + 0xc]
lea ecx, [edi + 0x10a8]
lea eax, [edi + 0x13b0]
push ecx
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x405d33
lea eax, [edi + 0x2074]
push eax
lea eax, [edi + 0x1ff0]
push eax
add edi, 0xe38
push edi
push dword [ebp - 0x10]
call fcn.0042fdee
test eax, eax
je 0x405d33
inc dword [ebp - 0xc]
mov byte [ebx + 0x4a8688], 1
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x405cda
xor edi, edi
cmp dword [ebp - 4], edi
jle 0x405d72
cmp dword [ebp - 0xc], 1
movsx eax, word [edi*2 + 0x4a9688]
mov eax, dword [esi + eax*4 + 0xc]
jne 0x405d5b
cmp byte [edi + 0x4a8688], 0
jne 0x405d6c
push str.___not_certain__might_be_assigned_to_other_device
add eax, 0x13b0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc edi
cmp edi, dword [ebp - 4]
jl 0x405d40
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x3e8
jl 0x405c4c
xor ebx, ebx
cmp dword [esi + 0x400c], ebx
jle 0x405e12
lea eax, [esi + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
test edi, edi
je 0x405e05
cmp dword [edi], 1
jne 0x405e05
cmp dword [edi + 0x3ab8], 0
je 0x405e05
cmp dword [0x51adac], 4
jl 0x405dcd
lea eax, [edi + 0xc30]
push eax
push ebx
push str.Dev__i__is_a_volume___s_
push 4
call fcn.0044fe2e
add esp, 0x10
push dword [edi + 0x10]
mov ecx, dword [esi + 8]
call fcn.0040635d
mov dword [edi + 0x3b84], eax
test eax, eax
je 0x405e05
push dword [eax + 0x83c]
mov ecx, esi
push dword [eax + 0x840]
call fcn.00401ecd
test eax, eax
je 0x405e05
mov ecx, dword [edi + 0x3b84]
mov eax, dword [eax + 0x10]
mov dword [ecx + 0x14], eax
add dword [ebp - 0xc], 4
inc ebx
cmp ebx, dword [esi + 0x400c]
jl 0x405d96
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
jle 0x405e4e
lea ebx, [esi + 0xc]
mov edi, dword [ebx]
push 0x200
lea eax, [edi + 0x2c]
push eax
push dword [edi + 0x10]
mov ecx, esi
call fcn.004017ed
inc dword [ebp - 4]
mov dword [edi + 0x82c], eax
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x400c]
jl 0x405e22
and dword [esi + 4], 0
call fcn.0042c2d3
sub eax, dword [esi + 0x4018]
push eax
push str._CDevList::CreateSnapshot____T_u
push 3
mov dword [esi + 0x4020], eax
call fcn.0044fe2e
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret