Function at 0x40bf60
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x2c10
call fcn.0041a770
mov eax, dword [0x422b2c]
push ebx
mov dl, byte [0x422b0a]
push ebp
mov ebp, ecx
and eax, 0x35a9ffff
mov ecx, dword [0x422b28]
push esi
and ecx, 0x4719ffff
mov dword [0x422b1c], eax
mov al, byte [0x422afd]
mov dword [0x422b34], ecx
mov cl, byte [0x422afa]
xor ebx, ebx
xor esi, esi
dec dl
and al, cl
push edi
movsx cx, al
mov word [0x422b10], cx
mov cl, byte [0x422b00]
mov byte [0x422afb], dl
mov dword [esp + 0x14], ebx
mov al, byte [0x422b08]
mov edx, dword [esp + 0x14]
imul cl
mov byte [0x422afc], al
push edx
lea eax, [esp + 0x2c]
push str..PhysicalDrive_d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x28]
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
cmp word [0x422b06], bx
mov dword [esp + 0x10], eax
mov ax, word [0x422b0c]
setne cl
xor edx, edx
cmp ax, bx
setne dl
mov dword [0x422b30], edx
mov edx, dword [0x422b24]
cmp edx, ebx
mov byte [0x422b00], cl
je 0x40c03e
cmp word [0x422b0a], bx
je 0x40c03e
mov edi, 1
jmp 0x40c040
xor edi, edi
mov edx, dword [esp + 0x10]
mov dword [0x422b1c], edi
cmp edx, 0xffffffff
je 0x40c3a9
mov dl, cl
mov dword [esp + 0x24], ebx
dec dl
mov byte [0x422afd], dl
xor edx, edx
mov dword [esp + 0x18], edx
cmp ax, bx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ebx
je 0x40c087
cmp edi, ebx
je 0x40c087
mov eax, 1
jmp 0x40c089
xor eax, eax
mov dword [0x422b28], eax
sub al, cl
mov byte [0x422af9], al
mov ecx, 0x9c4
movsx eax, word [0x422b0e]
sub eax, 0x5a85ffff
lea edi, [esp + 0x510]
mov dword [0x422b20], eax
xor eax, eax
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x24]
push ebx
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x518]
push 0x2710
push edx
lea eax, [esp + 0x28]
push 0xc
push eax
push 0x2d1400
push ecx
mov byte [0x422afe], 1
call dword [sym.imp.KERNEL32.DLL_DeviceIoControl]
test eax, eax
je 0x40c355
mov ecx, dword [0x422b28]
mov word [0x422b08], 0xffff
mov eax, ecx
mov word [0x422b0a], cx
shl eax, 5
sub eax, ecx
mov byte [0x422af9], 0xff
lea eax, [eax + eax*4]
shl eax, 2
sub eax, ecx
neg eax
lea edx, [eax + eax*4]
mov al, byte [0x422b2c]
imul byte [0x422afd]
mov byte [0x422afe], al
mov eax, dword [esp + 0x528]
shl edx, 0x12
sub edx, ecx
lea ecx, [esp + eax + 0x510]
push ecx
mov ecx, ebp
mov dword [0x422b18], edx
call fcn.0040bcf0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x128]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
movsx edx, byte [0x422aff]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
movsx eax, byte [0x422afa]
sub eax, edx
mov edx, dword [0x422b20]
and ecx, 3
imul edx, edx, 0x525dffff
rep movsb byte es:[edi], byte [esi]
mov cl, byte [0x422b10]
mov dword [0x422b18], eax
mov byte [0x422afb], cl
mov ecx, dword [esp + 0x524]
mov eax, dword [esp + 0x520]
mov byte [0x422af8], 1
lea esi, [esp + ecx + 0x510]
or cl, 0xff
mov byte [0x422afe], 0xff
mov dword [0x422b20], edx
mov byte [0x422afa], cl
mov dl, byte [ebp]
cmp dl, bl
lea eax, [esp + eax + 0x510]
jne 0x40c208
cmp byte [eax], bl
je 0x40c208
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
push 0x400
push eax
push ebp
call edi
mov byte [ebp + 0x3ff], bl
mov cl, byte [0x422afa]
add esp, 0xc
jmp 0x40c20e
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
mov eax, dword [0x422b1c]
mov word [0x422b06], 0xfffe
lea edx, [eax + eax*4]
shl edx, 4
sub edx, eax
shl edx, 3
sub edx, eax
neg edx
shl edx, 0x15
sub edx, eax
mov dword [0x422b28], edx
cmp byte [ebp + 0x400], bl
lea edx, [ebp + 0x400]
jne 0x40c2c9
cmp byte [esi], bl
je 0x40c2c9
push 0x400
push esi
push edx
call edi
movsx ecx, byte [0x422af8]
add esp, 0xc
xor eax, eax
cmp word [0x422b06], bx
mov word [0x422b0e], 1
setne al
imul ecx, ecx, 0xf1e1ffff
mov word [0x422b08], ax
mov dword [0x422b2c], ecx
mov byte [ebp + 0x7ff], bl
mov cx, word [0x422b18]
movsx dx, byte [0x422b00]
movsx eax, byte [0x422af8]
imul dx, word [0x422b06]
imul eax, eax, 0xbe57ffff
mov word [0x422b0c], cx
mov cl, byte [0x422afa]
mov word [0x422b04], dx
mov dword [0x422b1c], eax
mov edx, dword [0x422b2c]
mov word [0x422b02], bx
add edx, 0x4fafffff
mov dword [0x422b28], edx
mov dl, byte [0x422af9]
sub cl, dl
mov byte [0x422afc], cl
mov dl, byte [ebp + 0x800]
lea ecx, [ebp + 0x800]
cmp dl, bl
jne 0x40c34e
cmp byte [esp + 0x128], bl
je 0x40c34e
mov al, byte [0x422b0e]
mov dl, byte [0x422b12]
and al, dl
lea edx, [esp + 0x128]
push 0x400
push edx
push ecx
mov word [0x422b08], 0xffff
mov byte [0x422afa], al
call edi
mov al, byte [0x422b02]
add esp, 0xc
dec al
mov byte [0x422afd], al
mov byte [ebp + 0xbff], bl
mov eax, dword [0x422b1c]
mov esi, 1
jmp 0x40c389
mov cl, byte [0x422af8]
mov al, byte [0x422afb]
and cl, al
mov eax, dword [0x422b1c]
movsx dx, cl
mov byte [0x422b00], 1
mov word [0x422b0e], 1
mov byte [0x422afe], 0xfe
mov word [0x422b10], dx
sub eax, dword [0x422b18]
mov dword [0x422b2c], eax
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp esi, ebx
jne 0x40c3bb
mov cl, byte [0x422b00]
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x10
mov dword [esp + 0x14], eax
jl 0x40bfc5
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c10
ret