Function at 0x40d47f
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x4ae4
call fcn.0041e670
push ebx
push ebp
push esi
mov ebp, ecx
push edi
lea ecx, [esp + 0x6c8]
mov esi, edx
call fcn.00405a51
lea ecx, [esp + 0x80]
call fcn.00405a51
lea ecx, [esp + 0x4b0]
call fcn.00405a51
lea ecx, [esp + 0x298]
call fcn.00405a51
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.004127c0
add esp, 0xc
lea eax, [esp + 0xaf1]
push 0x3fff
push ebx
push eax
mov byte [esp + 0xafc], bl
call fcn.004127c0
mov eax, dword [esi + 4]
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esi + 8], ebx
test eax, eax
je 0x40d52d
xor ecx, ecx
mov word [eax], cx
test ebp, ebp
je 0x40da00
movzx eax, word [ebp]
push eax
lea eax, [esp + 0x6cc]
push 0x441658
push eax
call fcn.0040940c
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 0x40d59e
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 0x40d598
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x40da00
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push dword [esp + 0x68]
lea eax, [esp + 0x6cc]
push str..PHYSICALDRIVE_d
push eax
call fcn.0040940c
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 0x40d6a8
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 0x40d6a1
cmp byte [esp + 0x4b], bl
jbe 0x40d6a1
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 0x40d6a1
mov eax, dword [esp + 0x10]
cmp eax, 0x100
jb 0x40d6a1
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x8e4]
add edx, eax
lea ecx, [esp + 0x908]
call fcn.0040d26d
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 0x40d756
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.004127c0
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 0x40d74f
mov eax, dword [esp + 0x10]
cmp eax, 0x28
jb 0x40d74f
lea ecx, [esp + 0x4b0]
push ecx
lea ecx, [esp + 0xaf4]
add ecx, dword [esp + 0xb0c]
lea edx, [esp + 0xaf4]
add edx, eax
call fcn.0040d26d
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 0x40d7d4
mov ebp, 0x4000
push ebp
lea eax, [esp + 0xaf4]
push ebx
push eax
call fcn.004127c0
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 0x40d7cd
mov eax, dword [esp + 0x10]
cmp eax, 0x14
jb 0x40d7cd
lea ecx, [esp + 0x298]
push ecx
lea edx, [esp + 0xaf4]
add edx, eax
lea ecx, [esp + 0xb04]
call fcn.0040d26d
pop ecx
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea ecx, [esp + 0x80]
call fcn.00409673
test al, al
je 0x40d808
lea ecx, [esp + 0x4b0]
call fcn.00409673
test al, al
je 0x40d808
lea ecx, [esp + 0x298]
call fcn.00409673
test al, al
jne 0x40da00
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d84a
lea ecx, [esp + 0x80]
call fcn.00409673
test al, al
jne 0x40d84a
lea eax, [esp + 0x4b0]
push eax
lea ecx, [esp + 0x84]
call fcn.0040aa9f
test eax, eax
jne 0x40d84a
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d88c
lea ecx, [esp + 0x4b0]
call fcn.00409673
test al, al
jne 0x40d88c
lea eax, [esp + 0x298]
push eax
lea ecx, [esp + 0x4b4]
call fcn.0040aa9f
test eax, eax
jne 0x40d88c
lea eax, [esp + 0x4b0]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d8ce
lea ecx, [esp + 0x298]
call fcn.00409673
test al, al
jne 0x40d8ce
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x29c]
call fcn.0040aa9f
test eax, eax
jne 0x40d8ce
lea eax, [esp + 0x298]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d908
cmp dword [esp + 0x88], 3
jbe 0x40d908
mov ecx, dword [esp + 0x84]
sub esp, 0xc
call fcn.0040d439
add esp, 0xc
test al, al
je 0x40d908
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d942
cmp dword [esp + 0x4b8], 3
jbe 0x40d942
mov ecx, dword [esp + 0x4b4]
sub esp, 0xc
call fcn.0040d439
add esp, 0xc
test al, al
je 0x40d942
lea eax, [esp + 0x4b0]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d97c
cmp dword [esp + 0x2a0], 3
jbe 0x40d97c
mov ecx, dword [esp + 0x29c]
sub esp, 0xc
call fcn.0040d439
add esp, 0xc
test al, al
je 0x40d97c
lea eax, [esp + 0x298]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d9a6
lea ecx, [esp + 0x80]
call fcn.00409673
test al, al
jne 0x40d9a6
lea eax, [esp + 0x80]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d9d0
lea ecx, [esp + 0x4b0]
call fcn.00409673
test al, al
jne 0x40d9d0
lea eax, [esp + 0x4b0]
push eax
mov ecx, esi
call fcn.00409c80
mov ecx, esi
call fcn.00409673
test al, al
je 0x40d9fa
lea ecx, [esp + 0x298]
call fcn.00409673
test al, al
jne 0x40d9fa
lea eax, [esp + 0x298]
push eax
mov ecx, esi
call fcn.00409c80
cmp dword [esi + 8], ebx
seta bl
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x4ae4
ret