Function at 0x40d090
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
mov eax, dword [0x458080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x1a2f9d8]
xorps xmm0, xmm0
push ebx
push esi
push edi
mov dword [0x458150], eax
xor eax, eax
push 0x400
push eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x464]
push eax
movlpd qword [0x1a28ab8], xmm0
mov dword [0x1a2f9d8], 0x458134
mov dword [ebp - 0x20], 0x1c
mov dword [ebp - 0x1c], 0
movq qword [ebp - 0x14], xmm0
mov dword [ebp - 0x468], 6
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x58], 0x1c
xor eax, eax
mov dword [ebp - 0x54], 0
xorps xmm0, xmm0
mov dword [ebp - 0x50], eax
movq qword [ebp - 0x4c], xmm0
movups xmm0, xmmword [0x428704]
push 0x12
push eax
push eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x30]
push eax
movups xmmword [ebp - 0x30], xmm0
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov esi, eax
mov dword [ebp - 0x470], esi
cmp esi, 0xffffffff
je 0x40d2ed
lea eax, [ebp - 0x20]
xor edi, edi
push eax
push edi
lea eax, [ebp - 0x30]
push eax
push edi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x40d2ed
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
nop
lea eax, [ebp - 0x20]
inc edi
push eax
push edi
lea eax, [ebp - 0x30]
push eax
push 0
push esi
call ebx
test eax, eax
jne 0x40d170
test edi, edi
je 0x40d2ed
push 4
push edi
call dword [sym.imp.msvcrt.dll_calloc]
add esp, 8
mov dword [ebp - 0x46c], eax
test eax, eax
jne 0x40d1cc
push str.out_of_memory
push 3
call fcn.00415d20
mov eax, dword [ebp - 0x46c]
add esp, 8
mov dword [0x1a28abc], eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00419bef
mov esp, ebp
pop ebp
ret
mov dword [0x1a28abc], eax
lea eax, [ebp - 0x20]
push eax
push 0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x46c], 0
push eax
push 0
push esi
call ebx
test eax, eax
je 0x40d2ca
cmp dword [0x1a28ab8], edi
jae 0x40d2ca
lea eax, [ebp - 0x58]
push eax
push 0
push 0x404
lea eax, [ebp - 0x468]
push eax
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x40d2a3
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x464]
mov dword [ebp - 0x34], 0
xorps xmm0, xmm0
push eax
movq qword [ebp - 0x3c], xmm0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40d2a3
test ebx, ebx
je 0x40d2a3
push 0
lea eax, [ebp - 0x5c]
push eax
push 0xc
lea eax, [ebp - 0x3c]
push eax
push 0
push 0
push 0x2d1080
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
mov esi, dword [ebp - 0x470]
je 0x40d2a3
mov edx, dword [0x1a28ab8]
mov ecx, dword [0x1a28abc]
mov eax, dword [ebp - 0x38]
mov dword [ecx + edx*4], eax
inc dword [0x1a28ab8]
mov eax, dword [ebp - 0x46c]
lea ecx, [ebp - 0x20]
push ecx
inc eax
push eax
mov dword [ebp - 0x46c], eax
lea eax, [ebp - 0x30]
push eax
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x40d1f2
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push 0x40d080
push 4
push dword [0x1a28ab8]
push dword [0x1a28abc]
call dword [sym.imp.msvcrt.dll_qsort]
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419bef
mov esp, ebp
pop ebp
ret