Function at 0x40daf0
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x274c
call fcn.005786d0
mov eax, dword [0x616780]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x2720]
push 0x40
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x2748], edi
push eax
push dword [edi]
mov dword [ebp - 0x274c], 0
lea ebx, [edi + 0x40]
mov dword [edi + 0x1f0], 0
mov dword [ebp - 0xc], 0x12
mov word [ebp - 8], 0x40
call fcn.0040c030
add esp, 0x10
cmp eax, 1
jne 0x40dc9b
push 0x18
lea eax, [ebp - 0x2718]
push eax
push ebx
call fcn.005874b0
lea eax, [edi + 0x57]
add esp, 0xc
cmp byte [eax], 0x20
jne 0x40db7e
cmp eax, ebx
jb 0x40db7e
mov byte [eax], 0
dec eax
cmp byte [eax], 0x20
je 0x40db71
push 0x20
push ebx
call fcn.0057a5a0
add esp, 8
test eax, eax
je 0x40dbd5
sub eax, edi
sub eax, 0x40
cmp eax, 3
jle 0x40dbd5
mov ecx, ebx
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40dba0
sub ecx, edx
cmp ecx, 2
jbe 0x40dbd5
mov cl, byte [edi + 0x41]
lea edx, [edi + 0x41]
cmp cl, 0x20
je 0x40dbd5
nop dword [eax]
lea eax, [ecx - 0x41]
cmp al, 0x19
ja 0x40dbcc
add cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
cmp cl, 0x20
jne 0x40dbc0
push 4
lea eax, [ebp - 0x2700]
push eax
lea eax, [edi + 0x60]
push eax
call fcn.005874b0
movzx eax, byte [ebp - 0x271f]
shr eax, 7
mov dword [edi + 0x1f0], eax
lea eax, [ebp - 0x2720]
push 8
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x25
push eax
push dword [edi]
mov dword [ebp - 0xc], 0
mov word [ebp - 8], 0
call fcn.0040c030
add esp, 0x1c
cmp eax, 1
jne 0x40df0a
movzx eax, byte [ebp - 0x2720]
movzx ecx, byte [ebp - 0x271f]
shl eax, 8
add eax, ecx
movzx ecx, byte [ebp - 0x271e]
shl eax, 8
add eax, ecx
movzx ecx, byte [ebp - 0x271d]
shl eax, 8
add eax, ecx
movzx ecx, byte [ebp - 0x271b]
cdq
mov dword [edi + 0x84], eax
movzx eax, byte [ebp - 0x271c]
shl eax, 8
add eax, ecx
mov dword [edi + 0x88], edx
movzx ecx, byte [ebp - 0x271a]
shl eax, 8
add eax, ecx
movzx ecx, byte [ebp - 0x2719]
shl eax, 8
add eax, ecx
cdq
mov dword [edi + 0xac], eax
mov dword [edi + 0xb0], edx
push 0x2710
lea eax, [ebp - 0x2720]
mov dword [ebp - 0x2724], 0
push 0
push eax
mov dword [ebp - 0x272c], 0
mov dword [ebp - 0x2728], 0
call fcn.00579c10
add esp, 0xc
lea eax, [ebp - 0x274c]
push 0
push eax
push 0x2710
lea eax, [ebp - 0x2720]
push eax
push 0xc
lea eax, [ebp - 0x272c]
push eax
push 0x2d1400
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40df0a
mov eax, dword [ebp - 0x2714]
mov byte [ebx], 0
test eax, eax
je 0x40dd46
lea edx, [ebp - 0x2720]
add edx, eax
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x40dd20
sub edx, esi
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40dd30
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x2710]
test eax, eax
je 0x40dd86
lea edx, [ebp - 0x2720]
add edx, eax
mov esi, edx
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x40dd60
sub edx, esi
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40dd70
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x2748]
cmp byte [esi + 0x57], 0x20
lea eax, [esi + 0x57]
jne 0x40dda2
cmp eax, ebx
jb 0x40dda2
mov byte [eax], 0
dec eax
cmp byte [eax], 0x20
je 0x40dd95
push 0x20
push ebx
call fcn.0057a5a0
add esp, 8
test eax, eax
je 0x40ddf5
sub eax, esi
sub eax, 0x40
cmp eax, 3
jle 0x40ddf5
lea ecx, [ebx + 1]
nop
mov al, byte [ebx]
inc ebx
test al, al
jne 0x40ddc0
sub ebx, ecx
cmp ebx, 2
jbe 0x40ddf5
mov cl, byte [esi + 0x41]
lea edx, [esi + 0x41]
cmp cl, 0x20
je 0x40ddf5
nop dword [eax]
lea eax, [ecx - 0x41]
cmp al, 0x19
ja 0x40ddec
add cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
cmp cl, 0x20
jne 0x40dde0
mov eax, dword [ebp - 0x270c]
test eax, eax
je 0x40de1d
lea ecx, [ebp - 0x2720]
mov edx, esi
add ecx, eax
sub edx, ecx
nop dword [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx + 0x5f], al
test al, al
jne 0x40de10
cmp dword [ebp - 0x2704], 0x11
jne 0x40de30
mov dword [esi + 0x1f4], 3
push 0
lea eax, [ebp - 0x274c]
push eax
push 0x18
lea eax, [ebp - 0x2744]
push eax
push 0
push 0
push 0x70000
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40df0a
mov ecx, dword [ebp - 0x2738]
mov edx, dword [ebp - 0x2748]
mov eax, dword [ebp - 0x2734]
mov ebx, dword [ebp - 0x2744]
mov edi, dword [ebp - 0x2740]
push 0
push ecx
push 0
mov dword [esi + 0x9c], ecx
mov dword [esi + 0xa4], eax
mov dword [esi + 0x94], ebx
mov dword [esi + 0x98], edi
mov dword [esi + 0xa0], 0
mov dword [esi + 0xa8], 0
mov esi, dword [ebp - 0x2730]
push eax
mov dword [edx + 0xac], esi
mov dword [edx + 0xb0], 0
call fcn.005783c0
push edi
push ebx
push edx
push eax
call fcn.005783c0
mov ebx, dword [ebp - 0x2748]
push 0
push esi
push edx
push eax
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x88], edx
call fcn.005783c0
pop edi
mov dword [ebx + 0x8c], eax
mov al, 1
pop esi
mov dword [ebx + 0x90], edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057837f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057837f
mov esp, ebp
pop ebp
ret