### ms-lsat.idl
"""
RPC definitions for the following interfaces:
- lsarpc (v0.0): 12345778-1234-ABCD-EF00-0123456789AB
This file is auto-generated by midl-to-scapy, do not modify.
"""

from enum import IntEnum
import uuid

from scapy.fields import StrFixedLenField
from scapy.layers.dcerpc import (
    NDRPacket,
    DceRpcOp,
    NDRByteField,
    NDRConfFieldListField,
    NDRConfPacketListField,
    NDRConfStrLenField,
    NDRConfVarStrLenField,
    NDRConfVarStrLenFieldUtf16,
    NDRConfVarStrNullField,
    NDRConfVarStrNullFieldUtf16,
    NDRContextHandle,
    NDRFullPointerField,
    NDRInt3264EnumField,
    NDRIntField,
    NDRPacketField,
    NDRShortField,
    NDRSignedIntField,
    register_dcerpc_interface,
)


class LsarClose_Request(NDRPacket):
    fields_desc = [NDRPacketField("ObjectHandle", NDRContextHandle(), NDRContextHandle)]


class LsarClose_Response(NDRPacket):
    fields_desc = [
        NDRPacketField("ObjectHandle", NDRContextHandle(), NDRContextHandle),
        NDRIntField("status", 0),
    ]


class PSTRING(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRShortField("Length", None, size_of="Buffer"),
        NDRShortField("MaximumLength", None, size_of="Buffer"),
        NDRFullPointerField(
            NDRConfVarStrLenField(
                "Buffer",
                "",
                size_is=lambda pkt: pkt.MaximumLength,
                length_is=lambda pkt: pkt.Length,
            ),
            deferred=True,
        ),
    ]


class RPC_SID_IDENTIFIER_AUTHORITY(NDRPacket):
    fields_desc = [StrFixedLenField("Value", "", length=6)]


class PRPC_SID(NDRPacket):
    ALIGNMENT = (4, 8)
    DEPORTED_CONFORMANTS = ["SubAuthority"]
    fields_desc = [
        NDRByteField("Revision", 0),
        NDRByteField("SubAuthorityCount", None, size_of="SubAuthority"),
        NDRPacketField(
            "IdentifierAuthority",
            RPC_SID_IDENTIFIER_AUTHORITY(),
            RPC_SID_IDENTIFIER_AUTHORITY,
        ),
        NDRConfFieldListField(
            "SubAuthority",
            [],
            NDRIntField("", 0),
            size_is=lambda pkt: pkt.SubAuthorityCount,
            conformant_in_struct=True,
        ),
    ]


class PLSAPR_ACL(NDRPacket):
    ALIGNMENT = (2, 2)
    DEPORTED_CONFORMANTS = ["Dummy1"]
    fields_desc = [
        NDRByteField("AclRevision", 0),
        NDRByteField("Sbz1", 0),
        NDRShortField("AclSize", None, size_of="Dummy1", adjust=lambda _, x: (x + 4)),
        NDRConfStrLenField(
            "Dummy1",
            "",
            size_is=lambda pkt: (pkt.AclSize - 4),
            conformant_in_struct=True,
        ),
    ]


class PLSAPR_SECURITY_DESCRIPTOR(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRByteField("Revision", 0),
        NDRByteField("Sbz1", 0),
        NDRShortField("Control", 0),
        NDRFullPointerField(
            NDRPacketField("Owner", PRPC_SID(), PRPC_SID), deferred=True
        ),
        NDRFullPointerField(
            NDRPacketField("Group", PRPC_SID(), PRPC_SID), deferred=True
        ),
        NDRFullPointerField(
            NDRPacketField("Sacl", PLSAPR_ACL(), PLSAPR_ACL), deferred=True
        ),
        NDRFullPointerField(
            NDRPacketField("Dacl", PLSAPR_ACL(), PLSAPR_ACL), deferred=True
        ),
    ]


class SECURITY_IMPERSONATION_LEVEL(IntEnum):
    SecurityAnonymous = 0
    SecurityIdentification = 1
    SecurityImpersonation = 2
    SecurityDelegation = 3


class PSECURITY_QUALITY_OF_SERVICE(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [
        NDRIntField("Length", 0),
        NDRInt3264EnumField("ImpersonationLevel", 0, SECURITY_IMPERSONATION_LEVEL),
        NDRByteField("ContextTrackingMode", 0),
        NDRByteField("EffectiveOnly", 0),
    ]


class PLSAPR_OBJECT_ATTRIBUTES(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Length", 0),
        NDRFullPointerField(NDRByteField("RootDirectory", 0), deferred=True),
        NDRFullPointerField(
            NDRPacketField("ObjectName", PSTRING(), PSTRING), deferred=True
        ),
        NDRIntField("Attributes", 0),
        NDRFullPointerField(
            NDRPacketField(
                "SecurityDescriptor",
                PLSAPR_SECURITY_DESCRIPTOR(),
                PLSAPR_SECURITY_DESCRIPTOR,
            ),
            deferred=True,
        ),
        NDRFullPointerField(
            NDRPacketField(
                "SecurityQualityOfService",
                PSECURITY_QUALITY_OF_SERVICE(),
                PSECURITY_QUALITY_OF_SERVICE,
            ),
            deferred=True,
        ),
    ]


class LsarOpenPolicy_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRShortField("SystemName", 0)),
        NDRPacketField(
            "ObjectAttributes", PLSAPR_OBJECT_ATTRIBUTES(), PLSAPR_OBJECT_ATTRIBUTES
        ),
        NDRIntField("DesiredAccess", 0),
    ]


class LsarOpenPolicy_Response(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRIntField("status", 0),
    ]


class PRPC_UNICODE_STRING(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRShortField("Length", None, size_of="Buffer", adjust=lambda _, x: (x * 2)),
        NDRShortField(
            "MaximumLength", None, size_of="Buffer", adjust=lambda _, x: (x * 2)
        ),
        NDRFullPointerField(
            NDRConfVarStrLenFieldUtf16(
                "Buffer",
                "",
                size_is=lambda pkt: (pkt.MaximumLength // 2),
                length_is=lambda pkt: (pkt.Length // 2),
            ),
            deferred=True,
        ),
    ]


class SID_NAME_USE(IntEnum):
    SidTypeUser = 1
    SidTypeGroup = 2
    SidTypeDomain = 3
    SidTypeAlias = 4
    SidTypeWellKnownGroup = 5
    SidTypeDeletedAccount = 6
    SidTypeInvalid = 7
    SidTypeUnknown = 8
    SidTypeComputer = 9
    SidTypeLabel = 10


class PLSA_TRANSLATED_SID(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [
        NDRInt3264EnumField("Use", 0, SID_NAME_USE),
        NDRIntField("RelativeId", 0),
        NDRSignedIntField("DomainIndex", 0),
    ]


class PLSAPR_TRANSLATED_SIDS(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="Sids"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "Sids",
                [PLSA_TRANSLATED_SID()],
                PLSA_TRANSLATED_SID,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
    ]


class LSAP_LOOKUP_LEVEL(IntEnum):
    LsapLookupWksta = 1
    LsapLookupPDC = 2
    LsapLookupTDL = 3
    LsapLookupGC = 4
    LsapLookupXForestReferral = 5
    LsapLookupXForestResolve = 6
    LsapLookupRODCReferralToFullDC = 7


class RPC_UNICODE_STRING(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRShortField("Length", None, size_of="Buffer", adjust=lambda _, x: (x * 2)),
        NDRShortField(
            "MaximumLength", None, size_of="Buffer", adjust=lambda _, x: (x * 2)
        ),
        NDRFullPointerField(
            NDRConfVarStrLenFieldUtf16(
                "Buffer",
                "",
                size_is=lambda pkt: (pkt.MaximumLength // 2),
                length_is=lambda pkt: (pkt.Length // 2),
            ),
            deferred=True,
        ),
    ]


class PLSAPR_TRUST_INFORMATION(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRPacketField("Name", RPC_UNICODE_STRING(), RPC_UNICODE_STRING),
        NDRFullPointerField(NDRPacketField("Sid", PRPC_SID(), PRPC_SID), deferred=True),
    ]


class PLSAPR_REFERENCED_DOMAIN_LIST(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="Domains"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "Domains",
                [PLSAPR_TRUST_INFORMATION()],
                PLSAPR_TRUST_INFORMATION,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
        NDRIntField("MaxEntries", 0),
    ]


class LsarLookupNames_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRIntField("Count", None, size_of="Names"),
        NDRConfPacketListField(
            "Names",
            [PRPC_UNICODE_STRING()],
            PRPC_UNICODE_STRING,
            size_is=lambda pkt: pkt.Count,
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS(), PLSAPR_TRANSLATED_SIDS
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
    ]


class LsarLookupNames_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS(), PLSAPR_TRANSLATED_SIDS
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


class PLSAPR_SID_INFORMATION(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRFullPointerField(NDRPacketField("Sid", PRPC_SID(), PRPC_SID), deferred=True)
    ]


class PLSAPR_SID_ENUM_BUFFER(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="SidInfo"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "SidInfo",
                [PLSAPR_SID_INFORMATION()],
                PLSAPR_SID_INFORMATION,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
    ]


class PLSAPR_TRANSLATED_NAME(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRInt3264EnumField("Use", 0, SID_NAME_USE),
        NDRPacketField("Name", RPC_UNICODE_STRING(), RPC_UNICODE_STRING),
        NDRSignedIntField("DomainIndex", 0),
    ]


class PLSAPR_TRANSLATED_NAMES(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="Names"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "Names",
                [PLSAPR_TRANSLATED_NAME()],
                PLSAPR_TRANSLATED_NAME,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
    ]


class LsarLookupSids_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRPacketField(
            "SidEnumBuffer", PLSAPR_SID_ENUM_BUFFER(), PLSAPR_SID_ENUM_BUFFER
        ),
        NDRPacketField(
            "TranslatedNames", PLSAPR_TRANSLATED_NAMES(), PLSAPR_TRANSLATED_NAMES
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
    ]


class LsarLookupSids_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedNames", PLSAPR_TRANSLATED_NAMES(), PLSAPR_TRANSLATED_NAMES
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


class LsarOpenPolicy2_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRConfVarStrNullFieldUtf16("SystemName", "")),
        NDRPacketField(
            "ObjectAttributes", PLSAPR_OBJECT_ATTRIBUTES(), PLSAPR_OBJECT_ATTRIBUTES
        ),
        NDRIntField("DesiredAccess", 0),
    ]


class LsarOpenPolicy2_Response(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRIntField("status", 0),
    ]


class LsarGetUserName_Request(NDRPacket):
    fields_desc = [
        NDRFullPointerField(NDRConfVarStrNullFieldUtf16("SystemName", "")),
        NDRFullPointerField(
            NDRPacketField("UserName", PRPC_UNICODE_STRING(), PRPC_UNICODE_STRING)
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("DomainName", PRPC_UNICODE_STRING(), PRPC_UNICODE_STRING)
            )
        ),
    ]


class LsarGetUserName_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField("UserName", PRPC_UNICODE_STRING(), PRPC_UNICODE_STRING)
        ),
        NDRFullPointerField(
            NDRFullPointerField(
                NDRPacketField("DomainName", PRPC_UNICODE_STRING(), PRPC_UNICODE_STRING)
            )
        ),
        NDRIntField("status", 0),
    ]


class PLSAPR_TRANSLATED_NAME_EX(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRInt3264EnumField("Use", 0, SID_NAME_USE),
        NDRPacketField("Name", RPC_UNICODE_STRING(), RPC_UNICODE_STRING),
        NDRSignedIntField("DomainIndex", 0),
        NDRIntField("Flags", 0),
    ]


class PLSAPR_TRANSLATED_NAMES_EX(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="Names"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "Names",
                [PLSAPR_TRANSLATED_NAME_EX()],
                PLSAPR_TRANSLATED_NAME_EX,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
    ]


class LsarLookupSids2_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRPacketField(
            "SidEnumBuffer", PLSAPR_SID_ENUM_BUFFER(), PLSAPR_SID_ENUM_BUFFER
        ),
        NDRPacketField(
            "TranslatedNames", PLSAPR_TRANSLATED_NAMES_EX(), PLSAPR_TRANSLATED_NAMES_EX
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
        NDRIntField("LookupOptions", 0),
        NDRIntField("ClientRevision", 0),
    ]


class LsarLookupSids2_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedNames", PLSAPR_TRANSLATED_NAMES_EX(), PLSAPR_TRANSLATED_NAMES_EX
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


class PLSAPR_TRANSLATED_SID_EX(NDRPacket):
    ALIGNMENT = (4, 4)
    fields_desc = [
        NDRInt3264EnumField("Use", 0, SID_NAME_USE),
        NDRIntField("RelativeId", 0),
        NDRSignedIntField("DomainIndex", 0),
        NDRIntField("Flags", 0),
    ]


class PLSAPR_TRANSLATED_SIDS_EX(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="Sids"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "Sids",
                [PLSAPR_TRANSLATED_SID_EX()],
                PLSAPR_TRANSLATED_SID_EX,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
    ]


class LsarLookupNames2_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRIntField("Count", None, size_of="Names"),
        NDRConfPacketListField(
            "Names",
            [PRPC_UNICODE_STRING()],
            PRPC_UNICODE_STRING,
            size_is=lambda pkt: pkt.Count,
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS_EX(), PLSAPR_TRANSLATED_SIDS_EX
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
        NDRIntField("LookupOptions", 0),
        NDRIntField("ClientRevision", 0),
    ]


class LsarLookupNames2_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS_EX(), PLSAPR_TRANSLATED_SIDS_EX
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


class PLSAPR_TRANSLATED_SID_EX2(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRInt3264EnumField("Use", 0, SID_NAME_USE),
        NDRFullPointerField(NDRPacketField("Sid", PRPC_SID(), PRPC_SID), deferred=True),
        NDRSignedIntField("DomainIndex", 0),
        NDRIntField("Flags", 0),
    ]


class PLSAPR_TRANSLATED_SIDS_EX2(NDRPacket):
    ALIGNMENT = (4, 8)
    fields_desc = [
        NDRIntField("Entries", None, size_of="Sids"),
        NDRFullPointerField(
            NDRConfPacketListField(
                "Sids",
                [PLSAPR_TRANSLATED_SID_EX2()],
                PLSAPR_TRANSLATED_SID_EX2,
                size_is=lambda pkt: pkt.Entries,
            ),
            deferred=True,
        ),
    ]


class LsarLookupNames3_Request(NDRPacket):
    fields_desc = [
        NDRPacketField("PolicyHandle", NDRContextHandle(), NDRContextHandle),
        NDRIntField("Count", None, size_of="Names"),
        NDRConfPacketListField(
            "Names",
            [PRPC_UNICODE_STRING()],
            PRPC_UNICODE_STRING,
            size_is=lambda pkt: pkt.Count,
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS_EX2(), PLSAPR_TRANSLATED_SIDS_EX2
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
        NDRIntField("LookupOptions", 0),
        NDRIntField("ClientRevision", 0),
    ]


class LsarLookupNames3_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS_EX2(), PLSAPR_TRANSLATED_SIDS_EX2
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


class LsarLookupSids3_Request(NDRPacket):
    fields_desc = [
        NDRPacketField(
            "SidEnumBuffer", PLSAPR_SID_ENUM_BUFFER(), PLSAPR_SID_ENUM_BUFFER
        ),
        NDRPacketField(
            "TranslatedNames", PLSAPR_TRANSLATED_NAMES_EX(), PLSAPR_TRANSLATED_NAMES_EX
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
        NDRIntField("LookupOptions", 0),
        NDRIntField("ClientRevision", 0),
    ]


class LsarLookupSids3_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedNames", PLSAPR_TRANSLATED_NAMES_EX(), PLSAPR_TRANSLATED_NAMES_EX
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


class LsarLookupNames4_Request(NDRPacket):
    fields_desc = [
        NDRIntField("Count", None, size_of="Names"),
        NDRConfPacketListField(
            "Names",
            [PRPC_UNICODE_STRING()],
            PRPC_UNICODE_STRING,
            size_is=lambda pkt: pkt.Count,
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS_EX2(), PLSAPR_TRANSLATED_SIDS_EX2
        ),
        NDRInt3264EnumField("LookupLevel", 0, LSAP_LOOKUP_LEVEL),
        NDRIntField("MappedCount", 0),
        NDRIntField("LookupOptions", 0),
        NDRIntField("ClientRevision", 0),
    ]


class LsarLookupNames4_Response(NDRPacket):
    fields_desc = [
        NDRFullPointerField(
            NDRPacketField(
                "ReferencedDomains",
                PLSAPR_REFERENCED_DOMAIN_LIST(),
                PLSAPR_REFERENCED_DOMAIN_LIST,
            )
        ),
        NDRPacketField(
            "TranslatedSids", PLSAPR_TRANSLATED_SIDS_EX2(), PLSAPR_TRANSLATED_SIDS_EX2
        ),
        NDRIntField("MappedCount", 0),
        NDRIntField("status", 0),
    ]


LSARPC_OPNUMS = {
    0: DceRpcOp(LsarClose_Request, LsarClose_Response),
    # 1: Opnum1NotUsedOnWire,
    # 2: Lsar_LSA_DP_2,
    # 3: Lsar_LSA_DP_3,
    # 4: Lsar_LSA_DP_4,
    # 5: Opnum5NotUsedOnWire,
    6: DceRpcOp(LsarOpenPolicy_Request, LsarOpenPolicy_Response),
    # 7: Lsar_LSA_DP_7,
    # 8: Lsar_LSA_DP_8,
    # 9: Opnum9NotUsedOnWire,
    # 10: Lsar_LSA_DP_10,
    # 11: Lsar_LSA_DP_11,
    # 12: Lsar_LSA_DP_12,
    # 13: Lsar_LSA_DP_13,
    14: DceRpcOp(LsarLookupNames_Request, LsarLookupNames_Response),
    15: DceRpcOp(LsarLookupSids_Request, LsarLookupSids_Response),
    # 16: Lsar_LSA_DP_16,
    # 17: Lsar_LSA_DP_17,
    # 18: Lsar_LSA_DP_18,
    # 19: Lsar_LSA_DP_19,
    # 20: Lsar_LSA_DP_20,
    # 21: Opnum21NotUsedOnWire,
    # 22: Opnum22NotUsedOnWire,
    # 23: Lsar_LSA_DP_23,
    # 24: Lsar_LSA_DP_24,
    # 25: Lsar_LSA_DP_25,
    # 26: Lsar_LSA_DP_26,
    # 27: Lsar_LSA_DP_27,
    # 28: Lsar_LSA_DP_28,
    # 29: Lsar_LSA_DP_29,
    # 30: Lsar_LSA_DP_30,
    # 31: Lsar_LSA_DP_31,
    # 32: Lsar_LSA_DP_32,
    # 33: Lsar_LSA_DP_33,
    # 34: Lsar_LSA_DP_34,
    # 35: Lsar_LSA_DP_35,
    # 36: Lsar_LSA_DP_36,
    # 37: Lsar_LSA_DP_37,
    # 38: Lsar_LSA_DP_38,
    # 39: Lsar_LSA_DP_39,
    # 40: Lsar_LSA_DP_40,
    # 41: Lsar_LSA_DP_41,
    # 42: Lsar_LSA_DP_42,
    # 43: Lsar_LSA_DP_43,
    44: DceRpcOp(LsarOpenPolicy2_Request, LsarOpenPolicy2_Response),
    45: DceRpcOp(LsarGetUserName_Request, LsarGetUserName_Response),
    # 46: Lsar_LSA_DP_46,
    # 47: Lsar_LSA_DP_47,
    # 48: Lsar_LSA_DP_48,
    # 49: Lsar_LSA_DP_49,
    # 50: Lsar_LSA_DP_50,
    # 51: Lsar_LSA_DP_51,
    # 52: Opnum52NotUsedOnWire,
    # 53: Lsar_LSA_DP_53,
    # 54: Lsar_LSA_DP_54,
    # 55: Lsar_LSA_DP_55,
    # 56: Opnum56NotUsedOnWire,
    57: DceRpcOp(LsarLookupSids2_Request, LsarLookupSids2_Response),
    58: DceRpcOp(LsarLookupNames2_Request, LsarLookupNames2_Response),
    # 59: Lsar_LSA_DP_59,
    # 60: Opnum60NotUsedOnWire,
    # 61: Opnum61NotUsedOnWire,
    # 62: Opnum62NotUsedOnWire,
    # 63: Opnum63NotUsedOnWire,
    # 64: Opnum64NotUsedOnWire,
    # 65: Opnum65NotUsedOnWire,
    # 66: Opnum66NotUsedOnWire,
    # 67: Opnum67NotUsedOnWire,
    68: DceRpcOp(LsarLookupNames3_Request, LsarLookupNames3_Response),
    # 69: Opnum69NotUsedOnWire,
    # 70: Opnum70NotUsedOnWire,
    # 71: Opnum71NotUsedOnWire,
    # 72: Opnum72NotUsedOnWire,
    # 73: Lsar_LSA_DP_73,
    # 74: Lsar_LSA_DP_74,
    # 75: Opnum75NotUsedOnWire,
    76: DceRpcOp(LsarLookupSids3_Request, LsarLookupSids3_Response),
    77: DceRpcOp(LsarLookupNames4_Request, LsarLookupNames4_Response),
}
register_dcerpc_interface(
    name="lsarpc",
    uuid=uuid.UUID("12345778-1234-ABCD-EF00-0123456789AB"),
    version="0.0",
    opnums=LSARPC_OPNUMS,
)
