Function at 0x40cbb0
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x561bfb
mov eax, dword fs:[0]
push eax
mov eax, 0x37f4
call fcn.004cf4b0
mov eax, dword [0x5d26e8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push str..PhysicalDrive_d
lea eax, [ebp - 0x110]
push 0x100
push eax
mov esi, ecx
mov dword [ebp - 0x37d4], ebx
call fcn.004ce693
add esp, 0x10
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x37dc], edi
cmp edi, 0xffffffff
jne 0x40cc63
add esi, 0x800
mov ecx, 0x100
mov eax, esi
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x40cc35
lea edx, [ebp - 0x110]
push edx
push 0x22f
push str._d_ReadPhysicalDriveInNTWithZeroRights_ERROR_CreateFileA__s__returned_INVALID_HANDLE_VALUE
push 0x100
push esi
call fcn.004ce693
add esp, 0x14
mov eax, ebx
jmp 0x40cf36
xor eax, eax
mov dword [ebp - 0x37cc], eax
mov dword [ebp - 0x37c8], eax
push 0x2710
mov dword [ebp - 0x37c4], eax
lea eax, [ebp - 0x33d8]
push ebx
push eax
mov dword [ebp - 0x37e0], ebx
mov dword [ebp - 0x37cc], ebx
mov dword [ebp - 0x37c8], ebx
call fcn.004cdca0
add esp, 0xc
push ebx
lea ecx, [ebp - 0x37e0]
push ecx
push 0x2710
lea edx, [ebp - 0x33d8]
push edx
push 0xc
lea eax, [ebp - 0x37cc]
push eax
push 0x2d1400
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40ceff
push 0x3e7
lea ecx, [ebp - 0x4f7]
push ebx
push ecx
mov byte [ebp - 0x4f8], bl
call fcn.004cdca0
mov edi, dword [ebp - 0x33c0]
add esp, 0xc
lea ecx, [ebp - 0x37f8]
call fcn.0041e840
mov dword [ebp - 4], ebx
lea edi, [ebp + edi - 0x33d8]
movsx edx, byte [edi]
push edx
call fcn.004ce9ba
add esp, 4
test eax, eax
jne 0x40cd82
mov edx, dword [ebp - 0x37ec]
cmp edx, ebx
jne 0x40cd23
xor ecx, ecx
jmp 0x40cd2b
mov ecx, dword [ebp - 0x37e4]
sub ecx, edx
mov eax, dword [ebp - 0x37e8]
mov ebx, eax
sub ebx, edx
cmp ebx, ecx
jae 0x40cd5a
mov cl, byte [edi]
xor ebx, ebx
mov byte [eax], cl
inc eax
mov byte [ebp - 0x37d5], bl
mov byte [ebp - 0x37d6], bl
mov byte [ebp - 0x37cd], bl
mov dword [ebp - 0x37e8], eax
jmp 0x40cd82
mov ebx, eax
cmp edx, eax
jbe 0x40cd65
call fcn.004cde77
mov eax, dword [ebp - 0x37f8]
push edi
push ebx
push eax
lea edx, [ebp - 0x3800]
push edx
lea ecx, [ebp - 0x37f8]
call fcn.0040ca60
xor ebx, ebx
mov al, byte [edi]
inc edi
test al, al
jne 0x40cd05
mov eax, dword [ebp - 0x33cc]
lea ecx, [ebp - 0xcc8]
push ecx
lea edx, [ebp - 0x33d8]
push edx
push ebx
push eax
mov ecx, esi
call fcn.0040b9a0
mov eax, dword [ebp - 0x33c8]
lea ecx, [ebp - 0x8e0]
push ecx
lea edx, [ebp - 0x33d8]
push edx
push ebx
push eax
mov ecx, esi
call fcn.0040b9a0
mov eax, dword [ebp - 0x33c4]
lea ecx, [ebp - 0x37c0]
push ecx
lea edx, [ebp - 0x33d8]
push edx
push ebx
push eax
mov ecx, esi
call fcn.0040b9a0
lea ecx, [ebp - 0x4f8]
push ecx
lea edx, [ebp - 0x33d8]
push edx
mov ecx, esi
call fcn.0040bc20
mov edx, dword [ebp - 0x33c0]
xor ecx, ecx
test al, al
sete cl
push ecx
push edx
mov ecx, esi
call fcn.0040b9a0
cmp byte [esi], bl
jne 0x40ce7a
movsx ax, byte [ebp - 0x4f8]
movzx ecx, ax
push ecx
call fcn.004cf48f
add esp, 4
test eax, eax
jne 0x40ce43
movsx dx, byte [ebp - 0x4e5]
movzx eax, dx
push eax
call fcn.004cf48f
add esp, 4
test eax, eax
je 0x40ce7a
lea ecx, [ebp - 0x4f8]
push ecx
push 0x400
push esi
call fcn.004cf19e
lea edx, [ebp - 0x8e0]
push edx
lea eax, [esi + 0x400]
push 0x400
push eax
call fcn.004cf19e
add esp, 0x18
mov dword [ebp - 0x37d4], 1
push 0x2710
lea ecx, [ebp - 0x33d8]
push ebx
push ecx
call fcn.004cdca0
mov ecx, dword [ebp - 0x37dc]
add esp, 0xc
push ebx
lea edx, [ebp - 0x37e0]
push edx
push 0x2710
lea eax, [ebp - 0x33d8]
push eax
push ebx
push ebx
push 0x700a0
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x40cee5
add esi, 0x800
mov ecx, 0x100
mov eax, esi
mov byte [eax], bl
inc eax
sub ecx, 1
jne 0x40cec8
lea edx, [ebp - 0x110]
push edx
push str._s_ReadPhysicalDriveInNTWithZeroRights_ERROR_DeviceIoControl____IOCTL_DISK_GET_DRIVE_GEOMETRY_EX__returned_0
push esi
call fcn.0040bc40
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x37f8]
call fcn.0040c3d0
mov edi, dword [ebp - 0x37dc]
jmp 0x40cf29
call dword [sym.imp.KERNEL32.dll_GetLastError]
add esi, 0x800
mov edx, 0x100
mov ecx, esi
mov byte [ecx], bl
inc ecx
sub edx, 1
jne 0x40cf12
push eax
push str.DeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
push esi
call fcn.0040bc40
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x37d4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004cdc91
mov esp, ebp
pop ebp
ret