Esempio n. 1
0
        void Decompile(PEDocumentNode node)
        {
            decompiler.WriteCommentLine(output, node.Document.Filename);
            var peImage = node.Document.PEImage;

            if (!(peImage is null))
            {
                var  timestampLine = dnSpy_Resources.Decompile_Timestamp + " ";
                uint ts            = peImage.ImageNTHeaders.FileHeader.TimeDateStamp;
                if ((int)ts > 0)
                {
                    var date       = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(ts).ToLocalTime();
                    var dateString = date.ToString(CultureInfo.CurrentUICulture.DateTimeFormat);
                    timestampLine += $"{ts:X8} ({dateString})";
                }
                else
                {
                    timestampLine += $"{dnSpy_Resources.UnknownValue} ({ts:X8})";
                }
                decompiler.WriteCommentLine(output, timestampLine);
            }
        }
Esempio n. 2
0
 void Decompile(PEDocumentNode node) => decompiler.WriteCommentLine(output, node.Document.Filename);