예제 #1
0
        internal void method_1(Class0 class0_0)
        {
            short[] array  = this.short_0;
            short[] short_ = this.class10_0.short_2;
            int     num    = this.class10_0.int_2;
            int     num2   = -1;

            class0_0.int_41 = 0;
            class0_0.int_42 = Class7.int_1;
            for (int i = 0; i < num; i++)
            {
                if (array[i * 2] != 0)
                {
                    num2 = (class0_0.int_40[++class0_0.int_41] = i);
                    class0_0.sbyte_1[i] = 0;
                }
                else
                {
                    array[i * 2 + 1] = 0;
                }
            }
            int num3;

            while (class0_0.int_41 < 2)
            {
                num3                   = (class0_0.int_40[++class0_0.int_41] = ((num2 < 2) ? (++num2) : 0));
                array[num3 * 2]        = 1;
                class0_0.sbyte_1[num3] = 0;
                class0_0.int_47--;
                if (short_ != null)
                {
                    class0_0.int_48 -= (int)short_[num3 * 2 + 1];
                }
            }
            this.int_7 = num2;
            for (int i = class0_0.int_41 / 2; i >= 1; i--)
            {
                class0_0.method_3(array, i);
            }
            num3 = num;
            do
            {
                int i = class0_0.int_40[1];
                class0_0.int_40[1] = class0_0.int_40[class0_0.int_41--];
                class0_0.method_3(array, 1);
                int num4 = class0_0.int_40[1];
                class0_0.int_40[--class0_0.int_42] = i;
                class0_0.int_40[--class0_0.int_42] = num4;
                array[num3 * 2]        = (short)(array[i * 2] + array[num4 * 2]);
                class0_0.sbyte_1[num3] = (sbyte)(Math.Max((byte)class0_0.sbyte_1[i], (byte)class0_0.sbyte_1[num4]) + 1);
                array[i * 2 + 1]       = (array[num4 * 2 + 1] = (short)num3);
                class0_0.int_40[1]     = num3++;
                class0_0.method_3(array, 1);
            }while (class0_0.int_41 >= 2);
            class0_0.int_40[--class0_0.int_42] = class0_0.int_40[1];
            this.method_0(class0_0);
            Class7.smethod_1(array, num2, class0_0.short_5);
        }
예제 #2
0
        private static int smethod_0(IntPtr intptr_0, IntPtr intptr_1)
        {
            string[] strArray = new string[1] {
                "OLLYDBG"
            };
            string strA = Class7.smethod_1(intptr_0);

            foreach (string strB in strArray)
            {
                if (string.Compare(strA, strB, true) == 0)
                {
                    Class7.bool_0 = true;
                    return(0);
                }
            }
            return(1);
        }
예제 #3
0
        internal static byte[] smethod_2(Stream stream_0)
        {
            byte[] bArr8;
            int    i3, i6;

            object obj = Class7.object_0;

            Monitor.Enter(Class7.object_0);
            try
            {
                Stream       stream       = stream_0;
                MemoryStream memoryStream = null;
                ushort       ush          = (ushort)stream_0.ReadByte();
                ush = ~ush;
                for (int i1 = 1; i1 < 2; i1++)
                {
                    stream_0.ReadByte();
                }
                if ((ush & 2) != 0)
                {
                    DESCryptoServiceProvider descryptoServiceProvider = new DESCryptoServiceProvider();
                    byte[] bArr1 = new byte[8];
                    stream_0.Read(bArr1, 0, 8);
                    descryptoServiceProvider.IV = bArr1;
                    byte[] bArr2 = new byte[8];
                    stream_0.Read(bArr2, 0, 8);
                    bool   flag  = true;
                    byte[] bArr9 = bArr2;
                    for (int i7 = 0; i7 < bArr9.Length; i7++)
                    {
                        byte b = bArr9[i7];
                        if (b != 0)
                        {
                            goto label_1;
                        }
                    }
                    goto label_2;
label_1:
                    flag = false;
label_2:
                    if (flag)
                    {
                        bArr2 = Class7.smethod_1(Assembly.GetExecutingAssembly());
                    }
                    descryptoServiceProvider.Key = bArr2;
                    if (Class7.memoryStream_0 == null)
                    {
                        if (Class7.int_0 == 2147483647)
                        {
                            Class7.memoryStream_0.Capacity = (int)stream_0.Length;
                        }
                        else
                        {
                            Class7.memoryStream_0.Capacity = Class7.int_0;
                        }
                    }
                    Class7.memoryStream_0.Position = 0L;
                    ICryptoTransform icryptoTransform = descryptoServiceProvider.CreateDecryptor();
                    int i2 = icryptoTransform.InputBlockSize;
                    icryptoTransform.OutputBlockSize;
                    byte[] bArr3 = new byte[icryptoTransform.OutputBlockSize];
                    byte[] bArr4 = new byte[icryptoTransform.InputBlockSize];
                    for (i3 = (int)stream_0.Position; (long)(i3 + i2) < stream_0.Length; i3 = i3 + i2)
                    {
                        stream_0.Read(bArr4, 0, i2);
                        int i4 = icryptoTransform.TransformBlock(bArr4, 0, i2, bArr3, 0);
                        Class7.memoryStream_0.Write(bArr3, 0, i4);
                    }
                    stream_0.Read(bArr4, 0, (int)(stream_0.Length - (long)i3));
                    byte[] bArr5 = icryptoTransform.TransformFinalBlock(bArr4, 0, (int)(stream_0.Length - (long)i3));
                    Class7.memoryStream_0.Write(bArr5, 0, bArr5.Length);
                    stream          = Class7.memoryStream_0;
                    stream.Position = 0L;
                    memoryStream    = Class7.memoryStream_0;
                }
                if ((ush & 8) != 0)
                {
                    try
                    {
                        if (Class7.memoryStream_1 == null)
                        {
                            if (Class7.int_1 == -2147483648)
                            {
                                Class7.memoryStream_1.Capacity = (int)stream.Length * 2;
                            }
                            else
                            {
                                Class7.memoryStream_1.Capacity = Class7.int_1;
                            }
                        }
                        Class7.memoryStream_1.Position = 0L;
                        DeflateStream deflateStream = new DeflateStream(stream, CompressionMode.Decompress);
                        int           i5            = 1000;
                        byte[]        bArr6         = new byte[1000];
                        goto label_4;
label_3:
                        if (i6 >= i5)
                        {
                            goto label_4;
                        }
                        while (true)
                        {
                            Class7.memoryStream_1.Write(bArr6, 0, i6);
                            goto label_3;
label_4:
                            i6 = deflateStream.Read(bArr6, 0, i5);
                            if (i6 <= 0)
                            {
                                goto label_3;
                            }
                        }
                        memoryStream = Class7.memoryStream_1;
                    }
                    catch (Exception)
                    {
                    }
                }
                if (memoryStream != null)
                {
                    return(memoryStream.ToArray());
                }
                byte[] bArr7 = new byte[(stream_0.Length - stream_0.Position)];
                stream_0.Read(bArr7, 0, bArr7.Length);
                bArr8 = bArr7;
            }
            finally
            {
                Monitor.Exit(obj);
            }
            return(bArr8);
        }