示例#1
0
        // Token: 0x06000030 RID: 48 RVA: 0x00002CA8 File Offset: 0x00000EA8
        private string Decrypt(byte[] Datas)
        {
            int    num;
            string text;
            int    num4;
            object obj;

            try
            {
IL_01:
                ProjectData.ClearProjectError();
                num = -2;
IL_0A:
                int num2 = 2;
                PREC.DATA_BLOB data_BLOB = default(PREC.DATA_BLOB);
IL_15:
                num2 = 3;
                PREC.DATA_BLOB data_BLOB2 = default(PREC.DATA_BLOB);
IL_20:
                num2 = 4;
                GCHandle gchandle = GCHandle.Alloc(Datas, GCHandleType.Pinned);
IL_2B:
                num2             = 5;
                data_BLOB.pbData = gchandle.AddrOfPinnedObject();
IL_3C:
                num2             = 6;
                data_BLOB.cbData = Datas.Length;
IL_49:
                num2 = 7;
                gchandle.Free();
IL_53:
                num2 = 8;
                string         szDataDescr = null;
                PREC.DATA_BLOB data_BLOB4;
                PREC.DATA_BLOB data_BLOB3 = data_BLOB4;
                IntPtr         intPtr;
                IntPtr         pvReserved = intPtr;
                PREC.CRYPTPROTECT_PROMPTSTRUCT cryptprotect_PROMPTSTRUCT2;
                PREC.CRYPTPROTECT_PROMPTSTRUCT cryptprotect_PROMPTSTRUCT = cryptprotect_PROMPTSTRUCT2;
                PREC.CryptUnprotectData(ref data_BLOB, szDataDescr, ref data_BLOB3, pvReserved, ref cryptprotect_PROMPTSTRUCT, 0, ref data_BLOB2);
IL_70:
                num2 = 9;
                checked
                {
                    byte[] array = new byte[data_BLOB2.cbData + 1];
IL_84:
                    num2 = 10;
                    Marshal.Copy(data_BLOB2.pbData, array, 0, data_BLOB2.cbData);
IL_9E:
                    num2 = 11;
                    string @string = Encoding.UTF8.GetString(array);
IL_B0:
                    num2 = 12;
                    text = @string.Substring(0, @string.Length - 1);
IL_CB:
                    goto IL_15E;
                    IL_D0 :;
                }
                int num3 = num4 + 1;
                num4 = 0;
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num3);
IL_114:
                goto IL_153;
IL_116:
                num4 = num2;
                if (num <= -2)
                {
                    goto IL_D0;
                }
                @switch(ICSharpCode.Decompiler.ILAst.ILLabel[], num);
                IL_12F :;
            }
            catch when(endfilter(obj is Exception & num != 0 & num4 == 0))
            {
                Exception ex = (Exception)obj2;

                goto IL_116;
            }
IL_153:
            throw ProjectData.CreateProjectError(-2146828237);
IL_15E:
            string result = text;

            if (num4 != 0)
            {
                ProjectData.ClearProjectError();
            }
            return(result);
        }
示例#2
0
 private static extern bool CryptUnprotectData(ref PREC.DATA_BLOB pDataIn, string szDataDescr, ref PREC.DATA_BLOB pOptionalEntropy, IntPtr pvReserved, ref PREC.CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, int dwFlags, ref PREC.DATA_BLOB pDataOut);