Function at 0x40f740
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x37ec
call fcn.0044c7e0
mov dword [ebp - 4], ecx
mov dword [ebp - 0x20], 0
mov dword [ebp - 8], 0
mov dword [ebp - 8], 0
jmp 0x40f770
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 1
jge 0x40fa77
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp - 8]
push ecx
push str..PhysicalDrive_d
push 0x100
lea edx, [ebp - 0x13c]
push edx
call fcn.00407e50
add esp, 0x10
push 0
push 0
push 3
push 0
push 3
push 0
lea eax, [ebp - 0x13c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x40f803
push 0x100
mov ecx, dword [ebp - 4]
add ecx, 0x800
push ecx
call fcn.004085b0
add esp, 8
lea edx, [ebp - 0x13c]
push edx
push 0x1f5
push str._d_ReadPhysicalDriveInNTWithZeroRights_ERROR_CreateFileA__s__returned_INVALID_HANDLE_VALUE
push 0x100
mov eax, dword [ebp - 4]
add eax, 0x800
push eax
call fcn.00407e50
add esp, 0x14
jmp 0x40fa72
mov dword [ebp - 0x14], 0
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
push 0x2710
push 0
lea edx, [ebp - 0x37ec]
push edx
call fcn.00484bf0
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
push 0x2710
lea ecx, [ebp - 0x37ec]
push ecx
push 0xc
lea edx, [ebp - 0x30]
push edx
push 0x2d1400
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40fa2d
lea ecx, [ebp - 0x37ec]
mov dword [ebp - 0x10], ecx
lea edx, [ebp - 0xcf4]
push edx
lea eax, [ebp - 0x37ec]
push eax
push 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xc]
push edx
mov ecx, dword [ebp - 4]
call fcn.0040fc70
lea eax, [ebp - 0x90c]
push eax
lea ecx, [ebp - 0x37ec]
push ecx
push 0
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 4]
call fcn.0040fc70
lea ecx, [ebp - 0x10dc]
push ecx
lea edx, [ebp - 0x37ec]
push edx
push 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x14]
push ecx
mov ecx, dword [ebp - 4]
call fcn.0040fc70
lea edx, [ebp - 0x524]
push edx
lea eax, [ebp - 0x37ec]
push eax
push 0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
push edx
mov ecx, dword [ebp - 4]
call fcn.0040fc70
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp - 4]
movsx eax, byte [edx + ecx]
test eax, eax
jne 0x40f97e
mov ecx, 1
imul edx, ecx, 0
movsx ax, byte [ebp + edx - 0x524]
movzx ecx, ax
push ecx
call fcn.0049509a
add esp, 4
test eax, eax
jne 0x40f942
mov edx, 1
imul eax, edx, 0x13
movsx cx, byte [ebp + eax - 0x524]
movzx edx, cx
push edx
call fcn.0049509a
add esp, 4
test eax, eax
je 0x40f97e
lea eax, [ebp - 0x524]
push eax
push 0x400
mov ecx, dword [ebp - 4]
push ecx
call fcn.00494be4
add esp, 0xc
lea edx, [ebp - 0x90c]
push edx
push 0x400
mov eax, dword [ebp - 4]
add eax, 0x400
push eax
call fcn.00494be4
add esp, 0xc
mov dword [ebp - 0x20], 1
push 0x2710
push 0
lea ecx, [ebp - 0x37ec]
push ecx
call fcn.00484bf0
add esp, 0xc
push 0
lea edx, [ebp - 0x14]
push edx
push 0x2710
lea eax, [ebp - 0x37ec]
push eax
push 0
push 0
push 0x700a0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40f9f4
push 0x100
mov edx, dword [ebp - 4]
add edx, 0x800
push edx
call fcn.004085b0
add esp, 8
lea eax, [ebp - 0x13c]
push eax
push str._s_ReadPhysicalDriveInNTWithZeroRights_ERROR_DeviceIoControl____IOCTL_DISK_GET_DRIVE_GEOMETRY_EX__returned_0
mov ecx, dword [ebp - 4]
add ecx, 0x800
push ecx
call fcn.0041cb80
add esp, 0xc
jmp 0x40fa2b
lea edx, [ebp - 0x37ec]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 8], 0xc
jne 0x40fa0f
mov dword [ebp - 0x18], 1
jmp 0x40fa16
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 0x18]
mov ecx, dword [edx + 0x1c]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], ecx
jmp 0x40fa68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
push 0x100
mov edx, dword [ebp - 4]
add edx, 0x800
push edx
call fcn.004085b0
add esp, 8
mov eax, dword [ebp - 0x24]
push eax
push str.DeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
mov ecx, dword [ebp - 4]
add ecx, 0x800
push ecx
call fcn.0041cb80
add esp, 0xc
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f767
mov eax, dword [ebp - 0x20]
mov esp, ebp
pop ebp
ret