Function at 0x40c1fb
Capabilities:
Get storage device properties

Disassembly:
push ebp
lea ebp, [esp - 0x2c60]
mov eax, 0x2ce0
call fcn.0043dfe0
mov eax, dword [0x580e04]
xor eax, ebp
mov dword [ebp + 0x2c5c], eax
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], ebx
mov esi, 0x2710
push dword [ebp - 0x78]
lea eax, [ebp + 0x285c]
push str..PhysicalDrive_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea eax, [ebp + 0x285c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x7c], eax
je 0x40c4aa
push 0xc
lea eax, [ebp + 0x140]
push ebx
push eax
mov dword [ebp - 0x80], ebx
call fcn.0043c2f0
push esi
lea eax, [ebp + 0x14c]
push ebx
push eax
mov dword [ebp + 0x140], ebx
mov dword [ebp + 0x144], ebx
call fcn.0043c2f0
add esp, 0x18
push ebx
lea eax, [ebp - 0x80]
push eax
push esi
lea eax, [ebp + 0x14c]
push eax
push 0xc
lea eax, [ebp + 0x140]
push eax
push 0x2d1400
push dword [ebp - 0x7c]
call edi
test eax, eax
je 0x40c48e
push 0x7f
lea eax, [ebp + 0x2a5d]
push ebx
push eax
mov byte [ebp + 0x2a5c], bl
call fcn.0043c2f0
push 0x7f
lea eax, [ebp + 0x2b5d]
push ebx
push eax
mov byte [ebp + 0x2b5c], bl
call fcn.0043c2f0
push 0x7f
lea eax, [ebp + 0x2bdd]
push ebx
push eax
mov byte [ebp + 0x2bdc], bl
call fcn.0043c2f0
push 0x7f
lea eax, [ebp + 0x2add]
push ebx
push eax
mov byte [ebp + 0x2adc], bl
call fcn.0043c2f0
mov ecx, dword [ebp - 0x74]
add esp, 0x30
lea eax, [ebp + 0x2bdc]
push eax
push ebx
push dword [ebp + 0x158]
lea eax, [ebp + 0x14c]
push eax
call fcn.0040b743
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0x2b5c]
push eax
push ebx
push dword [ebp + 0x15c]
lea eax, [ebp + 0x14c]
push eax
call fcn.0040b743
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0x2adc]
push eax
push ebx
push dword [ebp + 0x160]
lea eax, [ebp + 0x14c]
push eax
call fcn.0040b743
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0x2a5c]
push eax
push 1
push dword [ebp + 0x164]
lea eax, [ebp + 0x14c]
push eax
call fcn.0040b743
lea ecx, [ebp - 0x70]
call fcn.0040b6f0
lea eax, [ebp + 0x2bdc]
push eax
call fcn.0043bf20
test eax, eax
pop ecx
jbe 0x40c3b7
lea eax, [ebp + 0x2bdc]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0043c490
pop ecx
pop ecx
lea eax, [ebp + 0x2b5c]
push eax
call fcn.0043bf20
test eax, eax
pop ecx
jbe 0x40c3da
lea eax, [ebp + 0x2b5c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0043c4a0
pop ecx
pop ecx
lea eax, [ebp + 0x2adc]
push eax
lea eax, [ebp + 0xb8]
push eax
call fcn.0043c490
lea eax, [ebp + 0x2a5c]
push eax
lea eax, [ebp + 0x38]
push eax
call fcn.0043c490
mov ecx, dword [ebp - 0x74]
add esp, 0x10
lea eax, [ebp + 0x38]
push eax
call fcn.0040b8c5
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x48]
push eax
call fcn.0040b8c5
mov ecx, dword [ebp - 0x74]
lea eax, [ebp + 0xb8]
push eax
call fcn.0040b8c5
push esi
lea eax, [ebp + 0x14c]
push ebx
push eax
call fcn.0043c2f0
add esp, 0xc
push ebx
lea eax, [ebp - 0x80]
push eax
push esi
lea eax, [ebp + 0x14c]
push eax
push ebx
push ebx
push 0x700a0
push dword [ebp - 0x7c]
call edi
test eax, eax
je 0x40c4aa
cmp dword [ebp + 0x154], 0xc
mov eax, dword [ebp + 0x164]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x168]
mov dword [ebp - 0x6c], eax
mov dword [ebp + 0x138], 2
je 0x40c480
mov dword [ebp + 0x138], ebx
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
push eax
call fcn.0040c0da
jmp 0x40c4a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.00441bf3
pop ecx
pop ecx
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0x78]
cmp dword [ebp - 0x78], 0x10
jl 0x40c230
mov ecx, dword [ebp + 0x2c5c]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0043bcca
add ebp, 0x2c60
leave
ret