Function at 0x40a9c0
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x37cc
call fcn.00532ab0
mov eax, dword [0x5c84bc]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
mov edi, ecx
mov dword [ebp - 0x37cc], 0
push str..PhysicalDrive_d
lea eax, [ebp - 0x108]
push 0x100
push eax
lea esi, [edi + 0x800]
call fcn.00404bd0
add esp, 0x10
lea eax, [ebp - 0x108]
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40aa6d
mov ecx, 0x100
mov eax, esi
nop
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40aa30
lea eax, [ebp - 0x108]
push eax
push 0x143
push str._d_ReadPhysicalDriveInNTWithZeroRights_ERROR_CreateFileA__s__returned_INVALID_HANDLE_VALUE
push 0x100
push esi
call fcn.00404bd0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00531ff3
mov esp, ebp
pop ebp
ret
push 0x2710
lea eax, [ebp - 0x37b8]
mov dword [ebp - 0x37c8], 0
push 0
push eax
mov dword [ebp - 0x37bc], 0
mov dword [ebp - 0x37c4], 0
mov dword [ebp - 0x37c0], 0
call fcn.005346b0
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 0x40ac19
lea eax, [ebp - 0xcc0]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37ac]
call fcn.0040a850
lea eax, [ebp - 0x8d8]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37a8]
call fcn.0040a850
lea eax, [ebp - 0x10a8]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37a4]
call fcn.0040a850
lea eax, [ebp - 0x4f0]
push eax
lea eax, [ebp - 0x37b8]
push eax
push ecx
push dword [ebp - 0x37a0]
call fcn.0040a850
cmp byte [edi], 0
jne 0x40abb4
movsx ax, byte [ebp - 0x4f0]
movzx eax, ax
push eax
call fcn.005425c8
add esp, 4
test eax, eax
jne 0x40ab7a
movsx ax, byte [ebp - 0x4dd]
movzx eax, ax
push eax
call fcn.005425c8
add esp, 4
test eax, eax
je 0x40abb4
lea eax, [ebp - 0x4f0]
push eax
push 0x400
push edi
call fcn.00542534
add esp, 0xc
lea eax, [ebp - 0x8d8]
push eax
lea eax, [edi + 0x400]
push 0x400
push eax
call fcn.00542534
add esp, 0xc
mov dword [ebp - 0x37cc], 1
push 0x2710
lea eax, [ebp - 0x37b8]
push 0
push eax
call fcn.005346b0
add esp, 0xc
lea eax, [ebp - 0x37c8]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x37b8]
push eax
push 0
push 0
push 0x700a0
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40ac40
mov ecx, 0x100
mov eax, esi
nop word [eax + eax]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x40ac00
lea eax, [ebp - 0x108]
push eax
push str._s_ReadPhysicalDriveInNTWithZeroRights_ERROR_DeviceIoControl____IOCTL_DISK_GET_DRIVE_GEOMETRY_EX__returned_0
jmp 0x40ac37
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x100
mov ecx, esi
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub edx, 1
jne 0x40ac26
push eax
push str.DeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
push esi
call fcn.0040b580
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.00531ff3
mov esp, ebp
pop ebp
ret