Function at 0x404000
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x474
mov eax, dword [0x423020]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x474], ecx
cmp eax, 2
jb 0x404262
cmp eax, 3
jbe 0x404041
cmp eax, 5
jne 0x404262
mov esi, 0x420a74
mov dword [ebp - 0x468], esi
jmp 0x404051
mov dword [ebp - 0x468], 0x420a64
mov esi, dword [ebp - 0x468]
push edi
push ecx
call fcn.00404dc0
push 0x12
push 0
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x40421e
push ebx
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x430], eax
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
mov eax, 0x1c
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x464], eax
mov dword [0x4c3d64], eax
lea eax, [ebp - 0x43c]
push eax
xor ebx, ebx
push ebx
push esi
push ebx
push edi
mov dword [0x4c3d88], 0x100
mov dword [0x4c3d94], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x404214
lea ecx, [ebp - 0x464]
push ecx
push ebx
push esi
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
push 0
lea edx, [ebp - 0x46c]
push edx
push 0
push 0
lea eax, [ebp - 0x464]
push eax
push edi
mov dword [ebp - 0x46c], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
mov ecx, dword [ebp - 0x46c]
test ecx, ecx
je 0x4041f9
cmp ecx, 0x400
ja 0x4041f9
xor eax, eax
mov dword [ebp - 0x420], eax
lea edx, [ebp - 0x420]
push edx
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x410], eax
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x408], eax
lea eax, [ebp - 0x46c]
push eax
push ecx
lea ecx, [ebp - 0x404]
push ecx
lea edx, [ebp - 0x464]
push edx
push edi
mov dword [ebp - 0x404], 5
mov dword [ebp - 0x420], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
test eax, eax
je 0x4041f9
push 0
push 0
push 3
push 0
push 3
push 0
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4041f3
push 0
lea ecx, [ebp - 0x470]
push ecx
push 0xc
lea edx, [ebp - 0x448]
push edx
push 0
push 0
push 0x2d1080
push esi
mov dword [ebp - 0x470], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4041ec
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x444]
je 0x40422e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x468]
lea ecx, [ebp - 0x43c]
push ecx
inc ebx
push ebx
push esi
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x4040d8
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x474]
push ebx
call fcn.00404300
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [ebp - 0x40c]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret