Function at 0x406552
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d4
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 4
pop edi
cmp dword [0x507a24], edi
mov esi, ecx
jl 0x40657d
push ebx
push str.CStorageVolumes::AddVolume__s_...
push edi
call fcn.00445f0b
add esp, 0xc
cmp word [ebx], 0
je 0x4065a2
push ebx
call fcn.0042972f
test eax, eax
jne 0x4065a2
push str._does_not_exist____abort
push edi
call fcn.00445f0b
pop ecx
pop ecx
or eax, 0xffffffff
jmp 0x406932
push dword [ebp + 0xc]
mov ecx, esi
push ebx
call fcn.004058c4
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x4065f0
push ebx
call fcn.00429f79
mov ecx, dword [ebp - 4]
lea esi, [esi + ecx*4 + 4]
mov edx, dword [esi]
mov dword [edx + 0x840], eax
cmp dword [0x507a24], edi
jl 0x406661
push eax
mov eax, dword [esi]
push dword [eax + 0x840]
push ecx
push str._already_in_list_at_idx_i_devnum_i__i
push edi
call fcn.00445f0b
add esp, 0x14
jmp 0x406661
mov ecx, esi
call fcn.00405894
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x40660e
cmp dword [0x507a24], edi
jl 0x40659a
push str._no_free_idx
jmp 0x406592
mov edx, dword [esi]
lea ecx, [eax + 1]
cmp edx, ecx
jle 0x406619
mov ecx, edx
mov dword [esi], ecx
lea esi, [esi + eax*4 + 4]
mov ecx, dword [esi]
test ecx, ecx
je 0x40662c
call fcn.00405822
jmp 0x406661
push 0x34f8
call fcn.0043ff54
pop ecx
test eax, eax
je 0x406644
mov ecx, eax
call fcn.00405805
jmp 0x406646
xor eax, eax
mov dword [esi], eax
cmp dword [0x507a24], edi
jl 0x406661
push dword [ebp - 4]
push str._add_at_idx_i
push edi
call fcn.00445f0b
add esp, 0xc
mov esi, dword [esi]
mov eax, dword [ebp - 4]
mov dword [esi + 4], eax
xor eax, eax
inc eax
lea edi, [esi + 0x18]
cmp word [edi], 0
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
je 0x40668b
push str.7f108a28_9833_4b3b_b780_2c6b5fa5c062
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x4066a1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
or dword [esi + 0x840], 0xffffffff
and dword [esi + 0x844], 0
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4066c5
push 2
push 0x46e674
push ebx
call fcn.00444b10
push 2
push 0x46e6c4
push ebx
mov dword [esi + 0x10], eax
call fcn.00444b10
push 0
mov dword [esi + 0x10], eax
mov ebx, 0x104
push ebx
lea eax, [esi + 0x220]
push eax
push dword [esi + 0x10]
call dword [sym.imp.CFGMGR32.dll_CM_Get_Device_IDW]
cmp dword [0x507a24], 4
jl 0x406701
push dword [ebp + 0xc]
call fcn.00444ae1
push eax
push str.Problem_i
push 4
call fcn.00445f0b
add esp, 0xc
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x2d4]
push eax
call edi
push 0x44c7f8
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov dword [esi + 0x838], eax
push 0x34
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x406762
lea eax, [ebp - 0xcc]
push eax
lea eax, [esi + 0x848]
push eax
call edi
lea eax, [esi + 0x848]
cmp word [eax], 0
je 0x4067a6
push eax
call fcn.00405cd4
mov dword [esi + 0x83c], eax
xor eax, eax
push 0x5a
push eax
mov word [ebp - 0x64], ax
lea eax, [ebp - 0x62]
push eax
call fcn.0043fd94
push 0x58
lea eax, [esi + 0x850]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0043fdfe
add esp, 0x18
lea eax, [ebp - 0x64]
jmp 0x4067ba
push dword [ebp + 8]
call fcn.00405ca2
mov dword [esi + 0x83c], eax
mov eax, dword [ebp + 8]
add eax, 8
push ebx
lea edi, [esi + 0x428]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
xor ebx, ebx
cmp word [edi], bx
jne 0x4067ef
push ebx
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp + 0xc]
push eax
push 0xf
push dword [ebp + 0xc]
mov dword [ebp - 8], 0x208
call dword [sym.imp.CFGMGR32.dll_CM_Get_DevNode_Registry_PropertyW]
cmp word [edi], bx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
je 0x406863
lea eax, [esi + 0x844]
push eax
lea eax, [esi + 0x840]
push eax
push edi
call fcn.00429d7f
push str.DeviceHarddiskVolume
push edi
call fcn.0042580f
test eax, eax
jne 0x406838
push str.DeviceCdrom
push edi
call fcn.0042580f
test eax, eax
jne 0x406838
push str.DeviceFloppy
push edi
call fcn.0042580f
test eax, eax
je 0x406863
lea eax, [esi + 0x438]
push eax
lea edi, [esi + 0x8b0]
push str.._s
push edi
call ebx
add esp, 0xc
lea eax, [esi + 0x8b8]
push eax
call fcn.0042972f
test eax, eax
jne 0x406863
mov word [edi], ax
lea edi, [esi + 0x840]
cmp dword [edi], 0xffffffff
jne 0x4068aa
lea eax, [esi + 0x844]
push eax
push edi
lea eax, [ebp - 0x2d4]
push eax
call fcn.00424bab
cmp dword [edi], 0xffffffff
jne 0x4068aa
cmp dword [esi + 0x83c], 1
jne 0x4068d7
push dword [ebp + 8]
mov ecx, dword [0x4fd5c4]
call fcn.00401e0e
test eax, eax
je 0x4068aa
mov eax, dword [eax + 0x3a20]
mov dword [edi], eax
cmp dword [esi + 0x83c], 1
jne 0x4068d7
mov ecx, dword [edi]
cmp ecx, 0xffffffff
jle 0x4068d7
mov eax, dword [esi + 0x844]
test eax, eax
jle 0x4068d7
push eax
push ecx
lea eax, [esi + 0x630]
push str.DeviceHarddisk_iPartition_i
push eax
call ebx
add esp, 0x10
push dword [esi + 0x83c]
mov ecx, dword [0x4fd5c4]
push dword [edi]
call fcn.00401d0f
test eax, eax
je 0x4068f4
mov eax, dword [eax + 0x10]
mov dword [esi + 0x14], eax
mov ecx, esi
call fcn.00405dc7
cmp dword [0x507a24], 4
jl 0x40692f
lea eax, [esi + 0x930]
push eax
lea eax, [esi + 0x848]
push eax
push dword [esi + 0x83c]
push dword [edi]
push dword [esi + 0x10]
push dword [ebp - 4]
push str._added_at_idx_i__devinst_u_devnum_i_devcls_i_vn_s_mp_s
push 4
call fcn.00445f0b
add esp, 0x20
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8