SHARE
TWEET

Untitled

a guest Jan 18th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const int c_LinkerTimestampOffset = 8;
  2.    
  3. int secondsSince1970 = System.BitConverter.ToInt32(b, i + c_LinkerTimestampOffset);
  4.    
  5. typedef struct _IMAGE_FILE_HEADER {
  6.     WORD  Machine;
  7.     WORD  NumberOfSections;
  8.     DWORD TimeDateStamp;
  9.     DWORD PointerToSymbolTable;
  10.     DWORD NumberOfSymbols;
  11.     WORD  SizeOfOptionalHeader;
  12.     WORD  Characteristics;
  13. } IMAGE_FILE_HEADER, *PIMAGE_FILE_HEADER;
  14.    
  15. IMAGE_FILE_HEADER header;
  16. char* start = (char*)&header;
  17. char* field = (char*)(&header.TimeDateStamp);
  18. int diff = field - start;
  19.    
  20. typedef struct _IMAGE_NT_HEADERS {
  21.     DWORD Signature; //<- we need to skip this
  22.     IMAGE_FILE_HEADER FileHeader;
  23.     IMAGE_OPTIONAL_HEADER32 OptionalHeader;
  24. } IMAGE_NT_HEADERS32, *PIMAGE_NT_HEADERS32;
  25.    
  26. int secondsSince1970 = System.BitConverter.ToInt32(b, i + c_LinkerTimestampOffset);
  27.    
  28. public class IMAGE_FILE_HEADER
  29. {
  30.      public UInt16 Machine;
  31.      public UInt16 NumberOfSections;
  32.      public UInt32 TimeDateStamp;
  33.      public UInt32 PointerToSymbolTable;
  34.      public UInt32 NumberOfSymbols;
  35.      public UInt16 SizeOfOptionalHeader;
  36.      public UInt16 Characteristics;
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top