예제 #1
0
    DocOleObject Interface50.imethod_2(string A_0, DocOleObject A_1)
    {
        Class229 class2 = this.method_0().method_183(A_0);

        if (class2 == null)
        {
            return(null);
        }
        byte[] buffer = null;
        class2.method_4().Position = 0L;
        A_1.stream_1 = class2.method_4();
        if (this.method_0().method_185(A_1.OleObjectType))
        {
            buffer = new byte[class2.method_4().Length];
            class2.method_4().Read(buffer, 0, buffer.Length);
        }
        else
        {
            Class1004 class3 = null;
            class3 = new Class1004(class2.method_4());
            Class1116 class4 = new Class1116();
            class4.method_4(class3.Interface51.imethod_0());
            buffer = class4.method_0();
            if (A_1.OleObjectType == OleObjectType.Package)
            {
                A_1.method_105(class4.method_2(), class4.method_3());
            }
        }
        class2.method_4().Position = 0L;
        A_1.SetNativeData(buffer);
        A_1.method_102(buffer, string.Empty);
        return(A_1);
    }
예제 #2
0
    private void method_21(Stream12 A_0, Stream A_1)
    {
        Class1004 class2 = new Class1004(A_1);

        string[] strArray = class2.Interface51.imethod_0().imethod_9();
        int      index    = 0;
        int      length   = strArray.Length;

        while (true)
        {
            if (index >= length)
            {
                break;
            }
            Stream1 stream = class2.Interface51.imethod_0().imethod_0(strArray[index]);
            A_0.method_15(strArray[index]);
            byte[] buffer = new byte[stream.Length];
            stream.Read(buffer, 0, buffer.Length);
            A_0.Write(buffer, 0, buffer.Length);
            try
            {
                A_0.Flush();
            }
            catch
            {
            }
            A_0.Close();
            stream.Close();
            index++;
        }
        class2.System.IDisposable.Dispose();
    }
예제 #3
0
    public Class357(Stream A_0, Class938 A_1)
    {
        this.list_1 = new List <int>();
        int    num      = A_1.method_26();
        int    count    = A_1.method_5();
        ushort num3     = A_1.method_9();
        int    capacity = 0x6d + ((num * (count - 4)) / 4);

        this.list_0 = new List <int>(capacity);
        this.list_0.AddRange(A_1.method_28());
        if (num > 0)
        {
            int num5 = A_1.method_24();
            A_1.method_9();
            byte[] buffer = new byte[count];
            int[]  dst    = new int[(count / 4) - 1];
            while (num5 >= 0)
            {
                long num6 = Class1004.smethod_4(num5, num3);
                this.list_1.Add(num5);
                A_0.Position = num6;
                A_0.Read(buffer, 0, count);
                Buffer.BlockCopy(buffer, 0, dst, 0, count - 4);
                this.list_0.AddRange(dst);
                num5 = BitConverter.ToInt32(buffer, count - 4);
            }
        }
    }
예제 #4
0
 public override DocOleObject Class581.imethod_2(string A_0, DocOleObject A_1)
 {
     if (!this.dictionary_2.ContainsKey(A_0))
     {
         return(null);
     }
     byte[] buffer = this.dictionary_2[A_0];
     using (MemoryStream stream = new MemoryStream(buffer))
     {
         A_1.stream_1 = new MemoryStream(buffer);
         OleObjectType oleObjectType = A_1.OleObjectType;
         if (((((oleObjectType != OleObjectType.Excel_97_2003_Worksheet) && (oleObjectType != OleObjectType.ExcelBinaryWorksheet)) && ((oleObjectType != OleObjectType.ExcelChart) && (oleObjectType != OleObjectType.ExcelMacroWorksheet))) && (((oleObjectType != OleObjectType.ExcelWorksheet) && (oleObjectType != OleObjectType.PowerPoint_97_2003_Presentation)) && ((oleObjectType != OleObjectType.PowerPoint_97_2003_Slide) && (oleObjectType != OleObjectType.PowerPointMacroPresentation)))) && ((((oleObjectType != OleObjectType.PowerPointMacroSlide) && (oleObjectType != OleObjectType.PowerPointPresentation)) && ((oleObjectType != OleObjectType.PowerPointSlide) && (oleObjectType != OleObjectType.VisioDrawing))) && (((oleObjectType != OleObjectType.Word_97_2003_Document) && (oleObjectType != OleObjectType.WordDocument)) && ((oleObjectType != OleObjectType.WordMacroDocument) && (oleObjectType != OleObjectType.VisioDrawing_2013)))))
         {
             Class1004 class3 = null;
             stream.Position = 0L;
             class3          = new Class1004(stream);
             Class1116 class2 = new Class1116();
             class2.method_4(class3.Interface51.imethod_0());
             buffer = class2.method_0();
             if (A_1.OleObjectType == OleObjectType.Package)
             {
                 A_1.method_105(class2.method_2(), class2.method_3());
             }
         }
     }
     A_1.SetNativeData(buffer);
     A_1.method_102(buffer, string.Empty);
     return(A_1);
 }
예제 #5
0
        private void method_95(Class1004 A_0, Class1004 A_1)
        {
            int num = 11;

            this.dictionary_0.Clear();
            foreach (Class297 class3 in A_0.Interface51.imethod_1().method_0())
            {
                if ((class3.method_0() != BookmarkStart.b("縰儲弴制娸伺洼倾⹀⽂", num)) && (class3.method_2() == Class297.EntryType.Storage))
                {
                    if (this.dictionary_0.ContainsKey(class3.method_0()))
                    {
                        this.dictionary_0[class3.method_0()] = class3.method_12();
                    }
                    else
                    {
                        this.dictionary_0.Add(class3.method_0(), class3.method_12());
                    }
                }
            }
            A_0.System.IDisposable.Dispose();
            foreach (Class297 class2 in A_1.Interface51.imethod_1().method_0())
            {
                if (this.dictionary_0.ContainsKey(class2.method_0()))
                {
                    class2.method_13(this.dictionary_0[class2.method_0()]);
                }
            }
        }
예제 #6
0
        private byte[] method_92(string A_0, byte[] A_1)
        {
            Class1004   class3;
            Interface61 interface3;
            int         num = 14;

            if ((A_1 != null) && (A_1.Length != 0))
            {
                MemoryStream stream     = new MemoryStream(A_1);
                Class1004    class2     = new Class1004(stream);
                Interface61  interface2 = class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("笳吵刷弹弻䨽ဿⵁ⭃⩅", num));
                class3 = new Class1004();
                class3.Interface51.imethod_0().imethod_12(interface2);
                this.method_95(class2, class3);
                class2.System.IDisposable.Dispose();
                interface3 = class3.Interface51.imethod_0().imethod_5(BookmarkStart.b("笳吵刷弹弻䨽ဿⵁ⭃⩅", num));
            }
            else
            {
                class3     = new Class1004();
                interface3 = class3.Interface51.imethod_0().imethod_4(BookmarkStart.b("笳吵刷弹弻䨽ဿⵁ⭃⩅", num));
            }
            interface3 = interface3.imethod_4(A_0);
            this.method_96(class3, A_0);
            class3.Interface51.imethod_2();
            A_1 = (class3.method_4() as MemoryStream).ToArray();
            class3.System.IDisposable.Dispose();
            return(A_1);
        }
예제 #7
0
        private byte[] method_93(byte[] A_0)
        {
            int num = 0x10;

            if ((A_0 == null) || ((A_0 != null) && (A_0.Length == 0)))
            {
                return(A_0);
            }
            Class1004 class3 = null;

            using (MemoryStream stream = new MemoryStream(A_0))
            {
                using (Class1004 class2 = new Class1004(stream))
                {
                    if (((Array.IndexOf <string>(class2.Interface51.imethod_0().imethod_10(), BookmarkStart.b("礵娷倹夻崽㐿ቁ⭃⥅⑇", num)) != -1) && (Array.IndexOf <string>(class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("礵娷倹夻崽㐿ቁ⭃⥅⑇", num)).imethod_10(), BookmarkStart.b("椵", num) + this.string_13) != -1)) && (Array.IndexOf <string>(class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("礵娷倹夻崽㐿ቁ⭃⥅⑇", num)).imethod_5(BookmarkStart.b("椵", num) + this.string_13).imethod_9(), BookmarkStart.b("㔵眷堹嘻眽⸿⑁⭃", num)) != -1))
                    {
                        using (Stream1 stream2 = class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("礵娷倹夻崽㐿ቁ⭃⥅⑇", num)).imethod_5(BookmarkStart.b("椵", num) + this.string_13).imethod_0(BookmarkStart.b("㔵眷堹嘻眽⸿⑁⭃", num)))
                        {
                            byte[] buffer = Class371.smethod_13(this.Interface49.get_LinkType(), this.OleObjectType, this.Interface49.get_DisplayAsIcon());
                            stream2.Write(buffer, 0, buffer.Length);
                            stream2.Flush();
                            class3 = new Class1004();
                            class3.Interface51.imethod_0().imethod_12(class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("礵娷倹夻崽㐿ቁ⭃⥅⑇", num)));
                            this.method_95(class2, class3);
                            class2.System.IDisposable.Dispose();
                            class3.Interface51.imethod_2();
                            A_0 = (class3.method_4() as MemoryStream).ToArray();
                            class3.System.IDisposable.Dispose();
                        }
                    }
                    return(A_0);
                }
            }
        }
예제 #8
0
    public void method_10(Stream A_0, Class357 A_1, Class938 A_2)
    {
        int    count = this.list_0.Count;
        int    num2  = A_2.method_5();
        ushort num3  = A_2.method_9();
        int    num4  = this.method_0() / 4;
        int    num5  = num4 - 1;
        double num6  = (num5 * count) - 109.0;
        double num7  = (num5 * num5) - 1.0;
        int    num8  = (int)Math.Ceiling((double)(num6 / num7));

        A_2.method_15(num8);
        byte[] buffer = new byte[num2];
        A_1.method_2(num8, this);
        this.method_11(num8, A_1);
        List <int> list  = A_1.method_0();
        int        num9  = 0;
        int        num10 = 0;

        while (num9 < num8)
        {
            num10 = this.method_12(num10, buffer);
            int  num11  = list[num9];
            long offset = Class1004.smethod_4(num11, num3);
            A_0.Seek(offset, SeekOrigin.Begin);
            A_0.Write(buffer, 0, num2);
            num9++;
        }
    }
예제 #9
0
 void IDisposable.Dispose()
 {
     if (this.class1004_0 != null)
     {
         this.class1004_0  = null;
         this.sortedList_0 = null;
         this.class297_0   = null;
         GC.SuppressFinalize(this);
     }
 }
예제 #10
0
    public static void smethod_0()
    {
        int       num    = 0x10;
        Class1004 class2 = new Class1004();

        using (FileStream stream = new FileStream(BookmarkStart.b("爵ȷ昹樻簽Ŀفⵃ❅⑇╉⭋恍⡏㹑❓", 0x10), FileMode.Open, FileAccess.Read, FileShare.Read))
        {
            class2.method_7(stream);
            Console.WriteLine(class2.method_1().imethod_0(BookmarkStart.b("愵圷䠹圻尽⼿ⵁ⽃", num)).Length);
        }
    }
예제 #11
0
 void Stream.Dispose(bool A_0)
 {
     if (this.stream_0 != null)
     {
         base.Dispose(A_0);
         this.stream_0.Dispose();
         this.stream_0    = null;
         this.class1004_0 = null;
         this.class297_0  = null;
         GC.SuppressFinalize(this);
     }
 }
예제 #12
0
    public Class1069(Class1004 A_0, string A_1, int A_2)
    {
        int num = 13;

        this.sortedList_0 = new SortedList <string, Interface59>(new Class1002());
        this.list_0       = new List <string>();
        this.list_1       = new List <string>();
        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("䌲吴䔶尸唺䤼", num));
        }
        this.class1004_0 = A_0;
        this.class297_0  = new Class297(A_1, Class297.EntryType.Storage, A_2);
    }
예제 #13
0
        private byte[] method_91()
        {
            byte[]    buffer = null;
            Class1004 class2 = new Class1004(BookmarkStart.b("簮䔰尲䜴嘶常帺", 9), true);

            class2.Interface51.imethod_1().method_0()[0].method_13(Class1117.smethod_2(this.OleObjectType));
            MemoryStream stream = new MemoryStream();

            class2.Interface51.imethod_2();
            class2.Interface51.imethod_3(stream);
            class2.System.IDisposable.Dispose();
            stream.Flush();
            buffer = stream.ToArray();
            stream.Close();
            stream.Dispose();
            return(buffer);
        }
예제 #14
0
    private byte[] method_14(MemoryStream A_0, DocOleObject A_1, string A_2)
    {
        Class1004   class2     = new Class1004(A_0);
        Interface61 interface2 = class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("愭刯報儳唵䰷樹医儽ⰿ", 8));
        Class1004   class3     = new Class1004();

        class3.Interface51.imethod_0().imethod_12(interface2);
        Interface61 interface3 = class3.Interface51.imethod_0().imethod_5(BookmarkStart.b("愭刯報儳唵䰷樹医儽ⰿ", 8));

        if (interface2.imethod_7(A_2))
        {
            interface3 = interface3.imethod_5(A_2);
        }
        else
        {
            interface3 = interface3.imethod_4(A_2);
        }
        class2.System.IDisposable.Dispose();
        foreach (Class297 class5 in class3.Interface51.imethod_1().method_0())
        {
            if (A_1.dictionary_0.ContainsKey(class5.method_0()))
            {
                class5.method_13(A_1.dictionary_0[class5.method_0()]);
            }
        }
        A_1.dictionary_0.Clear();
        Class1004 class4 = new Class1004(A_1.stream_1);

        A_1.stream_1.Position = 0L;
        for (int i = 0; i < class4.Interface51.imethod_0().imethod_9().Length; i++)
        {
            Stream1 stream  = class4.Interface51.imethod_0().imethod_0(class4.Interface51.imethod_0().imethod_9()[i]);
            Stream1 stream2 = interface3.imethod_2(class4.Interface51.imethod_0().imethod_9()[i]);
            stream.vmethod_0(stream2);
            stream2.Flush();
            stream2.Close();
            stream.Close();
        }
        class4.System.IDisposable.Dispose();
        class3.Interface51.imethod_2();
        byte[] buffer = (class3.method_4() as MemoryStream).ToArray();
        class3.System.IDisposable.Dispose();
        return(buffer);
    }
예제 #15
0
    public Stream3(Class1004 A_0, Class297 A_1) : base(A_1.method_0())
    {
        int num = 12;

        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("吱崳娵崷", num));
        }
        if (A_1 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("圱娳䈵䨷䌹", num));
        }
        if (A_1.method_2() != Class297.EntryType.Stream)
        {
            throw new ArgumentOutOfRangeException(BookmarkStart.b("圱娳䈵䨷䌹", num));
        }
        this.class1004_0 = A_0;
        this.class297_0  = A_1;
    }
예제 #16
0
        private void method_96(Class1004 A_0, string A_1)
        {
            Class1004 class2 = new Class1004(this.stream_1);

            this.stream_1.Position = 0L;
            Guid guid = Class1117.smethod_2(this.OleObjectType);

            using (List <Class297> .Enumerator enumerator = class2.Interface51.imethod_1().method_0().GetEnumerator())
            {
                Class297 current;
                while (enumerator.MoveNext())
                {
                    current = enumerator.Current;
                    if (class2.Interface51.imethod_0().imethod_11() == current.method_0())
                    {
                        goto Label_006D;
                    }
                }
                goto Label_0085;
Label_006D:
                guid = current.method_12();
            }
Label_0085:
            class2.System.IDisposable.Dispose();
            using (List <Class297> .Enumerator enumerator2 = A_0.Interface51.imethod_1().method_0().GetEnumerator())
            {
                Class297 class3;
                while (enumerator2.MoveNext())
                {
                    class3 = enumerator2.Current;
                    if (A_1 == class3.method_0())
                    {
                        goto Label_00C2;
                    }
                }
                return;

Label_00C2:
                class3.method_13(guid);
                this.dictionary_0.Add(A_1, guid);
            }
        }
예제 #17
0
    public byte[] method_1(Stream A_0, int A_1, Class1004 A_2)
    {
        int num = 0x10;

        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("䔵䰷䠹夻弽ⴿ", num));
        }
        if (A_2 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("倵儷嘹夻", num));
        }
        if (A_1 < 0)
        {
            return(null);
        }
        List <int> list = new List <int>();

        A_2.method_0();
        for (int i = A_1; i != -2; i = this.list_0[i])
        {
            if ((i < 0) || (i >= this.list_0.Count))
            {
                throw new ApplicationException();
            }
            list.Add(i);
        }
        int count = list.Count;

        byte[] buffer = new byte[count << this.ushort_0];
        int    num4   = ((int)1) << this.ushort_0;
        int    num5   = 0;

        for (int j = 0; num5 < count; j += num4)
        {
            long num7 = this.method_16(list[num5]);
            A_0.Position = num7;
            A_0.Read(buffer, j, num4);
            num5++;
        }
        return(buffer);
    }
예제 #18
0
    internal Class1116(byte[] A_0, string A_1)
    {
        int num = 15;

        this.string_21 = string.Empty;
        this.string_22 = string.Empty;
        if ((A_0 != null) && (A_0.Length != 0))
        {
            if (((A_0.Length > 2) && (A_0[0] == 2)) && (A_0[1] == 0))
            {
                this.byte_0          = this.method_7(A_0);
                this.oleObjectType_0 = OleObjectType.Package;
            }
            else
            {
                MemoryStream stream = new MemoryStream(A_0);
                Class1004    class2 = new Class1004(stream);
                if (class2.Interface51.imethod_0().imethod_7(BookmarkStart.b("稴唶匸帺帼䬾ᅀⱂ⩄⭆", num)))
                {
                    Interface61 interface2 = class2.Interface51.imethod_0().imethod_5(BookmarkStart.b("稴唶匸帺帼䬾ᅀⱂ⩄⭆", num));
                    if (interface2.imethod_7(A_1))
                    {
                        interface2 = interface2.imethod_5(A_1);
                        this.method_4(interface2);
                    }
                }
                else if (class2.Interface51.imethod_0().imethod_7(A_1))
                {
                    Interface61 interface3 = class2.Interface51.imethod_0().imethod_5(A_1);
                    this.method_4(interface3);
                }
                else if (class2.Interface51.imethod_0().imethod_7(BookmarkStart.b("㘴砶嬸儺琼儾❀ⱂ", num)) || class2.Interface51.imethod_0().imethod_7(BookmarkStart.b("㐴砶唸帺", num)))
                {
                    this.method_4(class2.Interface51.imethod_0());
                }
            }
        }
    }
예제 #19
0
    public Class1069(Class1004 A_0, Class297 A_1)
    {
        int num = 0;

        this.sortedList_0 = new SortedList <string, Interface59>(new Class1002());
        this.list_0       = new List <string>();
        this.list_1       = new List <string>();
        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("嘥䤧堩䤫䀭䐯琱崳娵崷", num));
        }
        if (A_1 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("䌥䘧帩師圭", num));
        }
        if ((A_1.method_2() != Class297.EntryType.Storage) && (A_1.method_2() != Class297.EntryType.Root))
        {
            throw new ArgumentOutOfRangeException(BookmarkStart.b("䌥䘧帩師圭", num));
        }
        this.class297_0  = A_1;
        this.class1004_0 = A_0;
        this.method_0(A_1.method_10());
    }
예제 #20
0
    public Class939(Class1004 A_0, Stream A_1, Class357 A_2, Class938 A_3)
    {
        int num5 = 3;

        this.list_0 = new List <int>();
        this.list_1 = new List <int>();
        if (A_0 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("伨䈪䄬䨮", num5));
        }
        if (A_1 == null)
        {
            throw new ArgumentNullException(BookmarkStart.b("娨弪弬䨮倰帲", num5));
        }
        this.stream_0 = A_0.method_4();
        List <int> list  = A_2.method_0();
        int        count = A_3.method_5();

        this.ushort_0 = A_3.method_9();
        byte[] buffer = new byte[count];
        int[]  dst    = new int[count >> 2];
        this.int_0 = 0x200;
        int num2 = 0;
        int num3 = list.Count;

        while (num2 < num3)
        {
            int num4 = list[num2];
            if (num4 >= 0)
            {
                A_0.method_9(buffer, 0, num4, A_3);
                Buffer.BlockCopy(buffer, 0, dst, 0, count);
                this.list_0.AddRange(dst);
            }
            num2++;
        }
    }
예제 #21
0
 public Stream4(Class1004 A_0, Class297 A_1) : base(A_0, A_1)
 {
 }
예제 #22
0
 internal long method_16(int A_0)
 {
     return(Class1004.smethod_5(A_0, this.ushort_0, this.int_0));
 }
예제 #23
0
        private byte[] method_90(string A_0, byte[] A_1)
        {
            int num = 0x11;

            if ((this.stream_1 != null) && (this.OleObjectType == Spire.Doc.Documents.OleObjectType.Undefined))
            {
                A_1 = this.method_92(A_0, A_1);
                return(A_1);
            }
            MemoryStream stream  = null;
            Class1004    class2  = null;
            Stream12     stream2 = null;
            Stream12     stream3 = null;

            if ((A_1 != null) && (A_1.Length != 0))
            {
                stream  = new MemoryStream(A_1);
                stream2 = new Stream12(stream, STGM.STGM_SHARE_EXCLUSIVE | STGM.STGM_READWRITE);
                stream3 = stream2.method_12(BookmarkStart.b("砶嬸儺堼尾㕀ፂ⩄⡆╈", num), STGM.STGM_SHARE_EXCLUSIVE | STGM.STGM_READWRITE);
            }
            else
            {
                stream2 = Stream12.smethod_2();
                stream3 = stream2.method_13(BookmarkStart.b("砶嬸儺堼尾㕀ፂ⩄⡆╈", num));
            }
            class2 = new Class1004(BookmarkStart.b("搶䴸吺似帾♀♂", num), true);
            class2.Interface51.imethod_0().imethod_4(A_0);
            class2.Interface51.imethod_1().method_0()[1].method_13(Class1117.smethod_2(this.OleObjectType));
            MemoryStream stream4 = new MemoryStream();

            class2.Interface51.imethod_2();
            class2.Interface51.imethod_3(stream4);
            class2.System.IDisposable.Dispose();
            stream4.Flush();
            byte[] buffer = stream4.ToArray();
            stream4.Close();
            stream4 = new MemoryStream(buffer);
            MemoryStream stream5 = new MemoryStream();
            Stream12     stream6 = new Stream12(stream4);
            Stream12     stream7 = stream6.method_11(A_0);

            Stream12.smethod_0(stream7, stream3);
            stream2.Flush();
            stream2.method_17(stream5);
            stream5.Position = 0L;
            A_1 = stream5.ToArray();
            stream6.Close();
            stream6.Dispose();
            stream7.Close();
            stream7.Dispose();
            stream2.Close();
            stream2.Dispose();
            stream3.Close();
            stream3.Dispose();
            stream5.Close();
            stream5.Dispose();
            stream4.Close();
            stream4.Dispose();
            if (stream != null)
            {
                stream.Close();
                stream.Dispose();
            }
            return(A_1);
        }