RtlSetControlSecurityDescriptor

NTSTATUS __stdcall RtlSetControlSecurityDescriptor(
        PVOID *PortHandle,
        OBJECT_ATTRIBUTES *ObjectAttributes,
        UINT64 MaxConnectionInfoLength,
        UINT64 MaxMessageLength,
        UINT64 MaxPoolUsage){
  if( (~(unsigned __int16)ObjectAttributes & (unsigned __int16)MaxConnectionInfoLength) != 0
    || ((unsigned __int16)ObjectAttributes & 0xC03F) != 0 )
  {
    return -1073741811;
  }
  *((_WORD *)PortHandle + 1) = MaxConnectionInfoLength | *((_WORD *)PortHandle + 1) & ~(_WORD)ObjectAttributes;
  return 0;
}

Referenced by:

RtlpSysVolCreateSecurityDescriptor