+ if (binaryForm == null)
+ throw new ArgumentNullException("binaryForm");
+
+ if (offset < 0 || offset > binaryForm.Length - 0x14)
+ throw new ArgumentOutOfRangeException("offset", offset, "Offset out of range");
+
+ if (binaryForm[offset] != 1)
+ throw new ArgumentException("Unrecognized Security Descriptor revision.", "binaryForm");
+
+ resourcemgr_control = binaryForm[offset + 0x01];
+ control_flags = (ControlFlags)ReadUShort(binaryForm, offset + 0x02);
+
+ int ownerPos = ReadInt(binaryForm, offset + 0x04);
+ int groupPos = ReadInt(binaryForm, offset + 0x08);
+ int saclPos = ReadInt(binaryForm, offset + 0x0C);
+ int daclPos = ReadInt(binaryForm, offset + 0x10);
+
+ if (ownerPos != 0)
+ owner_sid = new SecurityIdentifier(binaryForm, ownerPos);
+
+ if (groupPos != 0)
+ group_sid = new SecurityIdentifier(binaryForm, groupPos);
+
+ if (saclPos != 0)
+ system_acl = new RawAcl(binaryForm, saclPos);
+
+ if (daclPos != 0)
+ discretionary_acl = new RawAcl(binaryForm, daclPos);