Function at 0x40dfd6
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x429608
mov eax, dword fs:[0]
push eax
mov eax, 0x2958
call fcn.00416fe0
mov eax, dword [0x442b40]
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 ebx, ebx
mov dword [ebp - 0x2958], edx
mov dword [ebp - 0x2960], eax
mov byte [ebp - 0x2949], bl
cmp cl, bl
jne 0x40e02a
call fcn.0040dbc2
mov cl, al
movsx eax, cl
push eax
lea eax, [ebp - 0x1d8]
push str.._c:
push eax
call fcn.00414dbd
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea eax, [ebp - 0x1d8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x295c], eax
cmp eax, 0xffffffff
je 0x40e2e1
xor eax, eax
lea edi, [ebp - 0x28f4]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, 0x2710
push edi
lea eax, [ebp - 0x28e8]
push ebx
push eax
mov dword [ebp - 0x2964], ebx
mov dword [ebp - 0x28f4], ebx
mov dword [ebp - 0x28f0], ebx
call fcn.004134a0
add esp, 0xc
push ebx
lea eax, [ebp - 0x2964]
push eax
push edi
lea eax, [ebp - 0x28e8]
push eax
push 0xc
lea eax, [ebp - 0x28f4]
push eax
push 0x2d1400
push dword [ebp - 0x295c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40e2d5
push 0x64
pop ecx
mov dword [ebp - 0x2954], ecx
cmp dword [ebp - 0x28d0], edi
jae 0x40e2d5
cmp dword [ebp - 0x28d8], edi
jae 0x40e2d5
mov eax, edi
sub eax, dword [ebp - 0x28d0]
mov dword [ebp - 0x2950], eax
cmp eax, ecx
lea eax, [ebp - 0x2950]
jl 0x40e10a
lea eax, [ebp - 0x2954]
mov esi, dword [eax]
sub edi, dword [ebp - 0x28d8]
dec esi
mov dword [ebp - 0x2950], edi
lea eax, [ebp - 0x2950]
cmp edi, ecx
jl 0x40e129
lea eax, [ebp - 0x2954]
mov edi, dword [eax]
dec edi
cmp esi, 1
jl 0x40e2d5
cmp edi, 1
jl 0x40e2d5
push ecx
lea eax, [ebp - 0x74]
push ebx
push eax
call fcn.004134a0
push 0x64
lea eax, [ebp - 0xd8]
push ebx
push eax
call fcn.004134a0
mov edx, dword [ebp - 0x28d0]
add esp, 0x18
push esi
lea edx, [ebp + edx - 0x28e8]
lea ecx, [ebp - 0x74]
call fcn.0040da76
mov eax, dword [ebp - 0x28d8]
lea eax, [ebp + eax - 0x28e8]
push edi
push eax
lea eax, [ebp - 0xd8]
push eax
call fcn.00417510
add esp, 0xc
cmp byte [ebp - 0x74], bl
jle 0x40e1a3
movsx eax, byte [ebp - 0x74]
push eax
call fcn.00414c53
pop ecx
test eax, eax
jne 0x40e1bf
cmp byte [ebp - 0x61], bl
jle 0x40e2d5
movsx eax, byte [ebp - 0x61]
push eax
call fcn.00414c53
pop ecx
test eax, eax
je 0x40e2d5
push 0xf
pop esi
lea eax, [ebp - 0x74]
mov dword [ebp - 0x2918], esi
mov dword [ebp - 0x291c], ebx
mov byte [ebp - 0x292c], bl
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40e1da
sub eax, edi
push eax
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x292c]
call fcn.00401be0
mov dword [ebp - 4], ebx
lea edx, [ebp - 0x292c]
lea ecx, [ebp - 0x2948]
call fcn.0040ded4
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x2958]
push eax
call fcn.004021f0
mov byte [ebp - 4], bl
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp - 0x2948]
call fcn.00401250
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x292c]
call fcn.00401250
lea eax, [ebp - 0xd8]
mov dword [ebp - 0x28fc], esi
mov dword [ebp - 0x2900], ebx
mov byte [ebp - 0x2910], bl
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40e256
sub eax, esi
push eax
lea eax, [ebp - 0xd8]
push eax
lea ecx, [ebp - 0x2910]
call fcn.00401be0
mov dword [ebp - 4], 2
lea edx, [ebp - 0x2910]
lea ecx, [ebp - 0x2948]
call fcn.0040ded4
mov byte [ebp - 4], 3
mov esi, dword [ebp - 0x2960]
push eax
mov ecx, esi
call fcn.004021f0
mov byte [ebp - 4], 2
push ebx
push edi
lea ecx, [ebp - 0x2948]
call fcn.00401250
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp - 0x2910]
call fcn.00401250
mov eax, dword [ebp - 0x2958]
cmp dword [eax + 0x10], ebx
jne 0x40e2ce
cmp dword [esi + 0x10], ebx
je 0x40e2d5
mov byte [ebp - 0x2949], 1
push dword [ebp - 0x295c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0x2949]
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.004138fe
leave
ret 4