Function at 0x40d4a5
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x4ae4
call fcn.0041e6c0
push ebx
push ebp
push esi
mov ebp, ecx
push edi
lea ecx, [esp + 0x6c8]
mov esi, edx
call fcn.00405a58
lea ecx, [esp + 0x80]
call fcn.00405a58
lea ecx, [esp + 0x4b0]
call fcn.00405a58
lea ecx, [esp + 0x298]
call fcn.00405a58
push 6
pop ecx
xor ebx, ebx
xor eax, eax
push 7
lea edi, [esp + 0x6c]
mov dword [esp + 0x64], ebx
rep stosd dword es:[edi], eax
pop ecx
mov dword [esp + 0x18], ebx
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
push 0x20f
stosb byte es:[edi], al
lea eax, [esp + 0x8e5]
push ebx
push eax
mov byte [esp + 0x8ec], bl
call fcn.004127f0
add esp, 0xc
lea eax, [esp + 0xaf1]
push 0x3fff
push ebx
push eax
mov byte [esp + 0xafc], bl
call fcn.004127f0
mov eax, dword [esi + 4]
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esi + 8], ebx
test eax, eax
je 0x40d553
xor ecx, ecx
mov word [eax], cx
test ebp, ebp
je 0x40da26
movzx eax, word [ebp]
push eax
lea eax, [esp + 0x6cc]
push 0x445688
push eax
call fcn.00409413
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x6e4]
call ebp
mov edi, eax
cmp edi, 0xffffffff
je 0x40d5c4
push ebx
lea eax, [esp + 0x14]
push eax
push 0x20
lea eax, [esp + 0x6c]
push eax
push ebx
push ebx
push 0x560000
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push edi
test eax, eax
jne 0x40d5be
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40da26
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x68]
lea eax, [esp + 0x6cc]
push str..PHYSICALDRIVE_d
push eax
call fcn.00409413
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push 0xc0000000
push dword [esp + 0x6e4]
call ebp
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40d6ce
xor eax, eax
mov byte [esp + 0x48], bl
lea edi, [esp + 0x49]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
lea eax, [esp + 0x18]
push eax
push 0x18
lea eax, [esp + 0x54]
push eax
push ebx
push ebx
push 0x74080
push ebp
mov dword [esp + 0x34], ebx
call edi
test eax, eax
je 0x40d6c7
cmp byte [esp + 0x4b], bl
jbe 0x40d6c7
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x68]
mov byte [esp + 0x24], al
and al, 1
or al, 0xfa
shl al, 4
push ebx
mov byte [esp + 0x25], al
lea eax, [esp + 0x14]
push eax
push 0x210
lea eax, [esp + 0x8ec]
push eax
push 0x21
lea eax, [esp + 0x2c]
push eax
push 0x7c088
push ebp
mov dword [esp + 0x38], 0x200
mov byte [esp + 0x42], 0xec
mov dword [esp + 0x3d], 0x101
mov byte [esp + 0x3c], bl
call edi
test eax, eax
je 0x40d6c7
mov eax, dword [esp + 0x10]
cmp eax, 0x100
jb 0x40d6c7
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x8e4]
add edx, eax
lea ecx, [esp + 0x908]
call fcn.0040d293
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x6e4]
call ebp
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x40d77c
xor eax, eax
lea edi, [esp + 0x3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x4000
stosd dword es:[edi], eax
lea eax, [esp + 0xaf4]
push ebx
push eax
call fcn.004127f0
mov edi, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x10]
push ebx
push eax
push 0x4000
lea eax, [esp + 0xafc]
push eax
push 0xc
lea eax, [esp + 0x50]
push eax
push 0x2d1400
push edi
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40d775
mov eax, dword [esp + 0x10]
cmp eax, 0x28
jb 0x40d775
lea ecx, [esp + 0x4b0]
push ecx
lea ecx, [esp + 0xaf4]
add ecx, dword [esp + 0xb0c]
lea edx, [esp + 0xaf4]
add edx, eax
call fcn.0040d293
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x6e4]
call ebp
mov edi, eax
cmp edi, 0xffffffff
je 0x40d7fa
mov ebp, 0x4000
push ebp
lea eax, [esp + 0xaf4]
push ebx
push eax
call fcn.004127f0
add esp, 0xc
lea eax, [esp + 0x10]
push ebx
push eax
push ebp
lea eax, [esp + 0xafc]
push eax
push ebx
push ebx
push 0x2d0c10
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40d7f3
mov eax, dword [esp + 0x10]
cmp eax, 0x14
jb 0x40d7f3
lea ecx, [esp + 0x298]
push ecx
lea edx, [esp + 0xaf4]
add edx, eax
lea ecx, [esp + 0xb04]
call fcn.0040d293
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x80]
call fcn.0040967a
test al, al
je 0x40d82e
lea ecx, [esp + 0x4b0]
call fcn.0040967a
test al, al
je 0x40d82e
lea ecx, [esp + 0x298]
call fcn.0040967a
test al, al
jne 0x40da26
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d870
lea ecx, [esp + 0x80]
call fcn.0040967a
test al, al
jne 0x40d870
lea eax, [esp + 0x4b0]
push eax
lea ecx, [esp + 0x84]
call fcn.0040aac1
test eax, eax
jne 0x40d870
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d8b2
lea ecx, [esp + 0x4b0]
call fcn.0040967a
test al, al
jne 0x40d8b2
lea eax, [esp + 0x298]
push eax
lea ecx, [esp + 0x4b4]
call fcn.0040aac1
test eax, eax
jne 0x40d8b2
lea eax, [esp + 0x4b0]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d8f4
lea ecx, [esp + 0x298]
call fcn.0040967a
test al, al
jne 0x40d8f4
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x29c]
call fcn.0040aac1
test eax, eax
jne 0x40d8f4
lea eax, [esp + 0x298]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d92e
cmp dword [esp + 0x88], 3
jbe 0x40d92e
mov ecx, dword [esp + 0x84]
sub esp, 0xc
call fcn.0040d45f
add esp, 0xc
test al, al
je 0x40d92e
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d968
cmp dword [esp + 0x4b8], 3
jbe 0x40d968
mov ecx, dword [esp + 0x4b4]
sub esp, 0xc
call fcn.0040d45f
add esp, 0xc
test al, al
je 0x40d968
lea eax, [esp + 0x4b0]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d9a2
cmp dword [esp + 0x2a0], 3
jbe 0x40d9a2
mov ecx, dword [esp + 0x29c]
sub esp, 0xc
call fcn.0040d45f
add esp, 0xc
test al, al
je 0x40d9a2
lea eax, [esp + 0x298]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d9cc
lea ecx, [esp + 0x80]
call fcn.0040967a
test al, al
jne 0x40d9cc
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40d9f6
lea ecx, [esp + 0x4b0]
call fcn.0040967a
test al, al
jne 0x40d9f6
lea eax, [esp + 0x4b0]
push eax
mov ecx, esi
call fcn.00409c87
mov ecx, esi
call fcn.0040967a
test al, al
je 0x40da20
lea ecx, [esp + 0x298]
call fcn.0040967a
test al, al
jne 0x40da20
lea eax, [esp + 0x298]
push eax
mov ecx, esi
call fcn.00409c87
cmp dword [esi + 8], ebx
seta bl
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x4ae4
ret