Exemplo n.º 1
0
    public static Class1044 smethod_11(Stream A_0, ImageFormat A_1)
    {
        Class1044 class2;
        long      position = A_0.Position;

        switch (A_1)
        {
        case ImageFormat.Emf:
        case ImageFormat.Wmf:
            class2 = smethod_26(A_0);
            break;

        case ImageFormat.Gif:
            class2 = smethod_21(A_0);
            break;

        case ImageFormat.Tiff:
            class2 = smethod_24(A_0);
            break;

        default:
            class2 = Class1044.smethod_1(100, 100, 96.0, 96.0);
            break;
        }
        A_0.Position = position;
        return(class2);
    }
Exemplo n.º 2
0
 public static Class1044 smethod_22(byte[] A_0)
 {
     using (new MemoryStream(A_0))
     {
         return(Class1044.smethod_0());
     }
 }
Exemplo n.º 3
0
 public static byte[] smethod_29(byte[] A_0, Class1044 A_1)
 {
     using (MemoryStream stream = new MemoryStream())
     {
         BinaryWriter writer = new BinaryWriter(stream, Encoding.Unicode);
         int          num    = 0;
         writer.Write((ushort)0xcdd7);
         num = 0xcdd7;
         writer.Write((ushort)0x9ac6);
         num = 0x5711;
         writer.Write((short)0);
         num = 0x5711;
         writer.Write((short)A_1.method_0());
         num = 0x5711 ^ A_1.method_0();
         writer.Write((short)A_1.method_1());
         num ^= A_1.method_1();
         writer.Write((short)A_1.method_2());
         num ^= A_1.method_2();
         writer.Write((short)A_1.method_3());
         num ^= A_1.method_3();
         writer.Write((short)A_1.method_6());
         num ^= (int)A_1.method_6();
         writer.Write((short)0);
         writer.Write((short)0);
         writer.Write((ushort)num);
         writer.Write(A_0);
         return(stream.ToArray());
     }
 }
Exemplo n.º 4
0
    protected override void vmethod_1(BinaryWriter A_0)
    {
        byte[] buffer = Class409.smethod_30(this.byte_1);
        base.method_9(A_0);
        A_0.Write(buffer.Length);
        Class1044 class2 = Class409.smethod_9(this.byte_1);

        A_0.Write(class2.method_0());
        A_0.Write(class2.method_1());
        A_0.Write(class2.method_2());
        A_0.Write(class2.method_3());
        A_0.Write(class2.method_11());
        A_0.Write(class2.method_12());
        if (buffer.Length > 0x4000)
        {
            MemoryStream stream  = new MemoryStream(buffer);
            MemoryStream stream2 = new MemoryStream();
            Class1156.smethod_4(stream, stream2, CompressionMethod.Stored);
            A_0.Write((int)stream2.Length);
            A_0.Write((byte)0);
            A_0.Write((byte)0xfe);
            A_0.Write(stream2.GetBuffer(), 0, (int)stream2.Length);
            stream2.Close();
            stream.Close();
        }
        else
        {
            A_0.Write(buffer.Length);
            A_0.Write((byte)0xfe);
            A_0.Write((byte)0xfe);
            A_0.Write(buffer);
        }
    }
Exemplo n.º 5
0
    internal static byte[] smethod_27(byte[] A_0)
    {
        MemoryStream output = new MemoryStream();
        BinaryWriter writer = new BinaryWriter(output);
        string       str    = BookmarkStart.b("破搶瘸紺笼瘾ɀق籄楆祈", 15);

        for (int i = 0; i < str.Length; i++)
        {
            writer.Write((byte)str[i]);
        }
        writer.Write((uint)A_0.Length);
        Class1044 class2 = Class409.smethod_27(A_0);

        writer.Write(class2.method_0());
        writer.Write(class2.method_1());
        writer.Write(class2.method_2());
        writer.Write(class2.method_3());
        writer.Write(class2.method_11());
        writer.Write(class2.method_12());
        writer.Write((uint)0);
        writer.Write((ushort)0xfe00);
        for (int j = 0; j < 0x1d3; j++)
        {
            writer.Write((byte)0);
        }
        writer.Write(A_0);
        return(smethod_29(output.ToArray()));
    }
Exemplo n.º 6
0
 internal ImageSize(Class1044 A_0)
 {
     this.int_1    = A_0.method_4();
     this.int_2    = A_0.method_5();
     this.double_0 = A_0.method_6();
     this.double_1 = A_0.method_7();
 }
Exemplo n.º 7
0
    public static Class1044 smethod_21(Stream A_0)
    {
        A_0.Position = 6L;
        BinaryReader reader = new BinaryReader(A_0);
        ushort       num    = reader.ReadUInt16();
        ushort       num2   = reader.ReadUInt16();

        return(Class1044.smethod_1(num, num2, 0.0, 0.0));
    }
Exemplo n.º 8
0
    public static Class1044 smethod_28(Stream A_0)
    {
        BinaryReader reader = new BinaryReader(A_0);

        reader.ReadUInt16();
        int num  = Class336.smethod_4(reader.ReadUInt16());
        int num2 = Class336.smethod_4(reader.ReadUInt16());
        int num3 = Class336.smethod_4(reader.ReadUInt16());
        int num4 = Class336.smethod_4(reader.ReadUInt16());
        int num5 = Class969.smethod_40((double)(num4 - num2));
        int num6 = Class969.smethod_40((double)(num3 - num));

        return(Class1044.smethod_3(num2, num, num4, num3, num5, num6));
    }
Exemplo n.º 9
0
        internal byte[] method_0()
        {
            int num = 10;

            this.binaryReader_0.BaseStream.Position = this.int_0;
            int       num2   = this.binaryReader_0.ReadInt32();
            int       num3   = this.binaryReader_0.ReadInt32();
            int       num4   = this.binaryReader_0.ReadInt32();
            int       num5   = this.binaryReader_0.ReadInt32();
            int       num6   = this.binaryReader_0.ReadInt32();
            int       num7   = this.binaryReader_0.ReadInt32();
            int       num8   = this.binaryReader_0.ReadInt32();
            Class1044 class2 = Class1044.smethod_3(num3, num4, num5, num6, num7, num8);
            int       count  = this.binaryReader_0.ReadInt32();

            if (count <= 0)
            {
                return(null);
            }
            EsBlipCompression compression = (EsBlipCompression)this.binaryReader_0.ReadByte();

            this.binaryReader_0.ReadByte();
            byte[]            buffer       = this.binaryReader_0.ReadBytes(count);
            EsBlipCompression compression2 = compression;

            if (compression2 != EsBlipCompression.Deflate)
            {
                if (compression2 != EsBlipCompression.None)
                {
                    throw new InvalidOperationException(BookmarkStart.b("礯就䈳圵吷匹堻ḽⴿ❁ぃ❅⹇⍉⁋⭍灏ㅑ㭓㭕⡗⡙㥛ⵝ፟ୡୣࡥ䡧ݩ५ᩭᡯᵱၳ塵", num));
                }
            }
            else
            {
                try
                {
                    buffer = Class1156.smethod_0(buffer, num2, CompressionMethod.Stored);
                }
                catch (Exception)
                {
                    buffer = Class567.smethod_14();
                }
            }
            if (Class409.smethod_50(buffer))
            {
                buffer = Class409.smethod_29(buffer, class2);
            }
            return(buffer);
        }
Exemplo n.º 10
0
    private void method_19(CharacterFormat A_0, int A_1)
    {
        Class454 class2 = this.class764_0.method_41(A_1);

        if (class2 != null)
        {
            ShapeObject obj2 = new ShapeObject(this.class764_0.method_42());
            obj2.SetShapeType(ShapeType.OleObject);
            obj2.CharacterFormat.method_25(A_0);
            obj2.TextWrappingStyle = TextWrappingStyle.Inline;
            MemoryStream input = class2.method_7();
            if (input != null)
            {
                byte[] buffer = new byte[(int)(input.Length - 8L)];
                input.Position = 0L;
                BinaryReader reader2 = new BinaryReader(input);
                reader2.ReadUInt16();
                int num5 = reader2.ReadUInt16();
                int num6 = reader2.ReadUInt16();
                reader2.ReadUInt16();
                input.Read(buffer, 0, buffer.Length);
                obj2.ImageData.method_87(Class409.smethod_29(buffer, Class1044.smethod_1((int)((((double)num5) / 2540.0) * 1963.0), (int)((((double)num6) / 2540.0) * 1963.0), 1963.0, 1963.0)));
                obj2.SetShapeAttribute(0x1006, obj2.ImageData.ImageBytes);
            }
            MemoryStream stream = class2.method_8();
            if (stream != null)
            {
                BinaryReader reader = new BinaryReader(stream);
                stream.Position = 12L;
                reader.ReadUInt16();
                reader.ReadUInt16();
                reader.ReadUInt16();
                reader.ReadUInt16();
                int num  = reader.ReadInt32();
                int num2 = reader.ReadInt32();
                stream.Position = 0x2cL;
                int num3 = reader.ReadInt32();
                int num4 = reader.ReadInt32();
                reader.ReadInt32();
                reader.ReadInt32();
                reader.ReadInt32();
                reader.ReadInt32();
                obj2.method_37((Class969.smethod_32(num) * num3) / 1000.0);
                obj2.method_39((Class969.smethod_32(num2) * num4) / 1000.0);
            }
            this.class764_0.method_43().imethod_18(obj2);
        }
    }
Exemplo n.º 11
0
        internal byte[] method_0()
        {
            int num = 0x13;

            this.binaryReader_0.BaseStream.Position = this.int_0;
            int num2 = this.binaryReader_0.ReadInt32();
            int num3 = this.binaryReader_0.ReadInt32();
            int num4 = this.binaryReader_0.ReadInt32();
            int num5 = this.binaryReader_0.ReadInt32();
            int num6 = this.binaryReader_0.ReadInt32();
            int num7 = this.binaryReader_0.ReadInt32();
            int num8 = this.binaryReader_0.ReadInt32();

            Class1044.smethod_3(num3, num4, num5, num6, num7, num8);
            int count = this.binaryReader_0.ReadInt32();

            if (count <= 0)
            {
                return(null);
            }
            EscherBlipCompression compression = (EscherBlipCompression)this.binaryReader_0.ReadByte();

            this.binaryReader_0.ReadByte();
            byte[] buffer = this.binaryReader_0.ReadBytes(count);
            EscherBlipCompression compression2 = compression;

            if (compression2 != EscherBlipCompression.Deflate)
            {
                if (compression2 != EscherBlipCompression.None)
                {
                    throw new InvalidOperationException(BookmarkStart.b("瀸唺䬼帾ⵀ⩂⅄杆⩈⑊⁌㽎⍐㙒♔⑖じ㑚㍜罞ౠ٢ᅤས٨ཪ䍬", num));
                }
                return(buffer);
            }
            try
            {
                return(Class1156.smethod_0(buffer, num2, CompressionMethod.Stored));
            }
            catch (Exception)
            {
                return(Class567.smethod_14());
            }
        }
Exemplo n.º 12
0
 public static Class1044 smethod_26(Stream A_0)
 {
     return(Class1044.smethod_0());
 }