Function at 0x40691f
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 [0x50da14], edi
mov esi, ecx
jl 0x40694a
push ebx
push str.CStorageVolumes::AddVolume__s_...
push edi
call fcn.004487a4
add esp, 0xc
cmp word [ebx], 0
je 0x40696f
push ebx
call fcn.0042ae2a
test eax, eax
jne 0x40696f
push str._does_not_exist____abort
push edi
call fcn.004487a4
pop ecx
pop ecx
or eax, 0xffffffff
jmp 0x406d03
push dword [ebp + 0xc]
mov ecx, esi
push ebx
call fcn.00405c8f
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x4069bd
push ebx
call fcn.0042b755
mov ecx, dword [ebp - 4]
lea esi, [esi + ecx*4 + 4]
mov edx, dword [esi]
mov dword [edx + 0x840], eax
cmp dword [0x50da14], edi
jl 0x406a2e
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.004487a4
add esp, 0x14
jmp 0x406a2e
mov ecx, esi
call fcn.00405c5f
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x4069db
cmp dword [0x50da14], edi
jl 0x406967
push str._no_free_idx
jmp 0x40695f
mov edx, dword [esi]
lea ecx, [eax + 1]
cmp edx, ecx
jle 0x4069e6
mov ecx, edx
mov dword [esi], ecx
lea esi, [esi + eax*4 + 4]
mov ecx, dword [esi]
test ecx, ecx
je 0x4069f9
call fcn.00405bed
jmp 0x406a2e
push 0x34f8
call fcn.00442eef
pop ecx
test eax, eax
je 0x406a11
mov ecx, eax
call fcn.00405bd0
jmp 0x406a13
xor eax, eax
mov dword [esi], eax
cmp dword [0x50da14], edi
jl 0x406a2e
push dword [ebp - 4]
push str._add_at_idx_i
push edi
call fcn.004487a4
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 0x406a58
push str.7f108a28_9833_4b3b_b780_2c6b5fa5c062
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x406a6e
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 0x406a96
push 2
push 0x471898
push ebx
call fcn.00446fae
mov dword [esi + 0x10], eax
test eax, eax
jne 0x406a99
push 2
push 0x4718f8
push ebx
call fcn.00446fae
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 [0x50da14], 4
jl 0x406ad2
push dword [ebp + 0xc]
call fcn.00446f7f
push eax
push str.Problem_i
push 4
call fcn.004487a4
add esp, 0xc
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x2d4]
push eax
call edi
push 0x44ec18
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 0x406b33
lea eax, [ebp - 0xcc]
push eax
lea eax, [esi + 0x848]
push eax
call edi
lea eax, [esi + 0x848]
cmp word [eax], 0
je 0x406b77
push eax
call fcn.004060a1
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.00442d2f
push 0x58
lea eax, [esi + 0x850]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.00442d99
add esp, 0x18
lea eax, [ebp - 0x64]
jmp 0x406b8b
push dword [ebp + 8]
call fcn.0040606f
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 0x406bc0
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 0x406c34
lea eax, [esi + 0x844]
push eax
lea eax, [esi + 0x840]
push eax
push edi
call fcn.0042b55b
push str.DeviceHarddiskVolume
push edi
call fcn.00426e06
test eax, eax
jne 0x406c09
push str.DeviceCdrom
push edi
call fcn.00426e06
test eax, eax
jne 0x406c09
push str.DeviceFloppy
push edi
call fcn.00426e06
test eax, eax
je 0x406c34
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.0042ae2a
test eax, eax
jne 0x406c34
mov word [edi], ax
lea edi, [esi + 0x840]
cmp dword [edi], 0xffffffff
jne 0x406c7b
lea eax, [esi + 0x844]
push eax
push edi
lea eax, [ebp - 0x2d4]
push eax
call fcn.004261a2
cmp dword [edi], 0xffffffff
jne 0x406c7b
cmp dword [esi + 0x83c], 1
jne 0x406ca8
push dword [ebp + 8]
mov ecx, dword [0x5034fc]
call fcn.00401dda
test eax, eax
je 0x406c7b
mov eax, dword [eax + 0x3a24]
mov dword [edi], eax
cmp dword [esi + 0x83c], 1
jne 0x406ca8
mov ecx, dword [edi]
cmp ecx, 0xffffffff
jle 0x406ca8
mov eax, dword [esi + 0x844]
test eax, eax
jle 0x406ca8
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 [0x5034fc]
push dword [edi]
call fcn.00401cdb
test eax, eax
je 0x406cc5
mov eax, dword [eax + 0x10]
mov dword [esi + 0x14], eax
mov ecx, esi
call fcn.00406194
cmp dword [0x50da14], 4
jl 0x406d00
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.004487a4
add esp, 0x20
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8