// Token: 0x06000085 RID: 133 RVA: 0x000088C4 File Offset: 0x00006AC4 public static string Decrypt(byte[] Datas) { string result; try { Passwords.DATA_BLOB data_BLOB = default(Passwords.DATA_BLOB); Passwords.DATA_BLOB data_BLOB2 = default(Passwords.DATA_BLOB); GCHandle gchandle = GCHandle.Alloc(Datas, GCHandleType.Pinned); data_BLOB.pbData = gchandle.AddrOfPinnedObject(); data_BLOB.cbData = Datas.Length; gchandle.Free(); string szDataDescr = null; Passwords.DATA_BLOB data_BLOB4; Passwords.DATA_BLOB data_BLOB3 = data_BLOB4; IntPtr intPtr; IntPtr pvReserved = intPtr; Passwords.CRYPTPROTECT_PROMPTSTRUCT cryptprotect_PROMPTSTRUCT2; Passwords.CRYPTPROTECT_PROMPTSTRUCT cryptprotect_PROMPTSTRUCT = cryptprotect_PROMPTSTRUCT2; Passwords.CryptUnprotectData(ref data_BLOB, szDataDescr, ref data_BLOB3, pvReserved, ref cryptprotect_PROMPTSTRUCT, 0, ref data_BLOB2); byte[] array = new byte[data_BLOB2.cbData + 1]; Marshal.Copy(data_BLOB2.pbData, array, 0, data_BLOB2.cbData); string @string = Encoding.Default.GetString(array); result = @string.Substring(0, @string.Length - 1); } catch (Exception ex) { } return(result); }
private static extern bool CryptUnprotectData(ref Passwords.DATA_BLOB pDataIn, string szDataDescr, ref Passwords.DATA_BLOB pOptionalEntropy, IntPtr pvReserved, ref Passwords.CRYPTPROTECT_PROMPTSTRUCT pPromptStruct, int dwFlags, ref Passwords.DATA_BLOB pDataOut);