Function at 0x404f35
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.004452a3
xor ebx, ebx
pop ecx
pop ecx
mov dword [esi + 4], 1
cmp dword [esi + 0x400c], ebx
je 0x404f69
mov ecx, esi
call fcn.00401473
mov ecx, dword [esi + 8]
call fcn.00406cdf
mov dword [esi + 0x4018], ebx
call fcn.00427654
push 6
pop ecx
push 4
push ebx
mov dword [ebp - 0x18], eax
push ebx
xor eax, eax
mov dword [ebp - 0x3c], 0x1c
lea edi, [ebp - 0x38]
push ebx
mov dword [ebp - 0x14], edx
rep stosd dword es:[edi], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov edi, eax
mov dword [ebp - 0xc], edi
cmp edi, 0xffffffff
je 0x4054e9
lea eax, [ebp - 0x3c]
push eax
mov dword [ebp - 4], ebx
push ebx
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
jmp 0x404fc6
inc dword [ebp - 4]
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 4]
push edi
call ebx
test eax, eax
jne 0x404fbc
call fcn.00427654
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
push edx
push eax
push dword [ebp - 4]
push str.CDevList::CreateSnapshot___i_devices_to_check_time_I64u
push 1
call fcn.004452a3
add esp, 0x14
xor ebx, ebx
mov edi, 0x1000
jmp 0x40503e
lea eax, [ebp - 0x3c]
push eax
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x3c], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x405046
test bl, 3
jne 0x405031
push dword [ebp - 4]
lea eax, [ebx + 1]
push eax
push str.Enumerating_device__i_of__i
push 0
push 1
push dword [0x4fac78]
call fcn.00405605
add esp, 0x18
push dword [ebp - 0x28]
mov ecx, esi
push 0
call fcn.004042e4
inc ebx
cmp dword [esi + 0x400c], edi
jl 0x404ff5
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
call fcn.00427654
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
push edx
push eax
push ebx
push dword [esi + 0x400c]
push str.CDevList::CreateSnapshot__kept__i_of__i_devices_time_I64u__result:
push 1
call fcn.004452a3
and dword [ebp - 4], 0
add esp, 0x18
cmp dword [esi + 0x400c], 0
jle 0x4050e9
lea edi, [esi + 0xc]
mov eax, dword [edi]
lea ecx, [eax + 0xe34]
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.004452a3
xor ecx, ecx
add esp, 0x18
cmp dword [esi + 0x400c], ecx
jle 0x4050d8
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 0x4050d1
add dword [ebp - 8], 4
inc ecx
cmp ecx, dword [esi + 0x400c]
jl 0x4050b8
jmp 0x4050d8
mov ecx, dword [esi + ecx*4 + 0xc]
mov dword [eax + 0x24], ecx
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
cmp eax, dword [esi + 0x400c]
jl 0x405082
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
jle 0x4051d2
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
lea edi, [esi + 0xc]
mov eax, dword [edi]
cmp dword [eax + 0x39e4], 0
je 0x4051bd
push 0x44b168
add eax, 0x1834
push eax
call ebx
test eax, eax
jne 0x40515c
mov eax, dword [edi]
push 0x44b160
add eax, 0x1834
push eax
call ebx
test eax, eax
jne 0x40515c
mov eax, dword [edi]
push str.eXtensible
add eax, 0x1834
push eax
call ebx
test eax, eax
jne 0x40515c
mov eax, dword [edi]
push str.Host_Router
add eax, 0x1834
push eax
call ebx
test eax, eax
je 0x4051bd
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 0x4051bd
push 0x44b128
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4051bd
mov eax, dword [edi]
push dword [eax + 0x10]
mov ecx, dword [esi]
call fcn.0040c276
cmp eax, 0xffffffff
jne 0x4051bd
mov eax, dword [edi]
push dword [eax + 0x10]
mov ecx, dword [esi]
push 0x449d24
call fcn.0040c29f
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 4
cmp eax, dword [esi + 0x400c]
jl 0x405103
call fcn.00427654
sub eax, dword [ebp - 0x18]
push eax
push str.CDevList::CreateSnapshot_end_T_u
push 1
mov dword [esi + 0x4018], eax
call fcn.004452a3
add esp, 0xc
mov ecx, esi
call fcn.00404d4b
mov eax, dword [esi + 8]
xor edx, edx
cmp dword [eax], edx
jle 0x40525d
mov eax, dword [esi + 8]
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
mov eax, dword [eax + edx*4 + 4]
jle 0x405255
lea edi, [esi + 0xc]
mov ecx, dword [edi]
cmp dword [ecx + 0x3a2c], 0
je 0x405244
mov ebx, dword [eax + 0x83c]
cmp dword [ecx + 0x3a24], ebx
jne 0x405244
mov ebx, dword [ecx + 0x3a20]
cmp ebx, dword [eax + 0x840]
jne 0x405244
mov ecx, dword [ecx + 0x10]
mov dword [eax + 0x14], ecx
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
add edi, 4
cmp ecx, dword [esi + 0x400c]
jl 0x405217
mov eax, dword [esi + 8]
inc edx
cmp edx, dword [eax]
jl 0x405200
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
jle 0x405307
lea eax, [esi + 0xc]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov edi, dword [eax]
push 0x200
lea eax, [edi + 0x28]
push eax
push dword [edi + 0x10]
mov ecx, esi
call fcn.00401681
mov dword [edi + 0x828], eax
push str.Device_Parameters
lea eax, [edi + 0xe34]
push eax
push str.SystemCurrentControlSetEnum
lea eax, [ebp - 0x43c]
push 0x44a07c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
push 0x80
lea ebx, [edi + 0x1634]
push ebx
push str.CustomName
lea eax, [ebp - 0x43c]
push eax
push 0x80000002
call fcn.00424f44
test eax, eax
je 0x4052f1
push ebx
push dword [edi + 0x10]
push str._u_CustomName_s
push 3
call fcn.004452a3
add esp, 0x10
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add dword [ebp - 8], 4
cmp eax, dword [esi + 0x400c]
jl 0x405274
mov dword [ebp - 8], 1
push dword [ebp - 8]
lea eax, [ebp - 0x20]
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 - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x405434
xor edi, edi
cmp dword [esi + 0x400c], edi
mov dword [ebp - 4], edi
jle 0x405387
lea ebx, [esi + 0xc]
mov eax, dword [ebx]
add eax, 0xfc4
cmp word [eax], 0x43
jne 0x40537b
lea ecx, [ebp - 0x20]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40537b
mov eax, dword [ebp - 4]
inc dword [ebp - 4]
mov word [eax*2 + 0x495808], di
inc edi
add ebx, 4
cmp edi, dword [esi + 0x400c]
jl 0x405351
and dword [ebp - 0xc], 0
cmp dword [ebp - 4], 1
jle 0x405434
xor ebx, ebx
cmp dword [ebp - 4], ebx
jle 0x4053fb
movsx eax, word [ebx*2 + 0x495808]
mov byte [ebx + 0x494808], 0
mov edi, dword [esi + eax*4 + 0xc]
lea ecx, [edi + 0x10a4]
lea eax, [edi + 0x13ac]
push ecx
push eax
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4053f5
lea eax, [edi + 0x1ff0]
push eax
lea eax, [edi + 0x1f6c]
push eax
add edi, 0xe34
push edi
push dword [ebp - 0x10]
call fcn.0042a33b
test eax, eax
je 0x4053f5
inc dword [ebp - 0xc]
mov byte [ebx + 0x494808], 1
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x40539c
xor edi, edi
cmp dword [ebp - 4], edi
jle 0x405434
cmp dword [ebp - 0xc], 1
movsx eax, word [edi*2 + 0x495808]
mov eax, dword [esi + eax*4 + 0xc]
jne 0x40541d
cmp byte [edi + 0x494808], 0
jne 0x40542e
push str.___not_certain__might_be_assigned_to_other_device
add eax, 0x13ac
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc edi
cmp edi, dword [ebp - 4]
jl 0x405402
inc dword [ebp - 8]
cmp dword [ebp - 8], 0x3e8
jl 0x40530e
xor ebx, ebx
cmp dword [esi + 0x400c], ebx
jle 0x4054a9
lea eax, [esi + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov edi, dword [eax]
test edi, edi
je 0x40549c
cmp dword [edi], 1
jne 0x40549c
cmp dword [edi + 0x3a28], 0
je 0x40549c
cmp dword [0x506fb4], 4
jl 0x40548b
lea eax, [edi + 0xc2c]
push eax
push ebx
push str.Dev__i__is_a_volume___s_
push 4
call fcn.004452a3
add esp, 0x10
push dword [edi + 0x10]
mov ecx, dword [esi + 8]
call fcn.00405951
mov dword [edi + 0x3a74], eax
add dword [ebp - 0xc], 4
inc ebx
cmp ebx, dword [esi + 0x400c]
jl 0x405454
and dword [ebp - 4], 0
cmp dword [esi + 0x400c], 0
jle 0x4054e5
lea ebx, [esi + 0xc]
mov edi, dword [ebx]
push 0x200
lea eax, [edi + 0x28]
push eax
push dword [edi + 0x10]
mov ecx, esi
call fcn.00401681
inc dword [ebp - 4]
mov dword [edi + 0x828], eax
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x400c]
jl 0x4054b9
and dword [esi + 4], 0
pop edi
pop esi
pop ebx
leave
ret