Function at 0x413560
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2cec
call fcn.004b3620
mov eax, dword [0x4f9008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor ebx, ebx
mov dword [ebp - 0x2ce4], ecx
nop dword [eax + eax]
push ebx
lea eax, [ebp - 0x408]
push str..PhysicalDrive_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x408]
push 0
push 0
push 3
push 0
push 3
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x2ce0], esi
cmp esi, 0xffffffff
je 0x4138e2
push 0x2710
xorps xmm0, xmm0
mov dword [ebp - 0x2cdc], 0
lea eax, [ebp - 0x2b18]
movq qword [ebp - 0x2b24], xmm0
push 0
push eax
mov dword [ebp - 0x2b1c], 0
mov dword [ebp - 0x2b24], 0
mov dword [ebp - 0x2b20], 0
call fcn.004773d0
add esp, 0xc
lea eax, [ebp - 0x2cdc]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2b18]
push eax
push 0xc
lea eax, [ebp - 0x2b24]
push eax
push 0x2d1400
push esi
call edi
test eax, eax
je 0x4138c7
push 0x80
lea eax, [ebp - 0x208]
push 0
push eax
call fcn.004773d0
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x80
push 0
push eax
call fcn.004773d0
add esp, 0xc
lea eax, [ebp - 0x88]
push 0x80
push 0
push eax
call fcn.004773d0
add esp, 0xc
lea eax, [ebp - 0x188]
push 0x80
push 0
push eax
call fcn.004773d0
mov eax, dword [ebp - 0x2b0c]
add esp, 0xc
mov byte [ebp - 0x88], 0
test eax, eax
jle 0x4136c5
lea ecx, [ebp - 0x88]
push ecx
push 0
push eax
lea ecx, [ebp - 0x2b18]
call fcn.00413400
mov eax, dword [ebp - 0x2b08]
mov byte [ebp - 0x108], 0
test eax, eax
jle 0x4136eb
lea ecx, [ebp - 0x108]
push ecx
push 0
push eax
lea ecx, [ebp - 0x2b18]
call fcn.00413400
mov eax, dword [ebp - 0x2b04]
mov byte [ebp - 0x188], 0
test eax, eax
jle 0x413711
lea ecx, [ebp - 0x188]
push ecx
push 0
push eax
lea ecx, [ebp - 0x2b18]
call fcn.00413400
mov eax, dword [ebp - 0x2b00]
mov byte [ebp - 0x208], 0
test eax, eax
jle 0x413737
lea ecx, [ebp - 0x208]
push ecx
push 1
push eax
lea ecx, [ebp - 0x2b18]
call fcn.00413400
push 0x1a0
lea eax, [ebp - 0x2cd0]
mov dword [ebp - 0x2b30], 0
xorps xmm0, xmm0
push 0
push eax
movlpd qword [ebp - 0x2cd8], xmm0
call fcn.004773d0
lea ecx, [ebp - 0x88]
add esp, 0xc
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413770
sub ecx, edx
je 0x413795
xor ecx, ecx
nop dword [eax]
mov al, byte [ebp + ecx - 0x88]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2cb1], al
test al, al
jne 0x413780
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4137a0
sub ecx, edx
je 0x4137e5
lea edx, [ebp - 0x108]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4137b3
lea edi, [ebp - 0x2cb0]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4137c3
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x2ce0]
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor ecx, ecx
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x188]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x2bb1], al
test al, al
jne 0x4137f0
xor eax, eax
nop word [eax + eax]
mov cl, byte [ebp + eax - 0x208]
lea eax, [eax + 1]
mov byte [ebp + eax - 0x2c31], cl
test cl, cl
jne 0x413810
lea eax, [ebp - 0x2c30]
push eax
call fcn.00413900
lea eax, [ebp - 0x2cb0]
push eax
call fcn.00413900
lea eax, [ebp - 0x2bb0]
push eax
call fcn.00413900
push 0x2710
lea eax, [ebp - 0x2b18]
push 0
push eax
call fcn.004773d0
add esp, 0xc
lea eax, [ebp - 0x2cdc]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2b18]
push eax
push 0
push 0
push 0x700a0
push esi
call edi
test eax, eax
je 0x4138e2
mov eax, dword [ebp - 0x2b00]
mov ecx, 2
mov dword [ebp - 0x2cd8], eax
mov eax, dword [ebp - 0x2afc]
mov dword [ebp - 0x2cd4], eax
xor eax, eax
cmp dword [ebp - 0x2b10], 0xc
cmove eax, ecx
mov ecx, dword [ebp - 0x2ce4]
mov dword [ebp - 0x2b30], eax
lea eax, [ebp - 0x2cd8]
push eax
call fcn.00413d80
jmp 0x4138db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._nDeviceIOControl_IOCTL_STORAGE_QUERY_PROPERTY_error___d_n
call fcn.004132e0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebx
cmp ebx, 0x10
jl 0x413590
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00475880
mov esp, ebp
pop ebp
ret