Function at 0x4071fa
Capabilities:
Get disk information

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x4e4
cmp dword [0x51adac], 4
push ebx
push esi
mov esi, dword [ebp + 0x78]
push edi
mov ebx, ecx
jl 0x407226
push esi
push str.CStorageVolumes::AddVolume__s_...
push 4
call fcn.0044fe2e
add esp, 0xc
xor edi, edi
cmp word [esi], di
jne 0x407242
push str._does_not_exist____abort
push 4
call fcn.0044fe2e
pop ecx
pop ecx
xor eax, eax
jmp 0x4076b4
xor eax, eax
push 0x206
mov word [ebp - 0x474], ax
lea eax, [ebp - 0x472]
push edi
push eax
call fcn.00449c78
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 0x40722d
or dword [ebp + 0x6c], 0xffffffff
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x6c]
push eax
lea eax, [ebp - 0x474]
push eax
mov dword [ebp + 0x64], edi
call fcn.0042f3e4
test eax, eax
jne 0x4072a7
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x6c]
push eax
push esi
call fcn.00428958
push dword [ebp + 0x6c]
push esi
call fcn.0044f0b0
cmp eax, 7
jne 0x40723b
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp + 0x7c]
mov ecx, ebx
push esi
call fcn.00406247
mov dword [ebp + 0x68], eax
cmp eax, 0xffffffff
je 0x40730b
mov edx, dword [ebp + 0x6c]
lea esi, [ebx + eax*4 + 0x1c]
mov ecx, dword [esi]
mov dword [ecx + 0x840], edx
cmp dword [0x51adac], 4
jl 0x40738f
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.0044fe2e
add esp, 0x14
jmp 0x40738f
mov ecx, ebx
call fcn.00406216
mov dword [ebp + 0x68], eax
cmp eax, 0xffffffff
jne 0x407338
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x51adac], 4
jl 0x40723b
push str._no_free_idx
jmp 0x407232
mov edx, dword [ebx + 0x18]
lea ecx, [eax + 1]
cmp edx, ecx
jle 0x407344
mov ecx, edx
lea esi, [ebx + eax*4 + 0x1c]
mov dword [ebx + 0x18], ecx
mov ecx, dword [esi]
cmp ecx, edi
je 0x407358
call fcn.00406142
jmp 0x40738f
push 0x3578
call fcn.00449e38
pop ecx
cmp eax, edi
je 0x407370
mov ecx, eax
call fcn.00406125
jmp 0x407372
xor eax, eax
mov dword [esi], eax
cmp dword [0x51adac], 4
jl 0x40738f
push dword [ebp + 0x68]
push str._add_at_idx_i
push 4
call fcn.0044fe2e
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 0x4073e8
push str.7f108a28_9833_4b3b_b780_2c6b5fa5c062
push ebx
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x4073ee
push dword [ebp + 0x78]
push ebx
call edi
mov eax, dword [ebp + 0x7c]
test eax, eax
jne 0x40741a
push 2
push 0x47dfc8
push dword [ebp + 0x78]
call fcn.0044e26f
mov dword [esi + 0x10], eax
test eax, eax
jne 0x40741d
push 2
push 0x47e028
push dword [ebp + 0x78]
call fcn.0044e26f
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 [0x51adac], 4
jl 0x407456
push dword [ebp + 0x7c]
call fcn.0044e240
push eax
push str.Problem_i
push 4
call fcn.0044fe2e
add esp, 0xc
push dword [ebp + 0x78]
lea eax, [ebp - 0x26c]
push eax
call edi
push 0x456f88
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.00449c78
add esp, 0xc
push 0x34
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x26c]
push eax
call fcn.00407137
test eax, eax
lea eax, [ebp - 8]
jne 0x4074cc
push 0x34
push eax
lea eax, [ebp - 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x4074d6
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 0x40752a
push eax
call fcn.0040669b
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.00449c78
push 0x58
lea eax, [esi + 0x850]
push eax
lea eax, [ebp - 0x64]
push eax
call fcn.00449ce2
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 0x40754d
mov edi, dword [ebp + 0x78]
push edi
call fcn.00406669
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 0x407579
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 0x4075d5
push str.DeviceHarddiskVolume
push ebx
call fcn.0042958c
test eax, eax
jne 0x4075a6
push str.DeviceCdrom
push ebx
call fcn.0042958c
test eax, eax
jne 0x4075a6
push str.DeviceFloppy
push ebx
call fcn.0042958c
test eax, eax
je 0x4075d5
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.0042e16e
test eax, eax
jne 0x4075d5
mov word [edi], ax
lea edi, [esi + 0x840]
cmp dword [edi], 0xffffffff
jne 0x40761c
lea eax, [esi + 0x844]
push eax
push edi
lea eax, [ebp - 0x26c]
push eax
call fcn.00428958
cmp dword [edi], 0xffffffff
jne 0x40761c
cmp dword [esi + 0x83c], 1
jne 0x40764d
push dword [ebp + 0x78]
mov ecx, dword [0x510c44]
call fcn.00401fdf
test eax, eax
je 0x40761c
mov eax, dword [eax + 0x3ab0]
mov dword [edi], eax
cmp dword [esi + 0x83c], 1
jne 0x40764d
mov ecx, dword [edi]
cmp ecx, 0xffffffff
jle 0x40764d
mov eax, dword [esi + 0x844]
test eax, eax
jle 0x40764d
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 [0x510c44]
test ecx, ecx
je 0x407677
cmp dword [ecx + 0x400c], 0
je 0x407677
push dword [esi + 0x83c]
push dword [edi]
call fcn.00401ecd
test eax, eax
je 0x407677
mov eax, dword [eax + 0x10]
mov dword [esi + 0x14], eax
mov ecx, esi
call fcn.0040678e
cmp dword [0x51adac], 4
jl 0x4076b2
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.0044fe2e
add esp, 0x20
mov eax, esi
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret 8