示例#1
0
 static c0001dd()
 {
     c000005.m000005(typeof(c0001dd));
     bool flag2 = false;
     Assembly executingAssembly = Assembly.GetExecutingAssembly();
     StrongNameSignatureVerificationEx(executingAssembly.Location, true, ref flag2);
     if (!flag2 || !executingAssembly.FullName.EndsWith("3db2fda49ca9adff"))
     {
         throw new SecurityException("Assembly has been tampered");
     }
     try
     {
         byte[] buffer = new byte[0x120];
         int num = 0;
         while (num < 0x90)
         {
             buffer[num++] = 8;
         }
         while (num < 0x100)
         {
             buffer[num++] = 9;
         }
         while (num < 280)
         {
             buffer[num++] = 7;
         }
         while (num < 0x120)
         {
             buffer[num++] = 8;
         }
         f000017 = new c0001dd(buffer);
         buffer = new byte[0x20];
         num = 0;
         while (num < 0x20)
         {
             buffer[num++] = 5;
         }
         f000110 = new c0001dd(buffer);
     }
     catch (Exception)
     {
         throw new SharpZipBaseException("InflaterHuffmanTree: static tree length illegal");
     }
 }
示例#2
0
        private bool m000190()
        {
            int num2;
            int num3;
            switch (this.f000131)
            {
                case 0:
                    return this.m000008();

                case 1:
                    return this.m00000c();

                case 2:
                    if (!this.f00000a)
                    {
                        int num = this.f00002d.m00000e(3);
                        if (num < 0)
                        {
                            return false;
                        }
                        this.f00002d.m000004(3);
                        if ((num & 1) != 0)
                        {
                            this.f00000a = true;
                        }
                        switch ((num >> 1))
                        {
                            case 0:
                                this.f00002d.m000001();
                                this.f000131 = 3;
                                break;

                            case 1:
                                this.f000017 = c0001dd.f000017;
                                this.f000110 = c0001dd.f000110;
                                this.f000131 = 7;
                                break;

                            case 2:
                                this.f000135 = new c0001dc();
                                this.f000131 = 6;
                                break;
                        }
                        throw new SharpZipBaseException("Unknown block type " + num);
                    }
                    if (!this.f000056)
                    {
                        this.f00002d.m000001();
                        this.f000133 = 0x20;
                        this.f000131 = 11;
                        return true;
                    }
                    this.f000131 = 12;
                    return false;

                case 3:
                    this.f000020 = this.f00002d.m00000e(0x10);
                    if (this.f000020 >= 0)
                    {
                        this.f00002d.m000004(0x10);
                        this.f000131 = 4;
                        goto Label_01D4;
                    }
                    return false;

                case 4:
                    goto Label_01D4;

                case 5:
                    goto Label_0231;

                case 6:
                    if (this.f000135.m0002c6(this.f00002d))
                    {
                        this.f000017 = this.f000135.m00004f();
                        this.f000110 = this.f000135.m0002c7();
                        this.f000131 = 7;
                        goto Label_02D9;
                    }
                    return false;

                case 7:
                case 8:
                case 9:
                case 10:
                    goto Label_02D9;

                case 11:
                    return this.m00018f();

                case 12:
                    return false;

                default:
                    throw new SharpZipBaseException("Inflater.Decode unknown mode");
            }
            return true;
            Label_01D4:
            num2 = this.f00002d.m00000e(0x10);
            if (num2 < 0)
            {
                return false;
            }
            this.f00002d.m000004(0x10);
            if (num2 != (this.f000020 ^ 0xffff))
            {
                throw new SharpZipBaseException("broken uncompressed block");
            }
            this.f000131 = 5;
            Label_0231:
            num3 = this.f00002b.m0002cb(this.f00002d, this.f000020);
            this.f000020 -= num3;
            if (this.f000020 == 0)
            {
                this.f000131 = 2;
                return true;
            }
            return !this.f00002d.m000008();
            Label_02D9:
            return this.m00018e();
        }
示例#3
0
        private bool m00018e()
        {
            int num2;
            int num3;
            int num = this.f00002b.m00000f();
            Label_000C:
            if (num < 0x102)
            {
                return true;
            }
            switch (this.f000131)
            {
                case 7:
                    do
                    {
                        if (((num2 = this.f000017.m0002c8(this.f00002d)) & -256) != 0)
                        {
                            if (num2 < 0x101)
                            {
                                if (num2 < 0)
                                {
                                    return false;
                                }
                                this.f000110 = null;
                                this.f000017 = null;
                                this.f000131 = 2;
                                return true;
                            }
                            try
                            {
                                this.f000134 = f00000b[num2 - 0x101];
                                this.f000133 = f00000f[num2 - 0x101];
                            }
                            catch (Exception)
                            {
                                throw new SharpZipBaseException("Illegal rep length code");
                            }
                            break;
                        }
                        this.f00002b.m000004(num2);
                    }
                    while (--num >= 0x102);
                    return true;

                case 8:
                    break;

                case 9:
                    goto Label_0187;

                case 10:
                    goto Label_01DD;

                default:
                    throw new SharpZipBaseException("Inflater unknown mode");
            }
            if (this.f000133 > 0)
            {
                this.f000131 = 8;
                num3 = this.f00002d.m00000e(this.f000133);
                if (num3 < 0)
                {
                    return false;
                }
                this.f00002d.m000004(this.f000133);
                this.f000134 += num3;
            }
            this.f000131 = 9;
            Label_0187:
            num2 = this.f000110.m0002c8(this.f00002d);
            if (num2 < 0)
            {
                return false;
            }
            try
            {
                this.f000016 = f000010[num2];
                this.f000133 = f000011[num2];
            }
            catch (Exception)
            {
                throw new SharpZipBaseException("Illegal rep dist code");
            }
            Label_01DD:
            if (this.f000133 > 0)
            {
                this.f000131 = 10;
                num3 = this.f00002d.m00000e(this.f000133);
                if (num3 < 0)
                {
                    return false;
                }
                this.f00002d.m000004(this.f000133);
                this.f000016 += num3;
            }
            this.f00002b.m000013(this.f000134, this.f000016);
            num -= this.f000134;
            this.f000131 = 7;
            goto Label_000C;
        }
示例#4
0
        public bool m0002c6(c0001d1 p0)
        {
            int num3;
            bool flag2;
            Label_0000:
            flag2 = true;
            switch (this.f0001f9)
            {
                case 0:
                    this.f0001fa = p0.m00000e(5);
                    if (this.f0001fa >= 0)
                    {
                        this.f0001fa += 0x101;
                        p0.m000004(5);
                        this.f0001f9 = 1;
                        break;
                    }
                    return false;

                case 1:
                    break;

                case 2:
                    goto Label_00E3;

                case 3:
                    goto Label_018C;

                case 4:
                    goto Label_01CA;

                case 5:
                    goto Label_026E;

                default:
                    goto Label_0000;
            }
            this.f0001fb = p0.m00000e(5);
            if (this.f0001fb < 0)
            {
                return false;
            }
            this.f0001fb++;
            p0.m000004(5);
            this.f000016 = this.f0001fa + this.f0001fb;
            this.f00001d = new byte[this.f000016];
            this.f0001f9 = 2;
            Label_00E3:
            this.f000011 = p0.m00000e(4);
            if (this.f000011 < 0)
            {
                return false;
            }
            this.f000011 += 4;
            p0.m000004(4);
            this.f000008 = new byte[0x13];
            this.f000022 = 0;
            this.f0001f9 = 3;
            Label_018C:
            while (this.f000022 < this.f000011)
            {
                int num = p0.m00000e(3);
                if (num < 0)
                {
                    return false;
                }
                p0.m000004(3);
                this.f000008[f000010[this.f000022]] = (byte) num;
                this.f000022++;
            }
            this.f000017 = new c0001dd(this.f000008);
            this.f000008 = null;
            this.f000022 = 0;
            this.f0001f9 = 4;
            Label_01CA:
            do
            {
                int num2;
                if (((num2 = this.f000017.m0002c8(p0)) & -16) != 0)
                {
                    if (num2 < 0)
                    {
                        return false;
                    }
                    if (num2 < 0x11)
                    {
                        if (this.f000022 == 0)
                        {
                            throw new SharpZipBaseException();
                        }
                    }
                    else
                    {
                        this.f0001fc = 0;
                    }
                    this.f000020 = num2 - 0x10;
                    this.f0001f9 = 5;
                    goto Label_026E;
                }
                this.f00001d[this.f000022++] = this.f0001fc = (byte) num2;
            }
            while (this.f000022 != this.f000016);
            return true;
            Label_026E:
            num3 = f00000f[this.f000020];
            int num4 = p0.m00000e(num3);
            if (num4 >= 0)
            {
                p0.m000004(num3);
                num4 += f00000b[this.f000020];
                if ((this.f000022 + num4) > this.f000016)
                {
                    throw new SharpZipBaseException();
                }
                while (num4-- > 0)
                {
                    this.f00001d[this.f000022++] = this.f0001fc;
                }
                if (this.f000022 == this.f000016)
                {
                    return true;
                }
                this.f0001f9 = 4;
                goto Label_0000;
            }
            return false;
        }