Esempio n. 1
0
    internal static DigitalSignature smethod_0(BinaryReader A_0, byte[] A_1)
    {
        bool             flag;
        int              num       = 8;
        DigitalSignature signature = new DigitalSignature(DigitalSignatureType.CryptoApi);

        try
        {
            int num2 = A_0.ReadInt32();
            int num3 = A_0.ReadInt32();
            smethod_1(A_0);
            uint num4     = A_0.ReadUInt32();
            uint num5     = A_0.ReadUInt32();
            long fileTime = num4;
            fileTime  = fileTime << 0x20;
            fileTime |= num5;
            signature.method_0(DateTime.FromFileTimeUtc(fileTime));
            A_0.ReadInt32();
            int count = A_0.ReadInt32();
            int num8  = A_0.ReadInt32();
            A_0.ReadInt32();
            int num9  = A_0.ReadInt32();
            int num10 = A_0.ReadInt32();
            A_0.ReadInt32();
            Class1029.smethod_5(A_0, (num2 + 1) * 2);
            Class1029.smethod_5(A_0, (num3 + 1) * 2);
            byte[] array   = A_0.ReadBytes(count);
            byte[] rawData = A_0.ReadBytes(num8);
            A_0.ReadBytes(num9);
            A_0.ReadBytes(num10);
            if (num8 == 0)
            {
                throw new InvalidOperationException(BookmarkStart.b("稭堯圱䘳匵ᠷ匹伻ḽ⸿ⵁ摃╅ⵇ㡉㡋❍㙏㭑㝓㝕ⱗ㽙籛㭝ൟaţɥ౧ཀྵ࡫乭ᙯᵱٳ噵᥷婹᡻᝽ꪉヒﲑ鍊낝", num));
            }
            X509Certificate2 certificate = new X509Certificate2(rawData);
            signature.method_3(certificate);
            RSAParameters parameters = ((RSACryptoServiceProvider)certificate.PublicKey.Key).ExportParameters(false);
            Array.Reverse(array);
            byte[] buffer3          = Class1078.smethod_0(array);
            Rsa    rsa              = new Rsa(parameters.Modulus, parameters.Exponent);
            byte[] sourceArray      = Class1078.smethod_1(Class1078.smethod_2(rsa, buffer3), rsa.Modulus.method_0() >> 3);
            byte[] destinationArray = new byte[0x10];
            Array.Copy(sourceArray, sourceArray.Length - 0x10, destinationArray, 0, 0x10);
            MD5 md = new MD5();
            md.Update(A_1, A_1.Length);
            md.Update(BitConverter.GetBytes(num5), 4);
            md.Update(BitConverter.GetBytes(num4), 4);
            md.FinalUpdate();
            flag = Class85.smethod_1(destinationArray, md.Digest);
        }
        catch (Exception)
        {
            flag = false;
        }
        signature.method_2(flag);
        return(signature);
    }
Esempio n. 2
0
    private bool method_2()
    {
        byte[] buffer = this.method_12().method_9();
        int    num    = this.method_12().method_4();

        byte[] buffer2 = smethod_0(this.method_4(buffer, this.method_12().method_11(), byte_2), num, 0);
        byte[] buffer3 = this.class803_0.method_0(this.method_4(buffer, this.method_12().method_10(), byte_1));
        return(Class85.smethod_1(buffer2, buffer3));
    }
Esempio n. 3
0
    private void method_4(BinaryReader A_0)
    {
        int num = 0;

        if (base.method_1() != 0)
        {
            A_0.ReadBytes(0x10);
            if (A_0.ReadInt32() == 2)
            {
                EsUriFlags flags = (EsUriFlags)A_0.ReadInt32();
                if ((flags & EsUriFlags.HasDisplayName) != 0)
                {
                    Class1029.smethod_7(A_0);
                }
                if ((flags & EsUriFlags.HasFrameName) != 0)
                {
                    this.string_2 = Class1029.smethod_7(A_0);
                }
                if ((flags & EsUriFlags.HasMoniker) != 0)
                {
                    if ((flags & EsUriFlags.MonikerSavedAsStr) == 0)
                    {
                        byte[] buffer = A_0.ReadBytes(0x10);
                        if (!Class85.smethod_1(buffer, byte_1))
                        {
                            if (!Class85.smethod_1(buffer, byte_2))
                            {
                                Guid guid = new Guid(buffer);
                                throw new InvalidOperationException(string.Format(BookmarkStart.b("猥䘧䄩䈫䄭䜯就ᐳ帵䄷䨹夻䰽ⰿ⭁⩃ⵅ桇ⱉ⍋㱍㵏㍑⁓硕硗᝙㍛そय़ॡţᑥ䡧⵩㥫❭㑯剱ᵳյ塷Ź䱻ͽ깿", num), guid.ToString()));
                            }
                            this.string_0 = smethod_1(A_0);
                        }
                        else
                        {
                            this.string_0 = smethod_0(A_0);
                        }
                    }
                    else
                    {
                        this.string_0 = Class1029.smethod_7(A_0);
                    }
                }
                if ((flags & EsUriFlags.HasLocationStr) != 0)
                {
                    this.string_1 = Class1029.smethod_7(A_0);
                }
                if ((flags & EsUriFlags.HasGUID) != 0)
                {
                    A_0.ReadBytes(0x10);
                }
                if ((flags & EsUriFlags.HasCreationTime) != 0)
                {
                    A_0.ReadBytes(8);
                }
            }
        }
    }
Esempio n. 4
0
    private void method_4(BinaryReader A_0)
    {
        int num = 14;

        if (base.method_1() != 0)
        {
            A_0.ReadBytes(0x10);
            if (A_0.ReadInt32() == 2)
            {
                EscherUriFlags flags = (EscherUriFlags)A_0.ReadInt32();
                if ((flags & EscherUriFlags.HasDisplayName) != 0)
                {
                    Class813.smethod_7(A_0);
                }
                if ((flags & EscherUriFlags.HasFrameName) != 0)
                {
                    this.string_2 = Class813.smethod_7(A_0);
                }
                if ((flags & EscherUriFlags.HasMoniker) != 0)
                {
                    if ((flags & EscherUriFlags.MonikerSavedAsStr) == 0)
                    {
                        byte[] buffer = A_0.ReadBytes(0x10);
                        if (!Class85.smethod_1(buffer, byte_1))
                        {
                            if (!Class85.smethod_1(buffer, byte_2))
                            {
                                Guid guid = new Guid(buffer);
                                throw new InvalidOperationException(string.Format(BookmarkStart.b("愳堵匷吹医䤽⸿扁ⱃ㽅㡇⽉㹋≍㥏㱑㽓癕㹗㕙⹛㍝şᙡ䩣䙥╧թɫݭ᭯᝱ٳ噵㽷⽹㕻㩽ꁿꚅ몉ꂍ", num), guid.ToString()));
                            }
                            this.string_0 = smethod_1(A_0);
                        }
                        else
                        {
                            this.string_0 = smethod_0(A_0);
                        }
                    }
                    else
                    {
                        this.string_0 = Class813.smethod_7(A_0);
                    }
                }
                if ((flags & EscherUriFlags.HasLocationStr) != 0)
                {
                    this.string_1 = Class813.smethod_7(A_0);
                }
                if ((flags & EscherUriFlags.HasGUID) != 0)
                {
                    A_0.ReadBytes(0x10);
                }
                if ((flags & EscherUriFlags.HasCreationTime) != 0)
                {
                    A_0.ReadBytes(8);
                }
            }
        }
    }
Esempio n. 5
0
    private bool method_3(Stream A_0)
    {
        byte[] buffer  = this.method_12().method_9();
        byte[] buffer2 = this.method_11().method_9();
        int    num     = this.method_11().method_4();
        int    num2    = this.method_11().method_2();

        byte[]             buffer3   = this.method_4(buffer, this.method_12().method_12(), byte_3);
        byte[]             buffer4   = this.method_9(buffer2, byte_4, num2, 0);
        KeyedHashAlgorithm algorithm = KeyedHashAlgorithm.Create(BookmarkStart.b("挪怬渮爰", 5) + this.method_11().method_8());

        algorithm.Key = this.method_5(buffer3, buffer4, this.method_11().method_12(), num, 0);
        byte[] buffer5 = algorithm.ComputeHash(A_0);
        byte[] buffer6 = this.method_9(buffer2, byte_5, num2, 0);
        byte[] buffer7 = this.method_5(buffer3, buffer6, this.method_11().method_13(), num, 0);
        return(Class85.smethod_1(buffer5, buffer7));
    }
Esempio n. 6
0
 internal bool method_1(Class428 A_0)
 {
     return(Class85.smethod_1(this.byte_0, A_0.byte_0));
 }