Example #1
0
    internal override void vmethod_3(BinaryWriter A_0)
    {
        A_0.Write(byte_0);
        A_0.Write(2);
        int position = (int)A_0.BaseStream.Position;
        int num2     = 0;

        A_0.Write(0);
        if (Class567.smethod_16(this.string_2))
        {
            Class1029.smethod_9(this.string_2, A_0);
            num2 |= 0x80;
        }
        if (Class567.smethod_16(this.string_0))
        {
            A_0.Write(byte_1);
            Class1029.smethod_10(this.string_0, A_0);
            num2 |= 1;
            num2 |= 2;
        }
        if (Class567.smethod_16(this.string_1))
        {
            Class1029.smethod_9(this.string_1, A_0);
            num2 |= 8;
        }
        int num3 = (int)A_0.BaseStream.Position;

        A_0.BaseStream.Position = position;
        A_0.Write(num2);
        A_0.BaseStream.Position = num3;
    }
Example #2
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);
    }
Example #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);
                }
            }
        }
    }
Example #4
0
    private static string smethod_0(BinaryReader A_0)
    {
        string str   = Class1029.smethod_6(A_0);
        int    index = str.IndexOf('\0');

        if (index >= 0)
        {
            return(str.Substring(0, index));
        }
        return(str);
    }
Example #5
0
    internal Class1103(BinaryReader A_0)
    {
        int num = A_0.ReadInt32();

        this.headerFlags_0     = (HeaderFlags)A_0.ReadInt32();
        this.int_0             = A_0.ReadInt32();
        this.algorithmType_0   = (AlgorithmType)A_0.ReadInt32();
        this.algorithmIdHash_0 = (AlgorithmIdHash)A_0.ReadInt32();
        this.int_1             = A_0.ReadInt32();
        this.int_2             = A_0.ReadInt32();
        A_0.ReadInt32();
        A_0.ReadInt32();
        this.string_0 = Class1029.smethod_5(A_0, num - 0x20);
    }
Example #6
0
 private static void smethod_3(BinaryWriter A_0)
 {
     A_0.Write(0x20004);
     A_0.Write(0x24);
     A_0.Write(140);
     A_0.Write(0x24);
     A_0.Write(0);
     A_0.Write(0x660e);
     A_0.Write(0x8004);
     A_0.Write(0x80);
     A_0.Write(0x18);
     A_0.Write(0);
     A_0.Write(0);
     Class1029.smethod_8(BookmarkStart.b("男匹弻䰽⼿ㅁ⭃⁅㱇橉ो⁍㡏㍑㩓㕕㵗㹙籛ౝ㍟⍡䑣ݥ٧๩䱫⽭㕯ⅱ味㕵੷͹౻੽낏슑秊ﮝ튟", 0x12), A_0);
 }
Example #7
0
    private static string smethod_1(BinaryReader A_0)
    {
        A_0.ReadUInt16();
        string str = Class1029.smethod_14(A_0);

        A_0.ReadUInt16();
        A_0.ReadUInt16();
        for (int i = 0; i < 5; i++)
        {
            A_0.ReadInt32();
        }
        if (A_0.ReadInt32() > 0)
        {
            int count = A_0.ReadInt32();
            A_0.ReadInt16();
            byte[] bytes = A_0.ReadBytes(count);
            return(Encoding.Unicode.GetString(bytes));
        }
        return(str);
    }
Example #8
0
    internal Class553(Class1089 A_0)
    {
        MemoryStream input = A_0.method_4(BookmarkStart.b("〰瀲娴娶䤸琺弼唾", 11));

        if (input != null)
        {
            BinaryReader reader = new BinaryReader(input);
            this.int_1      = reader.ReadInt32();
            this.int_2      = reader.ReadInt32();
            this.byte_0     = reader.ReadBytes(4);
            this.guid_0     = new Guid(reader.ReadBytes(0x10));
            this.string_3   = Class627.smethod_2(reader);
            this.class451_1 = new Class451(reader, false);
            this.string_0   = Class627.smethod_2(reader);
            if (Class567.smethod_46(reader, 4) && (reader.ReadInt32() == 0x71b239f4))
            {
                this.string_1   = Class1029.smethod_6(reader);
                this.class451_0 = new Class451(reader, true);
                this.string_2   = Class1029.smethod_6(reader);
            }
        }
    }
Example #9
0
 internal override void vmethod_3(BinaryWriter A_0)
 {
     Class1029.smethod_8(this.string_0, A_0);
 }
Example #10
0
 internal override void vmethod_2(BinaryReader A_0)
 {
     this.string_0 = Class1029.smethod_5(A_0, base.method_1());
 }
Example #11
0
 internal Class386(int A_0, string A_1) : base(A_0, Class1029.smethod_11(A_1))
 {
     this.string_0 = A_1;
 }
Example #12
0
        private void method_246(FormField A_0, Spire.Doc.Documents.FormFieldType A_1, BinaryWriter A_2)
        {
            string str;
            int    num = 5;

            A_2.Write(uint.MaxValue);
            int num2 = 0;

            num2  = (int)(Spire.Doc.Documents.FormFieldType.TextInput | A_1);
            num2 |= this.method_247(A_0, A_1) << 2;
            num2 |= A_0.OwnHelpText ? 0x80 : 0;
            num2 |= A_0.OwnStatusText ? 0x100 : 0;
            num2 |= !A_0.Enabled ? 0x200 : 0;
            if (A_1 == Spire.Doc.Documents.FormFieldType.CheckBox)
            {
                num2 |= ((A_0 as CheckBoxFormField).SizeType != CheckBoxSizeType.Auto) ? 0x400 : 0;
            }
            if (A_1 == Spire.Doc.Documents.FormFieldType.TextInput)
            {
                num2 |= ((int)(A_0 as TextFormField).TextFieldType) << 11;
            }
            num2 |= A_0.CalculateOnExit ? 0x4000 : 0;
            num2 |= (A_1 == Spire.Doc.Documents.FormFieldType.DropDown) ? 0x8000 : 0;
            A_2.Write((ushort)num2);
            int num3 = (A_0 is TextFormField) ? (A_0 as TextFormField).MaximumLength : 0;
            int num4 = (A_0 is CheckBoxFormField) ? ((int)((A_0 as CheckBoxFormField).CheckBoxSize * 2f)) : 20;

            A_2.Write((ushort)num3);
            A_2.Write((ushort)num4);
            Class1029.smethod_2(A_0.Name, 20, A_2, true, true);
            switch (A_1)
            {
            case Spire.Doc.Documents.FormFieldType.TextInput:
            {
                TextFormField field = A_0 as TextFormField;
                switch (field.TextFieldType)
                {
                case TextFormFieldType.RegularText:
                case TextFormFieldType.NumberText:
                case TextFormFieldType.DateText:
                case TextFormFieldType.Calculation:
                    Class1029.smethod_2(field.DefaultText, 0xff, A_2, true, true);
                    goto Label_01CB;

                case TextFormFieldType.CurrentDate:
                case TextFormFieldType.CurrentTime:
                    Class1029.smethod_2("", 0xff, A_2, true, true);
                    goto Label_01CB;
                }
                throw new InvalidOperationException(BookmarkStart.b("縪䌬䐮弰尲䈴夶ᤸ伺堼䜾㕀捂ⱄ⥆㥈㹊㥌潎═⩒╔㉖睘", num));
            }

            case Spire.Doc.Documents.FormFieldType.CheckBox:
                A_2.Write((A_0 as CheckBoxFormField).DefaultCheckBoxValue ? ((ushort)1) : ((ushort)0));
                break;

            case Spire.Doc.Documents.FormFieldType.DropDown:
                A_2.Write((ushort)(A_0 as DropDownFormField).DefaultDropDownValue);
                break;

            default:
                throw new InvalidOperationException(BookmarkStart.b("縪䌬䐮弰尲䈴夶ᤸ崺刼䴾ⱀ捂⍄⹆ⱈ❊⥌潎═⩒╔㉖睘", num));
            }
Label_01CB:
            str = (A_0 is TextFormField) ? (A_0 as TextFormField).StringFormat : "";
            Class1029.smethod_2(str, 0x40, A_2, true, true);
            Class1029.smethod_2(A_0.Help, 0xff, A_2, true, true);
            Class1029.smethod_2(A_0.StatusBarHelp, 0x8a, A_2, true, true);
            Class1029.smethod_2(A_0.MacroOnStart, 0x20, A_2, true, true);
            Class1029.smethod_2(A_0.MacroOnEnd, 0x20, A_2, true, true);
            if (A_1 == Spire.Doc.Documents.FormFieldType.DropDown)
            {
                A_2.Write((ushort)0xffff);
                A_2.Write((uint)(A_0 as DropDownFormField).DropDownItems.Count);
                for (int i = 0; i < (A_0 as DropDownFormField).DropDownItems.Count; i++)
                {
                    Class1029.smethod_2((A_0 as DropDownFormField).DropDownItems[i].Text, 0x7fffffff, A_2, true, false);
                }
            }
        }
Example #13
0
        private void method_243(BinaryReader A_0)
        {
            bool flag;
            int  num = 3;

            if (!(flag = A_0.ReadUInt32() == uint.MaxValue))
            {
                A_0.BaseStream.Seek(-4L, SeekOrigin.Current);
            }
            int num4 = A_0.ReadUInt16();

            Spire.Doc.Documents.FormFieldType type = ((Spire.Doc.Documents.FormFieldType)num4) & (Spire.Doc.Documents.FormFieldType.DropDown | Spire.Doc.Documents.FormFieldType.CheckBox);
            int num3 = (num4 & 0x7c) >> 2;

            switch (type)
            {
            case Spire.Doc.Documents.FormFieldType.CheckBox:
                if (num3 != 0x19)
                {
                    (this as CheckBoxFormField).Checked = num3 != 0;
                }
                break;

            case Spire.Doc.Documents.FormFieldType.DropDown:
                if (num3 != 0x19)
                {
                    (this as DropDownFormField).DropDownSelectedIndex = num3;
                }
                break;
            }
            this.OwnHelpText     = (num4 & 0x80) != 0;
            this.OwnStatusText   = (num4 & 0x100) != 0;
            this.Enabled         = (num4 & 0x200) == 0;
            this.CalculateOnExit = (num4 & 0x4000) != 0;
            if (this is CheckBoxFormField)
            {
                (this as CheckBoxFormField).SizeType = ((num4 & 0x400) == 0) ? CheckBoxSizeType.Auto : CheckBoxSizeType.Exactly;
            }
            bool flag2 = (num4 & 0x8000) != 0;
            int  num8  = A_0.ReadUInt16();
            int  num7  = A_0.ReadUInt16();

            if (this is TextFormField)
            {
                (this as TextFormField).TextFieldType = (TextFormFieldType)((num4 & 0x3800) >> 11);
                (this as TextFormField).MaximumLength = num8;
            }
            if (this is CheckBoxFormField)
            {
                (this as CheckBoxFormField).CheckBoxSize = num7;
            }
            if (!flag)
            {
                A_0.ReadUInt16();
            }
            this.Name = Class1029.smethod_1(A_0, flag, true);
            switch (type)
            {
            case Spire.Doc.Documents.FormFieldType.TextInput:
            {
                string str2 = Class1029.smethod_1(A_0, flag, true);
                if (num3 != 0x19)
                {
                    (this as TextFormField).DefaultText = str2;
                }
                break;
            }

            case Spire.Doc.Documents.FormFieldType.CheckBox:
                (this as CheckBoxFormField).DefaultCheckBoxValue = A_0.ReadUInt16() != 0;
                break;

            case Spire.Doc.Documents.FormFieldType.DropDown:
                (this as DropDownFormField).DefaultDropDownValue = A_0.ReadUInt16();
                break;

            default:
                throw new InvalidOperationException(BookmarkStart.b("簨䔪䘬䄮帰䐲嬴᜶弸吺似刾慀╂ⱄ≆╈⽊浌㭎⡐⍒ご祖", num));
            }
            string str = Class1029.smethod_1(A_0, flag, true);

            if (this is TextFormField)
            {
                (this as TextFormField).StringFormat = str;
            }
            this.Help          = Class1029.smethod_1(A_0, flag, true);
            this.StatusBarHelp = Class1029.smethod_1(A_0, flag, true);
            this.MacroOnStart  = Class1029.smethod_1(A_0, flag, true);
            this.MacroOnEnd    = Class1029.smethod_1(A_0, flag, true);
            if ((type == Spire.Doc.Documents.FormFieldType.DropDown) && flag2)
            {
                int num5;
                A_0.ReadInt16();
                if (!flag)
                {
                    num5 = A_0.ReadInt16();
                    A_0.ReadInt16();
                    A_0.ReadInt16();
                    A_0.ReadInt16();
                    A_0.ReadBytes(num5 * 2);
                }
                else
                {
                    num5 = A_0.ReadInt32();
                }
                if (this is DropDownFormField)
                {
                    for (int i = 0; i < num5; i++)
                    {
                        (this as DropDownFormField).DropDownItems.Add(Class1029.smethod_1(A_0, flag, false));
                    }
                }
            }
        }