Function at 0x401b54
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8a4
push ebx
push esi
push edi
xor esi, esi
mov ebx, ecx
push 0x34c88
push esi
push ebx
mov dword [ebx + 0x34c88], esi
mov dword [ebx + 0x34c8c], esi
call fcn.004051a0
add esp, 0xc
mov edi, 0x40b298
push 0x12
push esi
push esi
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x401b9e
xor al, al
jmp 0x401fb7
push 0x1c
mov dword [ebp - 0x10], 0xffffef42
sub dword [ebp - 0x10], ebx
pop eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x19c], 5
lea esi, [ebx + 0x10be]
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 8]
push edi
push 0
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x401fa3
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 8]
push edi
push 0
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
push str.FV_1
push 4
call fcn.0040116e
pop ecx
lea eax, [ebp - 0x58]
pop ecx
mov dword [ebp - 0x19c], 5
push eax
push 0
lea eax, [ebp - 0x19c]
push 0x104
push eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push str.FV_2
push 4
mov dword [ebp - 4], eax
call fcn.0040116e
cmp dword [ebp - 4], 0
pop ecx
pop ecx
je 0x401bc4
lea eax, [ebp - 0x198]
push eax
call fcn.00405120
pop ecx
lea eax, [ebp - 0x198]
push eax
lea eax, [ebp - 0x2a0]
push 0x40d04c
push eax
call fcn.00404bae
add esp, 0xc
lea eax, [ebp - 0x2a0]
push eax
push str.FV_3___s
push 4
call fcn.0040116e
add esp, 0xc
lea edi, [esi - 0x10be]
lea eax, [ebp - 0x2a0]
push 0x34
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointA]
push edi
push eax
push str.FV_4_res_i_vol_s
push 4
mov dword [ebp - 4], eax
call fcn.0040116e
add esp, 0x10
cmp dword [ebp - 4], 0
je 0x401cbe
cmp byte [edi], 0
je 0x401cbe
inc dword [ebx + 0x34c8c]
cmp byte [edi], 0
jne 0x401cd4
lea eax, [ebp - 0x2a0]
push eax
push str.volume_name_not_determined_for_DevicePath_s
push 1
call fcn.0040116e
add esp, 0xc
lea eax, [ebp - 0x2a0]
push eax
lea eax, [esi - 0x108a]
push eax
call fcn.00404900
lea eax, [ebp - 0x2a0]
push str.floppy
push eax
call fcn.00404a30
add esp, 0x10
test eax, eax
je 0x401d02
mov byte [esi], 1
lea eax, [esi - 0x10ba]
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.00404900
lea eax, [ebp - 0x98]
push 0x5c
push eax
call fcn.00404454
add esp, 0x10
lea eax, [esi - 0xf86]
push 0x104
push eax
lea eax, [ebp - 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x3a4]
push eax
call fcn.00404900
lea eax, [ebp - 0x3a4]
push 0x5c
push eax
call fcn.00404454
add esp, 0x10
push str.FV_5
push 4
call fcn.0040116e
push edi
call fcn.0040417c
add esp, 0xc
mov byte [esi - 2], al
push str.FV_6
push 4
call fcn.0040116e
pop ecx
lea eax, [ebp - 0x2a0]
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov dword [esi - 0xa], eax
shl eax, 4
add eax, str.UNKNOWN
push eax
push str.FV_7_drivetype_s
push 4
call fcn.0040116e
lea eax, [ebp - 0x198]
push eax
call fcn.004040fc
add esp, 0x10
mov dword [esi - 0xe], eax
push eax
push str.FV_8_devicenumber_i
push 4
call fcn.0040116e
add esp, 0xc
cmp byte [edi], 0
je 0x401f2d
cmp dword [0x40e2a8], 0x501
jl 0x401f2d
cmp dword [0x40ead8], 0
je 0x401f2d
and dword [ebp - 0x20], 0
push str.FV_9
push 4
call fcn.0040116e
pop ecx
lea eax, [ebp - 0x20]
pop ecx
push eax
lea eax, [ebp - 0x8a4]
push 0x500
push eax
push edi
call dword [0x40ead8]
test eax, eax
je 0x401f17
xor edi, edi
cmp byte [ebp - 0x8a4], 0
je 0x401f07
mov ecx, dword [esi - 0x212]
lea eax, [ebp + edi - 0x8a4]
push eax
mov eax, dword [ebp - 0x10]
shl ecx, 7
add eax, esi
add ecx, eax
mov dword [ebp - 4], eax
lea eax, [ecx + ebx + 0x9ac]
push eax
call fcn.00404900
mov eax, dword [esi - 0x212]
shl eax, 7
add eax, dword [ebp - 4]
lea eax, [eax + ebx + 0x9ac]
push eax
call fcn.00405120
lea eax, [edi + eax + 1]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi - 0x212]
shl eax, 7
add eax, dword [ebp - 4]
lea eax, [eax + ebx + 0x9ac]
push eax
call fcn.00405120
mov edi, eax
lea eax, [esi - 0x20e]
push eax
call fcn.00405120
lea eax, [edi + eax + 4]
add esp, 0x14
cmp eax, 0x200
jae 0x401ef0
lea edi, [esi - 0x20e]
push 0x40d29c
push edi
call fcn.00404910
mov ecx, dword [esi - 0x212]
mov eax, dword [ebp - 0x10]
shl ecx, 7
add eax, esi
add ecx, eax
lea eax, [ecx + ebx + 0x9ac]
push eax
push edi
call fcn.00404910
push 0x40d298
push edi
call fcn.00404910
add esp, 0x18
mov edi, dword [ebp - 0x1c]
inc dword [esi - 0x212]
cmp byte [ebp + edi - 0x8a4], 0
jne 0x401e36
lea eax, [esi - 0x20e]
push 0x2c
push eax
call fcn.00404454
pop ecx
pop ecx
lea eax, [esi - 0x20e]
push eax
push str.FV_10_mp_s
push 4
call fcn.0040116e
add esp, 0xc
mov edi, dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
and dword [ebp - 0x14], 0
push 0
lea eax, [ebp - 0x14]
push dword [ebp - 0x44]
push eax
call edi
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x401f4f
mov dword [esi - 0xd3e], eax
and dword [ebp - 0x18], 0
push 0
push eax
lea eax, [ebp - 0x18]
push eax
call edi
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x401f69
mov dword [esi - 0xd3a], eax
cmp byte [esi - 0x20e], 0
lea eax, [esi - 0x20e]
je 0x401f82
push 0x2c
push eax
call fcn.00404454
pop ecx
pop ecx
push str.FV_11
push 4
call fcn.0040116e
inc dword [ebp - 8]
pop ecx
pop ecx
add esi, 0x10e4
mov edi, 0x40b298
jmp 0x401bc4
push dword [ebp - 0xc]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [ebp - 8]
mov dword [ebx + 0x34c88], eax
mov al, 1
pop edi
pop esi
pop ebx
leave
ret