RtlGetAppContainerSidType

NTSTATUS __stdcall RtlGetAppContainerSidType(VOID *AppContainerSid, _APPCONTAINER_SID_TYPE *AppContainerSidType){
  _BYTE *v4; 

  if( *((_BYTE *)AppContainerSid + 1) >= 2u
    && *(_BYTE *)AppContainerSid == 1
    && RtlCompareMemory((char *)AppContainerSid + 2, &RtlpAppPackageAuthority, 6) == (_SIZE_T *)6
    && *((_DWORD *)AppContainerSid + 2) == 2 )
  {
    LODWORD(v4) = RtlSubAuthorityCountSid((INT64)AppContainerSid);
    if( *v4 == 8 )
    {
      *AppContainerSidType = ParentAppContainerSidType;
      return 0;
    }
    if( *v4 == 12 )
    {
      *AppContainerSidType = ChildAppContainerSidType;
      return 0;
    }
    *AppContainerSidType = InvalidAppContainerSidType;
  }
  else
  {
    *AppContainerSidType = NotAppContainerSidType;
  }
  return -1073700352;
}

Referenced by:

NtCreateLowBoxToken
RtlGetAppContainerParent
RtlIsParentOfChildAppContainer
RtlpGetTokenNamedObjectPath
SepValidateReferencedCachedHandles