diff --git a/ArcFormats/CatSystem/ArcINT.cs b/ArcFormats/CatSystem/ArcINT.cs index 808750a5..391646be 100644 --- a/ArcFormats/CatSystem/ArcINT.cs +++ b/ArcFormats/CatSystem/ArcINT.cs @@ -128,7 +128,7 @@ namespace GameRes.Formats.CatSystem return null; if (file.View.AsciiEqual (8, "__key__.dat\x00")) { - uint? key = QueryEncryptionInfo(); + uint? key = QueryEncryptionInfo (file.Name); if (null == key) throw new UnknownEncryptionScheme(); return OpenEncrypted (file, entry_count, key.Value); @@ -274,8 +274,11 @@ namespace GameRes.Formats.CatSystem return new GUI.CreateINTWidget(); } - uint? QueryEncryptionInfo () + uint? QueryEncryptionInfo (string arc_name) { + var title = FormatCatalog.Instance.LookupGame (arc_name); + if (!string.IsNullOrEmpty (title) && KnownSchemes.ContainsKey (title)) + return KnownSchemes[title].Key; var options = Query (arcStrings.INTNotice); return options.EncryptionInfo.GetKey(); } diff --git a/ArcFormats/CatSystem/WidgetINT.xaml.cs b/ArcFormats/CatSystem/WidgetINT.xaml.cs index d1fc17bb..6f801928 100644 --- a/ArcFormats/CatSystem/WidgetINT.xaml.cs +++ b/ArcFormats/CatSystem/WidgetINT.xaml.cs @@ -86,7 +86,7 @@ namespace GameRes.Formats.GUI CheckPathExists = true, Multiselect = false, Title = arcStrings.INTChooseExe, - Filter = arcStrings.INTExeFiles+"|*.exe", + Filter = arcStrings.INTExeFiles+"|*.exe;*.bin", FilterIndex = 1, InitialDirectory = Directory.GetCurrentDirectory(), };