Function at 0x407341
Capabilities:
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x4e4
push ebx
push esi
mov esi, dword [ebp + 0x78]
push edi
push 4
pop edi
cmp dword [0x51cdd4], edi
mov ebx, ecx
jl 0x40736e
push esi
push str.CStorageVolumes::AddVolume__s_...
push edi
call fcn.00451479
add esp, 0xc
cmp word [esi], 0
jne 0x407388
push str._does_not_exist____abort
push edi
call fcn.00451479
pop ecx
pop ecx
xor eax, eax
jmp 0x4077fe
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x474], ax
lea eax, [ebp - 0x472]
push eax
call fcn.0044b15e
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x474]
lea eax, [esi + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x407374
and dword [ebp + 0x64], 0
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp - 0x474]
or edi, 0xffffffff
push eax
mov dword [ebp + 0x6c], edi
call fcn.0043033a
test eax, eax
jne 0x4073f0
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x6c]
push eax
push esi
call fcn.004291ae
push edi
push dword [ebp + 0x6c]
push esi
call fcn.004505f4
cmp eax, 7
jne 0x407381
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp + 0x7c]
mov ecx, ebx
push esi
call fcn.004062d5
mov dword [ebp + 0x68], eax
cmp eax, edi
je 0x407454
mov edx, dword [ebp + 0x6c]
lea esi, [ebx + eax*4 + 0x1c]
mov ecx, dword [esi]
mov dword [ecx + 0x840], edx
cmp dword [0x51cdd4], 4
jl 0x4074d9
push dword [ebp + 0x6c]
mov ecx, dword [esi]
push dword [ecx + 0x840]
push eax
push str._already_in_list_at_idx_i_devnum_i__i
push 4
call fcn.00451479
add esp, 0x14
jmp 0x4074d9
mov ecx, ebx
call fcn.004062a4
mov dword [ebp + 0x68], eax
cmp eax, edi
jne 0x407482
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x51cdd4], 4
jl 0x407381
push str._no_free_idx
push 4
jmp 0x40737a
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 1]
cmp edx, ecx
jle 0x40748e
mov ecx, edx
lea esi, [ebx + eax*4 + 0x1c]
mov dword [ebx + 0x18], ecx
mov ecx, dword [esi]
test ecx, ecx
je 0x4074a2
call fcn.004061d0
jmp 0x4074d9
push 0x35b8
call fcn.0044b31e
pop ecx
test eax, eax
je 0x4074ba
mov ecx, eax
call fcn.004061b3
jmp 0x4074bc
xor eax, eax
mov dword [esi], eax
cmp dword [0x51cdd4], 4
jl 0x4074d9
push dword [ebp + 0x68]
push str._add_at_idx_i
push 4
call fcn.00451479
add esp, 0xc
mov esi, dword [esi]
mov eax, dword [ebp + 0x68]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [esi + 4], eax
xor eax, eax
inc eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov eax, dword [ebp + 0x6c]
mov dword [esi + 0x840], eax
mov eax, dword [ebp + 0x64]
lea ecx, [ebp - 0x474]
mov dword [esi + 0x844], eax
lea eax, [esi + 0x428]
push ecx
push eax
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ebx, [esi + 0x18]
cmp word [ebx], 0
je 0x407532
push str.7f108a28_9833_4b3b_b780_2c6b5fa5c062
push ebx
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x407538
push dword [ebp + 0x78]
push ebx
call edi
mov eax, dword [ebp + 0x7c]
test eax, eax
jne 0x407564
push 2
push 0x47f918
push dword [ebp + 0x78]
call fcn.0044f776
mov dword [esi + 0x10], eax
test eax, eax
jne 0x407567
push 2
push 0x47f978
push dword [ebp + 0x78]
call fcn.0044f776
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 [0x51cdd4], 4
jl 0x4075a0
push dword [ebp + 0x7c]
call fcn.0044f747
push eax
push str.Problem_i
push 4
call fcn.00451479
add esp, 0xc
push dword [ebp + 0x78]
lea eax, [ebp - 0x26c]
push eax
call edi
push 0x457fe0
lea eax, [ebp - 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov dword [esi + 0x838], eax
xor eax, eax
push 0x66
push eax
mov word [ebp - 8], ax
lea eax, [ebp - 6]
push eax
call fcn.0044b15e
add esp, 0xc
push 0x34
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.0040727e
test eax, eax
lea eax, [ebp - 8]
jne 0x407616
push 0x34
push eax
lea eax, [ebp - 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x407620
lea eax, [ebp - 8]
push eax
lea eax, [esi + 0x848]
push eax
call edi
lea eax, [esi + 0x848]
xor edi, edi
cmp word [eax], di
je 0x407674
push eax
call fcn.00406729
mov dword [esi + 0x83c], eax
xor eax, eax
push 0x5a
mov word [ebp - 0x64], ax
lea eax, [ebp - 0x62]
push edi
push eax
call fcn.0044b15e
push 0x58
lea eax, [esi + 0x850]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.0044b1c8
add esp, 0x18
push ebx
lea eax, [esi + 0x428]
push eax
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
jmp 0x407697
mov edi, dword [ebp + 0x78]
push edi
call fcn.004066f7
mov dword [esi + 0x83c], eax
push ebx
lea eax, [esi + 0x428]
push eax
lea eax, [edi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
xor edi, edi
lea ebx, [esi + 0x428]
cmp word [ebx], di
jne 0x4076c3
push edi
lea eax, [ebp + 0x60]
push eax
push ebx
lea eax, [ebp + 0x7c]
push eax
push 0xf
push dword [ebp + 0x7c]
mov dword [ebp + 0x60], 0x208
call dword [sym.imp.CFGMGR32.dll_CM_Get_DevNode_Registry_PropertyW]
cmp word [ebx], di
je 0x40771f
push str.DeviceHarddiskVolume
push ebx
call fcn.00429dfe
test eax, eax
jne 0x4076f0
push str.DeviceCdrom
push ebx
call fcn.00429dfe
test eax, eax
jne 0x4076f0
push str.DeviceFloppy
push ebx
call fcn.00429dfe
test eax, eax
je 0x40771f
lea eax, [esi + 0x438]
push eax
lea edi, [esi + 0x8b0]
push str.._s
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [esi + 0x8b8]
push eax
call fcn.0042e9ee
test eax, eax
jne 0x40771f
mov word [edi], ax
lea edi, [esi + 0x840]
cmp dword [edi], 0xffffffff
jne 0x407766
lea eax, [esi + 0x844]
push eax
push edi
lea eax, [ebp - 0x26c]
push eax
call fcn.004291ae
cmp dword [edi], 0xffffffff
jne 0x407766
cmp dword [esi + 0x83c], 1
jne 0x407797
push dword [ebp + 0x78]
mov ecx, dword [0x512c64]
call fcn.00401fc9
test eax, eax
je 0x407766
mov eax, dword [eax + 0x3ab0]
mov dword [edi], eax
cmp dword [esi + 0x83c], 1
jne 0x407797
mov ecx, dword [edi]
cmp ecx, 0xffffffff
jle 0x407797
mov eax, dword [esi + 0x844]
test eax, eax
jle 0x407797
push eax
push ecx
lea eax, [esi + 0x630]
push str.DeviceHarddisk_iPartition_i
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov ecx, dword [0x512c64]
test ecx, ecx
je 0x4077c1
cmp dword [ecx + 0x400c], 0
je 0x4077c1
push dword [esi + 0x83c]
push dword [edi]
call fcn.00401eb7
test eax, eax
je 0x4077c1
mov eax, dword [eax + 0x14]
mov dword [esi + 0x14], eax
mov ecx, esi
call fcn.0040681c
cmp dword [0x51cdd4], 4
jl 0x4077fc
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 + 0x68]
push str._added_at_idx_i__devinst_u_devnum_i_devcls_i_vn_s_mp_s
push 4
call fcn.00451479
add esp, 0x20
mov eax, esi
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret 8