Function at 0x40a338
Capabilities:
Get storage device properties

Disassembly:
push 0x48
mov eax, 0x4a986e
call fcn.00490b7a
mov eax, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x30], eax
cmp esi, ebx
jne 0x40a359
xor al, al
jmp 0x40a506
mov edi, esi
mov byte [ebp - 0x25], bl
call fcn.00409807
push dword [ebp - 0x30]
push esi
call fcn.00404b7d
mov eax, dword [esi]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], eax
cmp eax, 0xffffffff
je 0x40a352
xor eax, eax
mov dword [ebp - 0x54], ebx
lea edi, [ebp - 0x50]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
push eax
push 0x18
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push 0x70000
push dword [ebp - 0x34]
mov dword [ebp - 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, ebx
je 0x40a4fa
mov eax, dword [ebp - 0x4c]
mov dword [esi + 0x14], eax
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, 0xa000
push edi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 4], ebx
call fcn.00487d50
or dword [ebp - 4], 0xffffffff
pop ecx
push edi
push ebx
push eax
mov dword [ebp - 0x2c], eax
call fcn.0048e0e0
add esp, 0xc
push ebx
lea eax, [ebp - 0x30]
push eax
push 0x9fff
push dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
push 0xc
push eax
push 0x2d1400
push dword [ebp - 0x34]
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40a4a6
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x9fff], bl
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x10]
mov dword [ebp - 0x38], ecx
cmp eax, ebx
je 0x40a442
cmp eax, edi
jae 0x40a442
add eax, ecx
push eax
lea eax, [esi + 8]
push eax
call fcn.00405af9
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x18]
cmp eax, ebx
je 0x40a45f
cmp eax, edi
jae 0x40a45f
mov ecx, dword [ebp - 0x2c]
add eax, ecx
push eax
lea eax, [esi + 4]
push eax
call fcn.00405af9
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0xc]
cmp eax, ebx
je 0x40a47c
cmp eax, edi
jae 0x40a47c
mov ecx, dword [ebp - 0x2c]
add eax, ecx
push eax
lea eax, [esi + 0xc]
push eax
call fcn.00405af9
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x14]
cmp eax, ebx
je 0x40a499
cmp eax, edi
jae 0x40a499
mov ecx, dword [ebp - 0x2c]
add eax, ecx
push eax
lea eax, [esi + 0x10]
push eax
call fcn.00405af9
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x1c]
mov dword [esi + 0x18], eax
mov byte [ebp - 0x25], 1
push edi
push ebx
push dword [ebp - 0x2c]
call fcn.0048e0e0
add esp, 0xc
push ebx
lea eax, [ebp - 0x30]
push eax
push 0x9fff
push dword [ebp - 0x2c]
mov dword [ebp - 0x30], ebx
push ebx
push ebx
push 0x2d0c10
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40a4f1
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x9fff], bl
lea eax, [ebp - 0x1c]
push eax
add esi, 4
push esi
call fcn.00405af9
mov byte [ebp - 0x25], 1
push dword [ebp - 0x2c]
call fcn.00489298
pop ecx
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x25]
call fcn.00490bd6
ret 4