Function at 0x51c710
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6ea8f8
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x82d084]
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
mov dword [ebp - 0x44], ecx
push 0
push 0
push 3
push 0
push 3
push 0
push str..PhysicalDrive0
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x51c7eb
push 0
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x30], 0
push eax
push 8
lea eax, [ebp - 0x40]
mov dword [ebp - 0x38], 0
push eax
push 0xc
lea eax, [ebp - 0x38]
mov dword [ebp - 0x34], 0
push eax
push 0x2d1400
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
push ebx
movlpd qword [ebp - 0x40], xmm0
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
je 0x51c7e4
mov esi, dword [ebp - 0x3c]
push esi
call fcn.0067beb9
push esi
mov edi, eax
push 0
push edi
call fcn.0068e800
add esp, 0x10
lea eax, [ebp - 0x2c]
push 0
push eax
push esi
push edi
push 0xc
lea eax, [ebp - 0x38]
push eax
push 0x2d1400
push ebx
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
jne 0x51c7f2
push edi
call fcn.0067bcc4
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor al, al
jmp 0x51c9a2
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov dword [ebp - 4], 0
test eax, eax
je 0x51c95e
cmp eax, dword [edi + 4]
jae 0x51c95e
lea edx, [eax + edi]
mov dword [ebp - 0x4c], 0
mov ecx, edx
mov dword [ebp - 0x48], 0xf
mov byte [ebp - 0x5c], 0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x51c840
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x5c]
call fcn.00430160
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x28]
call fcn.00444ab0
mov edx, dword [ebp - 0x48]
cmp edx, 0x10
jb 0x51c893
mov ecx, dword [ebp - 0x5c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x51c889
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51c9c3
push edx
push ecx
call fcn.0067bc93
add esp, 8
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov esi, dword [ebp - 0x18]
cmovae eax, dword [ebp - 0x28]
test esi, esi
je 0x51c8ba
lea ecx, [esi + eax]
mov edx, eax
cmp eax, ecx
jae 0x51c8ba
nop
cmp byte [edx], 0x20
jne 0x51c915
inc edx
cmp edx, ecx
jb 0x51c8b0
or edx, 0xffffffff
cmp esi, edx
lea ecx, [ebp - 0x28]
cmovb edx, esi
cmp dword [ebp - 0x14], 0x10
cmovae ecx, dword [ebp - 0x28]
sub esi, edx
mov dword [ebp - 0x18], esi
lea eax, [esi + 1]
push eax
lea eax, [ecx + edx]
push eax
push ecx
call fcn.0068e280
mov esi, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
add esp, 0xc
cmp dword [ebp - 0x14], 0x10
cmovae edx, dword [ebp - 0x28]
test esi, esi
je 0x51c919
or ecx, 0xffffffff
lea eax, [esi - 1]
cmp eax, ecx
cmovb ecx, eax
add ecx, edx
cmp byte [ecx], 0x20
jne 0x51c911
cmp ecx, edx
je 0x51c919
dec ecx
cmp byte [ecx], 0x20
je 0x51c907
sub ecx, edx
jmp 0x51c91c
sub edx, eax
jmp 0x51c8bd
or ecx, 0xffffffff
inc ecx
cmp esi, ecx
jb 0x51c9be
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x44]
cmovae eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], ecx
mov byte [eax + ecx], 0
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
cmovae ecx, dword [ebp - 0x28]
call fcn.0050b8a0
push edi
call fcn.0067bcc4
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov bl, 1
jmp 0x51c970
push edi
call fcn.0067bcc4
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor bl, bl
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x51c9a0
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x51c996
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51c9c3
push edx
push ecx
call fcn.0067bc93
add esp, 8
mov al, bl
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.0067ba01
mov esp, ebp
pop ebp
ret
call fcn.00437f90
call fcn.00691015
int3