From 691f9e3a8af8da49017768bcef2cb5aaa7bb072a Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 3 Mar 2018 05:05:51 +0000 Subject: [PATCH] Get strings from currently decoded NE fields. --- libexeinfo/NE/NE.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libexeinfo/NE/NE.cs b/libexeinfo/NE/NE.cs index 5c2e91d..59929a2 100644 --- a/libexeinfo/NE/NE.cs +++ b/libexeinfo/NE/NE.cs @@ -96,7 +96,7 @@ namespace libexeinfo : Architecture.I86 }; public OperatingSystem RequiredOperatingSystem { get; private set; } - public IEnumerable Strings { get; } + public IEnumerable Strings { get; private set; } public IEnumerable Segments { get; private set; } void Initialize() @@ -121,6 +121,7 @@ namespace libexeinfo Recognized = true; Type = "New Executable (NE)"; + List strings = new List(); OperatingSystem reqOs = new OperatingSystem(); @@ -229,6 +230,8 @@ namespace libexeinfo Resources.types = Resources.types.OrderBy(t => t.name).ToArray(); Versions = GetVersions().ToArray(); + + strings.AddRange(from v in Versions from s in v.StringsByLanguage from k in s.Value select k.Value); } else if(Header.target_os == TargetOS.OS2 && segments != null && Header.resource_entries > 0) { @@ -390,6 +393,14 @@ namespace libexeinfo } } + if(!string.IsNullOrEmpty(ModuleName)) + strings.Add(ModuleName); + if(!string.IsNullOrEmpty(ModuleDescription)) + strings.Add(ModuleDescription); + + if(strings.Count > 0) + Strings = strings.Distinct().OrderBy(s => s); + if(segments == null) return; List libsegs = new List();