Function at 0x4012fe
Capabilities:
Enumerate disk properties
Get disk information via ioctl
Get storage device properties

Disassembly:
sub esp, 0x94c
push ebx
push 2
pop eax
push eax
push 0
push 0
push 0x402060
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40186a
push esi
push edi
push 6
pop ecx
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
mov esi, str..GlobalRoot
mov dword [esp + 0x30], 0x1c
lea edi, [esp + 0x644]
push 0x103
push eax
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x65b]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x30]
xor edi, edi
push eax
push edi
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x401861
push ebp
mov ebp, dword [esp + 0x18]
push 0x100
lea eax, [esp + 0x324]
inc edi
push 0
push eax
mov dword [esp + 0x1c], edi
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push 0x100
lea eax, [esp + 0x328]
push eax
lea eax, [esp + 0x2c]
push eax
push 0xc
lea eax, [esp + 0x48]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x4013e6
cmp di, 1
jbe 0x4013d2
push 0x402228
call sub.msvcrt.dll_printf
pop ecx
lea eax, [esp + 0x320]
push eax
push 0x40222c
call sub.msvcrt.dll_printf
pop ecx
pop ecx
lea eax, [esp + 0x1c]
push eax
push 0x104
lea eax, [esp + 0x65e]
push eax
lea eax, [esp + 0x2c]
push eax
push 0xe
lea eax, [esp + 0x48]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
xor eax, eax
push eax
push eax
push 3
push eax
push 3
push 0xc0000000
lea eax, [esp + 0x660]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401848
xor ecx, ecx
lea eax, [esp + 0x14]
push ecx
push eax
push 0xc
lea eax, [esp + 0x74]
push eax
push ecx
push ecx
push 0x2d1080
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x401463
push dword [esp + 0x6c]
push 0x40223c
call sub.msvcrt.dll_printf
pop ecx
pop ecx
push 0x70
lea eax, [esp + 0xa4]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x14]
xor ecx, ecx
push ecx
push eax
push 0x200
lea eax, [esp + 0xac]
push eax
push ecx
push ecx
push 0x700a0
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4014ce
push 0
push 0x3b9aca00
push dword [esp + 0xc4]
push dword [esp + 0xc4]
call section..text
push edx
push eax
push 0x40224c
call sub.msvcrt.dll_printf
mov ebp, dword [esp + 0xb4]
add esp, 0xc
push 0x228
lea eax, [esp + 0x424]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
and dword [esp + 0x24], 0
mov dword [esp + 0x428], 0x200
mov dword [esp + 0x42c], 5
mov byte [esp + 0x446], 0xec
push 0x28
pop ecx
push 2
pop eax
push 0
mov word [esp + 0x426], ax
lea eax, [esp + 0x28]
push eax
mov word [esp + 0x428], cx
lea eax, [esp + 0x428]
mov dword [esp + 0x43c], ecx
mov ecx, 0x228
push ecx
push eax
push ecx
push eax
push 0x4d02c
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
movzx eax, word [esp + 0x5fa]
push eax
push 0x402260
call sub.msvcrt.dll_printf
pop ecx
pop ecx
xor eax, eax
push eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x18]
push eax
push 0x200
lea eax, [esp + 0x768]
push eax
push 0xc
lea eax, [esp + 0x3c]
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x401841
mov eax, dword [esp + 0x774]
test eax, eax
je 0x4015bd
lea ecx, [esp + 0x75c]
add eax, ecx
push eax
call fcn.0040189a
push eax
push 0x402270
call sub.msvcrt.dll_printf
add esp, 0xc
push 0x402280
call sub.msvcrt.dll_printf
pop ecx
cmp ebp, 0xc
jne 0x4015d9
push str._12:_FixedMedia_
call sub.msvcrt.dll_printf
jmp 0x4015f1
cmp ebp, 0xb
jne 0x4015e5
push str._11:_RemovableMedia_
jmp 0x4015d2
push ebp
push str.__d_
call sub.msvcrt.dll_printf
pop ecx
mov edi, dword [esp + 0x77c]
pop ecx
push dword [edi*4 + 0x403008]
push 0x4022c0
call sub.msvcrt.dll_printf
push 0x4022d0
call sub.msvcrt.dll_printf
add esp, 0xc
cmp ebp, 0xc
jne 0x4017e1
cmp edi, 7
jne 0x4017d5
push 0x4022dc
call sub.msvcrt.dll_printf
mov dword [esp], 0x210
lea eax, [esp + 0x114]
push 0
push eax
call sub.msvcrt.dll_memset
push 3
lea eax, [esp + 0x120]
mov edi, 0xa0
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x1c
test eax, eax
jne 0x40174d
push 4
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 5
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 6
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 7
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 3
lea eax, [esp + 0x114]
add edi, 0x10
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 4
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 5
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 6
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
test eax, eax
jne 0x40174d
push 7
lea eax, [esp + 0x114]
push eax
push edi
push esi
call fcn.004010d9
add esp, 0x10
push 0x28
lea eax, [esp + 0x14a]
push eax
lea eax, [esp + 0x7c]
push eax
call sub.msvcrt.dll_memcpy
lea eax, [esp + 0x80]
push 0x28
push eax
call fcn.004010aa
push 0x14
lea eax, [esp + 0x13e]
mov byte [esp + 0xb4], 0
push eax
lea eax, [esp + 0x6c]
push eax
call sub.msvcrt.dll_memcpy
lea eax, [esp + 0x70]
push 0x14
push eax
call fcn.004010aa
lea eax, [esp + 0x9c]
mov byte [esp + 0x8c], 0
push eax
call fcn.0040189a
push eax
push 0x4022e8
call sub.msvcrt.dll_printf
lea eax, [esp + 0x84]
push eax
call fcn.0040189a
push eax
push 0x4022f8
call sub.msvcrt.dll_printf
add esp, 0x40
jmp 0x40183d
push 0x402308
call sub.msvcrt.dll_printf
jmp 0x40183c
cmp ebp, 0xb
jne 0x40183d
push 0x402314
call sub.msvcrt.dll_printf
pop ecx
push 0
push dword [esp + 0x4c]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
test eax, eax
jne 0x40183d
push eax
push 0x100
lea eax, [esp + 0x328]
push eax
push dword [esp + 0x24]
call dword [sym.imp.SETUPAPI.dll_CM_Get_Device_IDA]
test eax, eax
jne 0x40183d
lea eax, [esp + 0x320]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
push 0x40231c
call sub.msvcrt.dll_printf
pop ecx
pop ecx
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x34]
push eax
movzx eax, di
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x40137c
pop ebp
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop edi
pop esi
pop ebx
add esp, 0x94c
ret