RtlAreBitsSetEx
BOOL __fastcall RtlAreBitsSetEx(_RTL_BITMAP_EX *BitMapHeader, UINT64 StartingIndex, UINT64 Length){
unsigned __int64 *Buffer;
char v6;
unsigned __int64 *v7;
unsigned __int64 v8;
unsigned __int64 *v9;
if( StartingIndex >= BitMapHeader->SizeOfBitMap )
return 0;
if( Length <= 1 )
{
if( Length == 1 )
return _bittest64((const signed __int64 *)BitMapHeader->Buffer, StartingIndex);
return 0;
}
if( BitMapHeader->SizeOfBitMap - StartingIndex < Length )
return 0;
Buffer = BitMapHeader->Buffer;
v6 = StartingIndex + Length - 1;
v7 = &Buffer[StartingIndex >> 6];
v8 = *v7;
v9 = &Buffer[(StartingIndex + Length - 1) >> 6];
if( v7 == v9 )
return((0xFFFFFFFFFFFFFFFFui64 >> (64 - (unsigned __int8)Length) << StartingIndex) & v8) == 0xFFFFFFFFFFFFFFFFui64 >> (64 - (unsigned __int8)Length) << StartingIndex;
if( ((-1i64 << StartingIndex) & v8) != -1i64 << StartingIndex )
return 0;
while( ++v7 != v9 )
{
if( *v7 != -1i64 )
return 0;
}
return((0xFFFFFFFFFFFFFFFFui64 >> ~v6) & *v7) == 0xFFFFFFFFFFFFFFFFui64 >> ~v6;
}Referenced by:
MiCheckHotPatchApplicable