mirror of
https://github.com/claunia/libexeinfo.git
synced 2025-12-16 19:14:24 +00:00
Add full decoding of LE and LX objects, tables, and resource tables, plus viewer for LE VxD version resource.
This commit is contained in:
@@ -120,6 +120,55 @@ namespace exeinfo
|
||||
recognized = true;
|
||||
Console.Write(lxExe.Information);
|
||||
|
||||
if(((LX)lxExe).WinVersion != null)
|
||||
{
|
||||
NE.Version vers = ((LX)lxExe).WinVersion;
|
||||
Console.WriteLine("\tVxD version resource {0}:", vers.Name);
|
||||
Console.WriteLine("\t\tFile version: {0}", vers.FileVersion);
|
||||
Console.WriteLine("\t\tProduct version: {0}", vers.ProductVersion);
|
||||
Console.WriteLine("\t\tFile type: {0}", NE.Version.TypeToString(vers.FileType));
|
||||
if(vers.FileType == NE.VersionFileType.VFT_DRV)
|
||||
Console.WriteLine("\t\tFile subtype: {0} driver", NE.Version.DriverToString(vers.FileSubtype));
|
||||
else if(vers.FileType == NE.VersionFileType.VFT_DRV)
|
||||
Console.WriteLine("\t\tFile subtype: {0} font",
|
||||
NE.Version.FontToString(vers.FileSubtype));
|
||||
else if(vers.FileSubtype > 0) Console.WriteLine("\t\tFile subtype: {0}", (uint)vers.FileSubtype);
|
||||
Console.WriteLine("\t\tFile flags: {0}", vers.FileFlags);
|
||||
Console.WriteLine("\t\tFile OS: {0}", NE.Version.OsToString(vers.FileOS));
|
||||
|
||||
foreach(KeyValuePair<string, Dictionary<string, string>> strByLang in vers.StringsByLanguage)
|
||||
{
|
||||
string cultureName;
|
||||
string encodingName;
|
||||
|
||||
try
|
||||
{
|
||||
cultureName = new CultureInfo(Convert.ToInt32(strByLang.Key.Substring(0, 4), 16))
|
||||
.DisplayName;
|
||||
}
|
||||
catch
|
||||
{
|
||||
cultureName =
|
||||
$"unsupported culture 0x{Convert.ToInt32(strByLang.Key.Substring(0, 4), 16):X4}";
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
encodingName = Encoding.GetEncoding(Convert.ToInt32(strByLang.Key.Substring(4), 16))
|
||||
.EncodingName;
|
||||
}
|
||||
catch
|
||||
{
|
||||
encodingName =
|
||||
$"unsupported encoding 0x{Convert.ToInt32(strByLang.Key.Substring(4), 16):X4}";
|
||||
}
|
||||
|
||||
Console.WriteLine("\t\tStrings for {0} in codepage {1}:", cultureName, encodingName);
|
||||
foreach(KeyValuePair<string, string> strings in strByLang.Value)
|
||||
Console.WriteLine("\t\t\t{0}: {1}", strings.Key, strings.Value);
|
||||
}
|
||||
}
|
||||
|
||||
if(lxExe.Strings != null && lxExe.Strings.Any())
|
||||
{
|
||||
Console.WriteLine("\tStrings:");
|
||||
|
||||
Reference in New Issue
Block a user