Function at 0x504410
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x568dec
mov eax, dword fs:[0]
push eax
sub esp, 0xdb4
mov eax, dword [0x5b03a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0xd98], eax
mov dword [ebp - 0xdb4], ecx
nop
xor edi, edi
mov dword [ebp - 0xd94], edi
mov dword [ebp - 0xdb0], edi
mov dword [ebp - 0xdac], edi
push ecx
push str..PhysicalDrive_d
lea eax, [ebp - 0x910]
mov dword [ebp - 4], edi
push 0x200
push eax
call fcn.00504200
add esp, 0x10
lea eax, [ebp - 0x910]
push edi
push edi
push 3
push edi
push 3
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5044b4
call fcn.004e3700
xor esi, esi
test eax, eax
je 0x5044c2
mov dword [ebp - 4], 0xffffffff
jmp 0x504a72
mov edi, esi
mov dword [ebp - 0xd94], edi
mov dword [ebp - 0xdb0], edi
push 0x3e8
lea eax, [ebp - 0x4fc]
push 0
push eax
call fcn.00527d20
add esp, 0xc
mov dword [ebp - 0xb14], 0
lea eax, [ebp - 0xdb8]
mov dword [ebp - 0xb1c], 0
mov dword [ebp - 0xb18], 0
mov dword [ebp - 0xdb8], 0
push 0
push eax
push 0x3e8
lea eax, [ebp - 0x4fc]
push eax
push 0xc
lea eax, [ebp - 0xb1c]
push eax
push 0x2d1400
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x504a50
test esi, esi
je 0x50454f
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
xor eax, eax
mov dword [ebp - 0xd94], eax
mov dword [ebp - 0xdb0], eax
jmp 0x504555
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 0x4f2], 0
jne 0x504a50
mov eax, dword [ebp - 0x4e0]
cmp eax, 1
je 0x504a50
cmp eax, 0xa
je 0x504a50
cmp eax, 4
je 0x504a50
cmp eax, 7
je 0x504a50
cmp eax, 0xe
je 0x504a50
cmp eax, 0xf
je 0x504a50
lea ecx, [ebp - 0xda0]
call fcn.0041bdd0
lea ecx, [ebp - 0xd9c]
call fcn.0041bdd0
mov eax, dword [ebp - 0xdb4]
movzx eax, al
push eax
push str..PhysicalDrive_d
lea eax, [ebp - 0xb10]
push 0x200
push eax
call fcn.00504200
add esp, 0x10
mov dword [ebp - 0xda8], 0
mov dword [ebp - 0xda4], 0
push 0
push 0
push 0x80
push 3
push 3
push 0xc0000000
lea eax, [ebp - 0xb10]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0xda8]
call fcn.00504370
test eax, eax
je 0x504637
mov eax, dword [ebp - 0xda8]
test eax, eax
je 0x504797
push eax
call edi
mov dword [ebp - 0xda8], 0
jmp 0x504797
mov esi, dword [ebp - 0xda8]
lea eax, [ebp - 0xdbc]
push 0
push eax
push 0x18
lea eax, [ebp - 0xb58]
mov dword [ebp - 0xdbc], 0
push eax
push 0
push 0
xorps xmm0, xmm0
push 0x74080
push esi
movups xmmword [ebp - 0xb58], xmm0
movq qword [ebp - 0xb48], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x504699
test esi, esi
je 0x504797
push esi
call edi
mov dword [ebp - 0xda8], 0
jmp 0x504797
push 0x211
lea eax, [ebp - 0x710]
push 0
push eax
call fcn.00527d20
add esp, 0xc
mov byte [ebp - 0xb20], 0
lea eax, [ebp - 0xdbc]
xorps xmm0, xmm0
movups xmmword [ebp - 0xb40], xmm0
mov byte [ebp - 0xb36], 0xec
push 0
push eax
push 0x211
lea eax, [ebp - 0x710]
push eax
push 0x20
lea eax, [ebp - 0xb40]
push eax
push 0x7c088
push esi
movups xmmword [ebp - 0xb30], xmm0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x50467f
lea eax, [ebp - 0x6ec]
push 0x14
push eax
call fcn.005042f0
add esp, 8
lea ecx, [ebp - 0xda0]
call fcn.00429460
push 0x14
lea eax, [ebp - 0x6ec]
push eax
lea ecx, [ebp - 0xda0]
call fcn.004ff680
lea ecx, [ebp - 0xda0]
call fcn.00504ba0
lea eax, [ebp - 0x6ca]
push 0x28
push eax
call fcn.005042f0
add esp, 8
lea ecx, [ebp - 0xd9c]
call fcn.00429460
push 0x28
lea eax, [ebp - 0x6ca]
push eax
lea ecx, [ebp - 0xd9c]
call fcn.004ff680
lea ecx, [ebp - 0xd9c]
call fcn.00504ba0
mov byte [ebp - 4], 2
test esi, esi
je 0x504787
push esi
call edi
mov dword [ebp - 0xda8], 0
mov eax, dword [ebp - 0xda0]
cmp dword [eax - 0xc], 0
jne 0x504aa5
lea ecx, [ebp - 0xd9c]
call fcn.0041bd70
lea ecx, [ebp - 0xda0]
mov byte [ebp - 4], 0
call fcn.0041bd70
mov eax, dword [ebp - 0x4f8]
mov edi, dword [ebp - 0x4e4]
cmp edi, eax
jae 0x504970
mov esi, dword [ebp - 0x4f0]
cmp esi, eax
jae 0x504970
cmp dword [ebp - 0x4ec], eax
jae 0x504970
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00527d20
add esp, 0xc
test edi, edi
je 0x50495c
mov esi, dword [0x5bd40c]
mov dword [ebp - 0xc74], 0x11c
mov dword [ebp - 0xdc0], 1
test esi, esi
jne 0x50487d
mov ecx, 1
xor eax, eax
mov edx, 0x5bd308
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x50484e
call fcn.00501380
mov edi, dword [ebp - 0xd94]
mov esi, eax
mov dword [0x5bd308], 2
mov dword [0x5bd40c], esi
jmp 0x504883
cmp dword [0x5bd308], 2
je 0x504868
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x5bd308], 2
jne 0x504857
call fcn.00501380
mov edi, dword [ebp - 0xdb0]
mov esi, eax
mov dword [0x5bd40c], esi
jmp 0x504883
mov edi, dword [ebp - 0xd94]
cmp dword [esi + 4], 0xffffffff
je 0x50488e
lea eax, [esi + 8]
jmp 0x5048c6
push 0x118
lea eax, [ebp - 0xd8c]
push 0
push eax
call fcn.00527d20
add esp, 0xc
mov dword [ebp - 0xd90], 0x11c
lea eax, [ebp - 0xd90]
mov ecx, esi
push eax
call fcn.00500420
test eax, eax
je 0x5048f9
lea eax, [ebp - 0xd90]
push 0x11c
push eax
lea eax, [ebp - 0xc74]
push eax
call fcn.00527ef0
add esp, 0xc
cmp dword [ebp - 0xc70], 6
ja 0x5048ef
jne 0x5048f9
cmp dword [ebp - 0xc6c], 2
jb 0x5048f9
mov dword [ebp - 0xdc0], 0
lea esi, [ebp - 0x4fc]
mov edx, 0x104
add esi, dword [ebp - 0x4e4]
lea ecx, [ebp - 0x114]
mov eax, ecx
sub esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x50492d
mov al, byte [ecx + esi]
test al, al
je 0x50492d
mov byte [ecx], al
inc ecx
sub edx, 1
jne 0x504914
push dword [ebp - 0xdc0]
lea eax, [ecx - 1]
test edx, edx
cmovne eax, ecx
mov ecx, dword [ebp - 0xd98]
push ecx
mov byte [eax], 0
lea eax, [ebp - 0x114]
push eax
call fcn.00504d80
mov esi, dword [ebp - 0x4f0]
add esp, 0xc
jmp 0x504962
mov edi, dword [ebp - 0xd94]
mov eax, dword [ebp - 0xd98]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x504987
lea ecx, [ebp - 0xdb0]
mov dword [ebp - 4], 0xffffffff
call fcn.004e36e0
jmp 0x504a72
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00527d20
add esp, 0xc
test esi, esi
je 0x5049bb
lea eax, [ebp - 0x4fc]
add eax, esi
push eax
push 0x104
lea eax, [ebp - 0x114]
push eax
call fcn.004e7da0
cmp byte [ebp - 0x114], 0
mov esi, dword [sym.imp.SHLWAPI.dll_StrTrimA]
je 0x5049d8
push 0x56f14c
lea eax, [ebp - 0x114]
push eax
call esi
mov eax, dword [ebp - 0x4ec]
test eax, eax
je 0x5049fc
lea ecx, [ebp - 0x4fc]
add eax, ecx
push eax
push 0x104
lea eax, [ebp - 0x114]
push eax
call fcn.004e7da0
cmp byte [ebp - 0x114], 0
je 0x504a3c
push 0x56f14c
lea eax, [ebp - 0x114]
push eax
call esi
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x504a20
sub ecx, edx
lea eax, [ebp - 0x114]
push ecx
mov ecx, dword [ebp - 0xd98]
push eax
call fcn.004ff680
mov eax, dword [ebp - 0xd98]
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x504b7d
jmp 0x504a56
mov edi, dword [ebp - 0xd94]
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x504a72
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xdb0], 0
mov ecx, dword [ebp - 0xdb4]
inc ecx
mov dword [ebp - 0xdb4], ecx
cmp ecx, 0x10
jl 0x504450
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004deaec
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xd98]
lea esi, [eax - 0x10]
mov edi, dword [edx]
sub edi, 0x10
cmp esi, edi
je 0x504b52
cmp dword [edi + 0xc], 0
jl 0x504b47
mov ecx, dword [esi]
cmp ecx, dword [edi]
jne 0x504b47
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
cmp dword [esi + 0xc], 0
mov ecx, eax
lea eax, [esi + 0xc]
jl 0x504ae6
cmp ecx, dword [esi]
jne 0x504ae6
lock inc dword [eax]
jmp 0x504b23
mov eax, dword [ecx]
push 1
push dword [esi + 4]
mov eax, dword [eax]
call eax
mov edx, eax
mov dword [ebp - 0xdb8], edx
test edx, edx
je 0x504b92
mov eax, dword [esi + 4]
mov dword [edx + 4], eax
lea eax, [esi + 0x10]
mov ecx, dword [esi + 4]
inc ecx
push ecx
push eax
push ecx
lea eax, [edx + 0x10]
push eax
call fcn.00429440
mov esi, dword [ebp - 0xdb8]
add esp, 0x10
or eax, 0xffffffff
lea ecx, [edi + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x504b3a
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xd98]
lea eax, [esi + 0x10]
mov dword [ecx], eax
jmp 0x504b52
push dword [eax - 0xc]
mov ecx, edx
push eax
call fcn.004292b0
mov eax, dword [ebp - 0xd9c]
mov ecx, dword [ebp - 0xd98]
push dword [eax - 0xc]
push eax
call fcn.004ff680
lea ecx, [ebp - 0xd9c]
call fcn.0041bd70
lea ecx, [ebp - 0xda0]
call fcn.0041bd70
lea ecx, [ebp - 0xdb0]
call fcn.004e36e0
mov eax, 1
jmp 0x504a8a
call fcn.0041c1e0
int3