Function at 0x515980
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56ec21
mov eax, dword fs:[0]
push eax
sub esp, 0x950
mov eax, dword [0x5be26c]
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 eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x944], eax
mov dword [ebp - 0x948], edi
nop
xor ebx, ebx
mov dword [ebp - 0x950], ebx
mov dword [ebp - 0x94c], ebx
push edi
push str..PhysicalDrive_d
lea eax, [ebp - 0x6fc]
mov dword [ebp - 4], ebx
push 0x200
push eax
call fcn.00510f30
add esp, 0x10
lea eax, [ebp - 0x6fc]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x515a1e
call fcn.00433790
xor esi, esi
test eax, eax
je 0x515a26
mov dword [ebp - 4], 0xffffffff
jmp 0x515e09
mov ebx, esi
mov dword [ebp - 0x950], ebx
push 0x3e8
lea eax, [ebp - 0x4fc]
push 0
push eax
call fcn.00516260
add esp, 0xc
mov dword [ebp - 0x700], 0
lea eax, [ebp - 0x95c]
mov dword [ebp - 0x95c], 0
xorps xmm0, xmm0
movq qword [ebp - 0x708], xmm0
push 0
push eax
push 0x3e8
lea eax, [ebp - 0x4fc]
mov dword [ebp - 0x708], 0
push eax
push 0xc
lea eax, [ebp - 0x708]
mov dword [ebp - 0x704], 0
push eax
push 0x2d1400
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x515ded
test esi, esi
je 0x515ab4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov dword [ebp - 0x950], ebx
cmp byte [ebp - 0x4f2], 0
jne 0x515ded
mov eax, dword [ebp - 0x4e0]
cmp eax, 1
je 0x515ded
cmp eax, 0xa
je 0x515ded
cmp eax, 4
je 0x515ded
cmp eax, 7
je 0x515ded
cmp eax, 0xe
je 0x515ded
cmp eax, 0xf
je 0x515ded
lea ecx, [ebp - 0x958]
call fcn.00515140
lea ecx, [ebp - 0x954]
call fcn.00515140
lea eax, [ebp - 0x954]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x958]
push eax
push edi
call fcn.005153a0
mov esi, dword [ebp - 0x958]
add esp, 0xc
test eax, eax
je 0x515b42
cmp dword [esi - 0xc], 0
jne 0x515e37
mov edx, dword [ebp - 0x954]
or edi, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x515b66
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x515b81
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x4f8]
mov edi, dword [ebp - 0x4e4]
cmp edi, eax
jae 0x515d11
mov esi, dword [ebp - 0x4f0]
cmp esi, eax
jae 0x515d11
cmp dword [ebp - 0x4ec], eax
jae 0x515d11
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00516260
add esp, 0xc
test edi, edi
je 0x515d03
mov esi, dword [0x5c8854]
mov edi, 1
mov dword [ebp - 0x824], 0x11c
test esi, esi
jne 0x515c35
push esi
push edi
push 0x5c8754
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x515c08
call fcn.00513a40
mov dword [0x5c8754], 2
jmp 0x515c2d
cmp dword [0x5c8754], 2
je 0x515c22
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x5c8754], 2
jne 0x515c11
call fcn.00513a40
mov ebx, dword [ebp - 0x950]
mov esi, eax
mov dword [0x5c8854], esi
cmp dword [esi + 4], 0xffffffff
push 0x11c
je 0x515c45
lea eax, [esi + 8]
jmp 0x515c7d
lea eax, [ebp - 0x940]
push 0
push eax
call fcn.00516260
add esp, 0xc
mov dword [ebp - 0x940], 0x11c
lea eax, [ebp - 0x940]
mov ecx, esi
push eax
call fcn.005129c0
test eax, eax
je 0x515ca3
push 0x11c
lea eax, [ebp - 0x940]
push eax
lea eax, [ebp - 0x824]
push eax
call fcn.00516c90
add esp, 0xc
cmp dword [ebp - 0x820], 6
ja 0x515ca1
jne 0x515ca3
cmp dword [ebp - 0x81c], 2
jb 0x515ca3
xor edi, edi
lea esi, [ebp - 0x4fc]
mov edx, 0x104
add esi, dword [ebp - 0x4e4]
lea ecx, [ebp - 0x114]
mov eax, ecx
sub esi, eax
nop
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x515cd9
mov al, byte [ecx + esi]
test al, al
je 0x515cd9
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x515cc0
test edx, edx
lea eax, [ecx - 1]
push edi
mov edi, dword [ebp - 0x944]
cmovne eax, ecx
push edi
mov byte [eax], 0
lea eax, [ebp - 0x114]
push eax
call fcn.00515f40
mov esi, dword [ebp - 0x4f0]
add esp, 0xc
jmp 0x515d09
mov edi, dword [ebp - 0x944]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x515d2e
lea ecx, [ebp - 0x950]
mov dword [ebp - 4], 0xffffffff
call fcn.00480110
mov edi, dword [ebp - 0x948]
jmp 0x515e09
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00516260
add esp, 0xc
test esi, esi
je 0x515d62
lea eax, [ebp - 0x4fc]
add eax, esi
push eax
push 0x104
lea eax, [ebp - 0x114]
push eax
call fcn.00510d90
cmp byte [ebp - 0x114], 0
mov esi, dword [sym.imp.SHLWAPI.dll_StrTrimA]
je 0x515d7f
push 0x58fa94
lea eax, [ebp - 0x114]
push eax
call esi
mov eax, dword [ebp - 0x4ec]
test eax, eax
je 0x515da3
lea ecx, [ebp - 0x4fc]
add eax, ecx
push eax
push 0x104
lea eax, [ebp - 0x114]
push eax
call fcn.00510d90
cmp byte [ebp - 0x114], 0
je 0x515ddb
push 0x58fa94
lea eax, [ebp - 0x114]
push eax
call esi
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x515dc3
sub ecx, edx
lea eax, [ebp - 0x114]
push ecx
push eax
mov ecx, edi
call fcn.00511d10
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
jne 0x515f1f
mov edi, dword [ebp - 0x948]
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x515e09
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x950], 0
inc edi
mov dword [ebp - 0x948], edi
cmp edi, 0x10
jl 0x5159c0
xor eax, eax
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.0046c16d
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x944]
lea edi, [esi - 0x10]
mov ebx, dword [ebx]
sub ebx, 0x10
cmp edi, ebx
je 0x515ed6
cmp dword [ebx + 0xc], 0
jl 0x515ec7
mov ecx, dword [edi]
cmp ecx, dword [ebx]
jne 0x515ec7
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [edi + 0xc], 0
mov ecx, eax
lea eax, [edi + 0xc]
jl 0x515e74
cmp ecx, dword [edi]
jne 0x515e74
mov esi, edi
lock inc dword [eax]
jmp 0x515ea3
mov eax, dword [ecx]
push 1
push dword [edi + 4]
call dword [eax]
mov esi, eax
test esi, esi
je 0x515f34
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
lea eax, [edi + 0x10]
mov ecx, dword [edi + 4]
inc ecx
push ecx
push eax
push ecx
lea eax, [esi + 0x10]
push eax
call fcn.00515280
add esp, 0x10
or eax, 0xffffffff
lea ecx, [ebx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x515eba
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x944]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x515edc
push dword [esi - 0xc]
mov ecx, dword [ebp - 0x944]
push esi
call fcn.0041f430
mov ecx, dword [ebp - 0x944]
mov esi, dword [ebp - 0x954]
push dword [esi - 0xc]
push esi
call fcn.00511d10
or ebx, 0xffffffff
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x515f09
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x515f1f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x950]
call fcn.00480110
mov eax, 1
jmp 0x515e1b
call fcn.0041f850
int3