Function at 0x40c744
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x37cc
call fcn.00530290
mov eax, dword [0x65a640]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
lea eax, [ebp - 0x108]
push ebx
push str..PhysicalDrive_d
mov esi, 0x100
mov dword [ebp - 0x37cc], ebx
push esi
push eax
mov edi, ecx
call fcn.0040c267
add esp, 0x10
lea eax, [ebp - 0x108]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40c7d2
add edi, 0x800
mov ecx, esi
mov eax, edi
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x40c7a9
lea eax, [ebp - 0x108]
push eax
push 0x143
push str._d_ReadPhysicalDriveInNTWithZeroRights_ERROR_CreateFileA__s__returned_INVALID_HANDLE_VALUE
push esi
push edi
call fcn.0040c267
add esp, 0x14
jmp 0x40c98f
xor eax, eax
push 0x2710
push eax
mov dword [ebp - 0x37c8], eax
mov dword [ebp - 0x37bc], eax
mov dword [ebp - 0x37c4], eax
mov dword [ebp - 0x37c0], eax
lea eax, [ebp - 0x37b8]
push eax
call fcn.005423a0
add esp, 0xc
lea eax, [ebp - 0x37c8]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x37b8]
push eax
push 0xc
lea eax, [ebp - 0x37c4]
push eax
push 0x2d1400
push ebx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
je 0x40c960
lea eax, [ebp - 0xcc0]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37ac]
call fcn.0040c605
lea eax, [ebp - 0x8d8]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37a8]
call fcn.0040c605
lea eax, [ebp - 0x10a8]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37a4]
call fcn.0040c605
lea eax, [ebp - 0x4f0]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37a0]
call fcn.0040c605
cmp byte [edi], 0
jne 0x40c903
movsx ax, byte [ebp - 0x4f0]
movzx eax, ax
push eax
call fcn.0057e67a
pop ecx
test eax, eax
jne 0x40c8cc
movsx ax, byte [ebp - 0x4dd]
movzx eax, ax
push eax
call fcn.0057e67a
pop ecx
test eax, eax
je 0x40c903
lea eax, [ebp - 0x4f0]
push eax
push 0x400
push edi
call fcn.0057e3be
lea eax, [ebp - 0x8d8]
push eax
lea eax, [edi + 0x400]
push 0x400
push eax
call fcn.0057e3be
add esp, 0x18
mov dword [ebp - 0x37cc], 1
push 0x2710
lea eax, [ebp - 0x37b8]
push 0
push eax
call fcn.005423a0
add esp, 0xc
lea eax, [ebp - 0x37c8]
xor ecx, ecx
push ecx
push eax
push 0x2710
lea eax, [ebp - 0x37b8]
push eax
push ecx
push ecx
push 0x700a0
push ebx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
jne 0x40c988
add edi, 0x800
mov eax, edi
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x40c949
lea eax, [ebp - 0x108]
push eax
push str._s_ReadPhysicalDriveInNTWithZeroRights_ERROR_DeviceIoControl____IOCTL_DISK_GET_DRIVE_GEOMETRY_EX__returned_0
jmp 0x40c97f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
add edi, 0x800
mov ecx, eax
mov eax, edi
mov byte [eax], 0
inc eax
sub esi, 1
jne 0x40c970
push ecx
push str.DeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
push edi
call fcn.0040d084
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x37cc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0052ef51
leave
ret