Function at 0x406af8
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 [0x512584], edi
mov esi, ecx
jl 0x406b23
push ebx
push str.CStorageVolumes::AddVolume__s_...
push edi
call fcn.00449e4d
add esp, 0xc
cmp word [ebx], 0
je 0x406b48
push ebx
call fcn.0042b82e
test eax, eax
jne 0x406b48
push str._does_not_exist____abort
push edi
call fcn.00449e4d
pop ecx
pop ecx
or eax, 0xffffffff
jmp 0x406edc
push dword [ebp + 0xc]
mov ecx, esi
push ebx
call fcn.00405e6e
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x406b96
push ebx
call fcn.0042c423
mov ecx, dword [ebp - 4]
lea esi, [esi + ecx*4 + 4]
mov edx, dword [esi]
mov dword [edx + 0x840], eax
cmp dword [0x512584], edi
jl 0x406c07
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.00449e4d
add esp, 0x14
jmp 0x406c07
mov ecx, esi
call fcn.00405e3e
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x406bb4
cmp dword [0x512584], edi
jl 0x406b40
push str._no_free_idx
jmp 0x406b38
mov edx, dword [esi]
lea ecx, [eax + 1]
cmp edx, ecx
jle 0x406bbf
mov ecx, edx
mov dword [esi], ecx
lea esi, [esi + eax*4 + 4]
mov ecx, dword [esi]
test ecx, ecx
je 0x406bd2
call fcn.00405d86
jmp 0x406c07
push 0x34f8
call fcn.00444556
pop ecx
test eax, eax
je 0x406bea
mov ecx, eax
call fcn.00405d69
jmp 0x406bec
xor eax, eax
mov dword [esi], eax
cmp dword [0x512584], edi
jl 0x406c07
push dword [ebp - 4]
push str._add_at_idx_i
push edi
call fcn.00449e4d
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 0x406c31
push str.7f108a28_9833_4b3b_b780_2c6b5fa5c062
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x406c47
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 0x406c6f
push 2
push 0x476570
push ebx
call fcn.0044868d
mov dword [esi + 0x10], eax
test eax, eax
jne 0x406c72
push 2
push 0x4765d0
push ebx
call fcn.0044868d
mov dword [esi + 0x10], eax
push 0
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 [0x512584], 4
jl 0x406cab
push dword [ebp + 0xc]
call fcn.0044865e
push eax
push str.Problem_i
push 4
call fcn.00449e4d
add esp, 0xc
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x2d4]
push eax
call edi
push 0x450ce4
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 0x406d0c
lea eax, [ebp - 0xcc]
push eax
lea eax, [esi + 0x848]
push eax
call edi
lea eax, [esi + 0x848]
cmp word [eax], 0
je 0x406d50
push eax
call fcn.0040627e
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.00444396
push 0x58
lea eax, [esi + 0x850]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.00444400
add esp, 0x18
lea eax, [ebp - 0x64]
jmp 0x406d64
push dword [ebp + 8]
call fcn.0040624c
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 0x406d99
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 0x406e0d
lea eax, [esi + 0x844]
push eax
lea eax, [esi + 0x840]
push eax
push edi
call fcn.0042c229
push str.DeviceHarddiskVolume
push edi
call fcn.00427780
test eax, eax
jne 0x406de2
push str.DeviceCdrom
push edi
call fcn.00427780
test eax, eax
jne 0x406de2
push str.DeviceFloppy
push edi
call fcn.00427780
test eax, eax
je 0x406e0d
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.0042b82e
test eax, eax
jne 0x406e0d
mov word [edi], ax
lea edi, [esi + 0x840]
cmp dword [edi], 0xffffffff
jne 0x406e54
lea eax, [esi + 0x844]
push eax
push edi
lea eax, [ebp - 0x2d4]
push eax
call fcn.00426b54
cmp dword [edi], 0xffffffff
jne 0x406e54
cmp dword [esi + 0x83c], 1
jne 0x406e81
push dword [ebp + 8]
mov ecx, dword [0x508068]
call fcn.00401e53
test eax, eax
je 0x406e54
mov eax, dword [eax + 0x3a24]
mov dword [edi], eax
cmp dword [esi + 0x83c], 1
jne 0x406e81
mov ecx, dword [edi]
cmp ecx, 0xffffffff
jle 0x406e81
mov eax, dword [esi + 0x844]
test eax, eax
jle 0x406e81
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 [0x508068]
push dword [edi]
call fcn.00401d4e
test eax, eax
je 0x406e9e
mov eax, dword [eax + 0x10]
mov dword [esi + 0x14], eax
mov ecx, esi
call fcn.00406371
cmp dword [0x512584], 4
jl 0x406ed9
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.00449e4d
add esp, 0x20
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8