SeFastTraverseCheck
UINT8 __stdcall SeFastTraverseCheck(PVOID SecurityDescriptor, ACCESS_STATE *AccessState, UINT64 TraverseAccess){
int v3;
__int16 v4;
__int64 v5;
char *v6;
unsigned int v7;
char *v8;
unsigned int v9;
v3 = TraverseAccess;
if( SecurityDescriptor )
{
v4 = *((_WORD *)SecurityDescriptor + 1);
if( (v4 & 4) != 0 )
{
if( v4 >= 0 )
{
v6 = (char *)*((_QWORD *)SecurityDescriptor + 4);
}
else
{
v5 = *((unsigned int *)SecurityDescriptor + 4);
if( !(_DWORD)v5 )
return 1;
v6 = (char *)SecurityDescriptor + v5;
}
if( v6 )
{
v7 = *((unsigned __int16 *)v6 + 2);
if( *((_WORD *)v6 + 2) )
{
if( (*((_DWORD *)AccessState + 3) & 0x810) == 0 )
{
v8 = v6 + 8;
v9 = 0;
if( v7 )
{
while( 1 )
{
if( (v8[1] & 8) == 0 )
{
if( *v8 )
{
if( *v8 == 1 && (v3 & *((_DWORD *)v8 + 1)) != 0 )
return 0;
}
else if( (v3 & *((_DWORD *)v8 + 1)) != 0 && RtlEqualSid(SeWorldSid, v8 + 8) )
{
return 1;
}
}
++v9;
v8 += *((unsigned __int16 *)v8 + 1);
if( v9 >= v7 )
return 0;
}
}
}
}
return 0;
}
}
return 1;
}
return 0;
}Referenced by:
IopParseDevice
ObpCheckTraverseAccess