Function at 0x40576b
Capabilities:
Get disk information

Disassembly:
push ebp
push ebx
mov edx, 0x222
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x405772
call fcn.004310a0
push dword [esp + 0x898]
call fcn.00430f40
mov edx, dword [esp + 0x894]
lea ecx, [esp]
call fcn.0041e000
mov edx, 0x434032
lea ecx, [esp + 4]
call fcn.0041e008
call fcn.00430e40
push eax
push eax
mov edx, 0x4374b4
call fcn.00430f90
mov edx, dword [esp + 8]
call fcn.00430f90
call fcn.00430e92
add dword [esp], edx
call fcn.00405d1f
call fcn.00430f40
mov dword [esp + 8], eax
push dword [esp]
call sub.KERNEL32.dll_GetDriveTypeW
push eax
mov ebx, 2
cmp ebx, dword [esp]
jne 0x405847
call fcn.00430e40
push eax
push eax
push 0x105
call fcn.0041e500
lea eax, [esp + 0x14]
push eax
call fcn.00430eb0
push 0x104
mov eax, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.KERNEL32.dll_QueryDosDeviceW
push str.Floppy
push dword [esp + 0x14]
call fcn.0041e4a0
and eax, eax
je 0x40583c
mov ebp, 0x438f08
mov dword [esp + 0x14], ebp
jmp 0x405845
mov ebp, 0x438f18
mov dword [esp + 0x14], ebp
jmp 0x40589f
mov ebx, 3
cmp ebx, dword [esp]
jne 0x40585c
mov ebp, 0x438f18
mov dword [esp + 0x14], ebp
jmp 0x40589f
mov ebx, 5
cmp ebx, dword [esp]
jne 0x405871
mov ebp, 0x438f28
mov dword [esp + 0x14], ebp
jmp 0x40589f
push dword [esp + 0x89c]
call fcn.00430f40
mov edx, 0x434032
call fcn.00430e40
push eax
call fcn.00430f90
pop eax
push eax
call fcn.00430e80
pop edx
add eax, edx
add esp, 4
jmp 0x405bb2
pop eax
push 0x12
push 0
push 0
push dword [esp + 0x1c]
call sub.SETUPAPI.DLL_SetupDiGetClassDevsW
mov dword [esp + 0x14], eax
mov ebx, dword [esp + 0x14]
cmp ebx, 0xffffffff
jne 0x4058e4
mov edx, 0x434032
call fcn.00430e40
push eax
call fcn.00430f90
pop eax
push eax
call fcn.00430e80
pop edx
add eax, edx
jmp 0x405bb2
push str.setupapi.dll
push 0xffffffff
call fcn.0041fd4f
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x18]
and ebx, ebx
jne 0x40591e
mov edx, 0x434032
call fcn.00430e40
push eax
call fcn.00430f90
pop eax
push eax
call fcn.00430e80
pop edx
add eax, edx
jmp 0x405bb2
push str.SetupDiGetDeviceInterfaceDetailW
push dword [esp + 0x1c]
call fcn.0041fd8c
mov dword [esp + 0x1c], eax
push str.CM_Get_Parent
push dword [esp + 0x1c]
call fcn.0041fd8c
mov dword [esp + 0x20], eax
push str.CM_Get_Device_IDW
push dword [esp + 0x1c]
call fcn.0041fd8c
mov dword [esp + 0x24], eax
lea eax, [esp + 0x28]
lea ebp, [esp + 0x28]
mov dword [ebp], 0x1c
lea eax, [esp + 0x44]
lea eax, [esp + 0x848]
lea eax, [esp + 0x864]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x874]
push dword [esp + 0x18]
push 0
push dword [esp + 0x24]
call sub.SETUPAPI.DLL_SetupDiEnumDeviceInterfaces
mov ebx, eax
and ebx, ebx
jne 0x40599e
jmp 0x405b84
push 0
lea eax, [esp + 0x878]
push eax
push 0
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x28]
push dword [esp + 0x34]
call fcn.0041fe0f
mov ebx, dword [esp + 0x874]
and ebx, ebx
je 0x4059e8
mov ebx, dword [esp + 0x874]
cmp ebx, 0x804
jg 0x4059e8
mov eax, 1
jmp 0x4059ea
xor eax, eax
and eax, eax
je 0x405b78
lea ebp, [esp + 0x44]
mov dword [ebp], 6
lea ebp, [esp + 0x848]
mov dword [ebp], 0x1c
lea eax, [esp + 0x848]
push eax
push 0
push dword [esp + 0x87c]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x28]
push dword [esp + 0x34]
call fcn.0041fe0f
mov dword [esp + 0x878], eax
cmp dword [esp + 0x878], 0
je 0x405b78
call fcn.00430e40
push eax
lea ebp, [esp + 0x48]
lea edx, [ebp + 4]
call fcn.00430e40
push eax
push 0x400
call fcn.004311a0
call fcn.00430e92
add dword [esp], edx
call fcn.00405d1f
call fcn.00430f40
mov dword [esp + 0x87c], eax
mov ebx, dword [esp + 8]
cmp ebx, dword [esp + 0x87c]
jne 0x405b78
lea ebp, [esp + 0x848]
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x880], eax
push 0
push dword [esp + 0x884]
lea eax, [esp + 0x888]
push eax
push dword [esp + 0x2c]
call fcn.0041fde6
mov dword [esp + 0x878], eax
mov ebx, dword [esp + 0x878]
and ebx, ebx
jle 0x405ad7
jmp 0x405b84
call fcn.00430e40
push eax
push eax
push 0x104
call fcn.0041e500
lea eax, [esp + 0x888]
push eax
call fcn.00430eb0
push 0
push 0x104
mov eax, dword [esp + 0x88c]
push eax
push dword [esp + 0x88c]
push dword [esp + 0x34]
call fcn.0041fdf9
mov dword [esp + 0x878], eax
call fcn.00430e40
push eax
push str.pci_
call fcn.00430e40
push eax
push eax
push dword [esp + 0x894]
call fcn.0041e3c0
call fcn.00430e92
add dword [esp], edx
call fcn.0041e4a0
call fcn.00430f40
mov ebx, eax
cmp ebx, 1
jne 0x405b73
mov edx, dword [esp + 0x884]
call fcn.00430e40
push eax
call fcn.00430f90
lea eax, [esp + 8]
push eax
call fcn.00430eb0
jmp 0x405b84
jmp 0x405aa3
inc dword [esp + 0x870]
jmp 0x405975
push dword [esp + 0x14]
call sub.SETUPAPI.DLL_SetupDiDestroyDeviceInfoList
mov edx, dword [esp + 4]
call fcn.00430e40
push eax
call fcn.00430f90
pop eax
push eax
call fcn.00430e80
pop edx
add eax, edx
jmp 0x405bb2
push dword [esp + 0x884]
call fcn.00431170
push dword [esp]
call fcn.00431170
push dword [esp + 0xc]
call fcn.00431170
push dword [esp + 4]
call fcn.00431170
add esp, 0x888
pop ebx
pop ebp
ret 4