/[RomCheater]/trunk/Win32/Sojaner.MemoryScanner/PEData.cs
ViewVC logotype

Diff of /trunk/Win32/Sojaner.MemoryScanner/PEData.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 613 by william, Sat Jun 8 03:56:47 2013 UTC revision 614 by william, Sat Jun 8 04:15:41 2013 UTC
# Line 115  namespace Sojaner.MemoryScanner Line 115  namespace Sojaner.MemoryScanner
115      [StructLayout(LayoutKind.Sequential)]      [StructLayout(LayoutKind.Sequential)]
116      public struct IMAGE_DATA_DIRECTORY      public struct IMAGE_DATA_DIRECTORY
117      {      {
118          public UInt32 VirtualAddress;          public UInt32 _VirtualAddress;
119          public UInt32 Size;          public UInt32 _Size;
120            [Browsable(false)]
121            public UInt32 _VirtualStart { get { return _VirtualAddress; } }
122            public string VirtualStart { get { return string.Format("0x{0:x8}", _VirtualStart); } }
123            [Browsable(false)]
124            public UInt32 _VirtualEnd { get { return (_VirtualStart + _VirtualSize); } }
125            public string VirtualEnd { get { return string.Format("0x{0:x8}", _VirtualEnd); } }
126            [Browsable(false)]
127            public UInt32 _VirtualSize { get { return _Size; } }
128            public string VirtualSize { get { return string.Format("0x{0:x8}", _VirtualSize); } }
129    
130            public override string ToString()
131            {
132                return string.Format("{0}-{1} [{2}]", VirtualStart, VirtualEnd, VirtualSize);
133            }
134        }
135    
136        [TypeConverter(typeof(ExpandableObjectConverter))]
137        [StructLayout(LayoutKind.Sequential, Pack = 1)]
138        public struct DATA_DIRECTORIES
139        {
140            public IMAGE_DATA_DIRECTORY _ExportTable;
141            public IMAGE_DATA_DIRECTORY _ImportTable;
142            public IMAGE_DATA_DIRECTORY _ResourceTable;
143            public IMAGE_DATA_DIRECTORY _ExceptionTable;
144            public IMAGE_DATA_DIRECTORY _CertificateTable;
145            public IMAGE_DATA_DIRECTORY _BaseRelocationTable;
146            public IMAGE_DATA_DIRECTORY _Debug;
147            public IMAGE_DATA_DIRECTORY _Architecture;
148            public IMAGE_DATA_DIRECTORY _GlobalPtr;
149            public IMAGE_DATA_DIRECTORY _TLSTable;
150            public IMAGE_DATA_DIRECTORY _LoadConfigTable;
151            public IMAGE_DATA_DIRECTORY _BoundImport;
152            public IMAGE_DATA_DIRECTORY _IAT;
153            public IMAGE_DATA_DIRECTORY _DelayImportDescriptor;
154            public IMAGE_DATA_DIRECTORY _CLRRuntimeHeader;
155            public IMAGE_DATA_DIRECTORY _Reserved;
156    
157            // data directories
158            public IMAGE_DATA_DIRECTORY ExportTable { get { return _ExportTable; } }
159            public IMAGE_DATA_DIRECTORY ImportTable { get { return _ImportTable; } }
160            public IMAGE_DATA_DIRECTORY ResourceTable { get { return _ResourceTable; } }
161            public IMAGE_DATA_DIRECTORY ExceptionTable { get { return _ExceptionTable; } }
162            public IMAGE_DATA_DIRECTORY CertificateTable { get { return _CertificateTable; } }
163            public IMAGE_DATA_DIRECTORY BaseRelocationTable { get { return _BaseRelocationTable; } }
164            public IMAGE_DATA_DIRECTORY Debug { get { return _Debug; } }
165            public IMAGE_DATA_DIRECTORY Architecture { get { return _Architecture; } }
166            public IMAGE_DATA_DIRECTORY GlobalPtr { get { return _GlobalPtr; } }
167            public IMAGE_DATA_DIRECTORY TLSTable { get { return _TLSTable; } }
168            public IMAGE_DATA_DIRECTORY LoadConfigTable { get { return _LoadConfigTable; } }
169            public IMAGE_DATA_DIRECTORY BoundImport { get { return _BoundImport; } }
170            public IMAGE_DATA_DIRECTORY IAT { get { return _IAT; } }
171            public IMAGE_DATA_DIRECTORY DelayImportDescriptor { get { return _DelayImportDescriptor; } }
172            public IMAGE_DATA_DIRECTORY CLRRuntimeHeader { get { return _CLRRuntimeHeader; } }
173            public IMAGE_DATA_DIRECTORY Reserved { get { return _Reserved; } }
174    
175            private uint DataDirectoryCount { get { return 16; } }
176    
177            public override string ToString()
178            {
179                return string.Format("Cout: 0x{0}", DataDirectoryCount.ToString("X"));
180            }
181      }      }
182    
183      [TypeConverter(typeof(ExpandableObjectConverter))]      [TypeConverter(typeof(ExpandableObjectConverter))]
184      [StructLayout(LayoutKind.Sequential, Pack = 1)]      [StructLayout(LayoutKind.Sequential, Pack = 1)]
185      public struct IMAGE_OPTIONAL_HEADER32      public struct IMAGE_OPTIONAL_HEADER32
# Line 153  namespace Sojaner.MemoryScanner Line 215  namespace Sojaner.MemoryScanner
215          public UInt32 _LoaderFlags;          public UInt32 _LoaderFlags;
216          public UInt32 _NumberOfRvaAndSizes;          public UInt32 _NumberOfRvaAndSizes;
217    
218          public IMAGE_DATA_DIRECTORY _ExportTable;  
219          public IMAGE_DATA_DIRECTORY _ImportTable;          public DATA_DIRECTORIES _DATA_DIRECTORIES;
         public IMAGE_DATA_DIRECTORY _ResourceTable;  
         public IMAGE_DATA_DIRECTORY _ExceptionTable;  
         public IMAGE_DATA_DIRECTORY _CertificateTable;  
         public IMAGE_DATA_DIRECTORY _BaseRelocationTable;  
         public IMAGE_DATA_DIRECTORY _Debug;  
         public IMAGE_DATA_DIRECTORY _Architecture;  
         public IMAGE_DATA_DIRECTORY _GlobalPtr;  
         public IMAGE_DATA_DIRECTORY _TLSTable;  
         public IMAGE_DATA_DIRECTORY _LoadConfigTable;  
         public IMAGE_DATA_DIRECTORY _BoundImport;  
         public IMAGE_DATA_DIRECTORY _IAT;  
         public IMAGE_DATA_DIRECTORY _DelayImportDescriptor;  
         public IMAGE_DATA_DIRECTORY _CLRRuntimeHeader;  
         public IMAGE_DATA_DIRECTORY _Reserved;  
220    
221          public string Magic { get { return ((MagicType)_Magic).ToString(); } }          public string Magic { get { return ((MagicType)_Magic).ToString(); } }
222          public string MajorLinkerVersion { get { return string.Format("0x{0:x2}", _MajorLinkerVersion); } }          public string MajorLinkerVersion { get { return string.Format("0x{0:x2}", _MajorLinkerVersion); } }
# Line 208  namespace Sojaner.MemoryScanner Line 256  namespace Sojaner.MemoryScanner
256          public string LoaderFlags { get { return string.Format("0x{0:x8}", _LoaderFlags); } }          public string LoaderFlags { get { return string.Format("0x{0:x8}", _LoaderFlags); } }
257          public string NumberOfRvaAndSizes { get { return string.Format("0x{0:x8}", _NumberOfRvaAndSizes); } }          public string NumberOfRvaAndSizes { get { return string.Format("0x{0:x8}", _NumberOfRvaAndSizes); } }
258    
259            public DATA_DIRECTORIES DATA_DIRECTORIES { get { return _DATA_DIRECTORIES; } }
260    
261    
         // data directories  
         public IMAGE_DATA_DIRECTORY ExportTable { get { return _ExportTable; } }  
         public IMAGE_DATA_DIRECTORY ImportTable { get { return _ImportTable; } }  
         public IMAGE_DATA_DIRECTORY ResourceTable { get { return _ResourceTable; } }  
         public IMAGE_DATA_DIRECTORY ExceptionTable { get { return _ExceptionTable; } }  
         public IMAGE_DATA_DIRECTORY CertificateTable { get { return _CertificateTable; } }  
         public IMAGE_DATA_DIRECTORY BaseRelocationTable { get { return _BaseRelocationTable; } }  
         public IMAGE_DATA_DIRECTORY Debug { get { return _Debug; } }  
         public IMAGE_DATA_DIRECTORY Architecture { get { return _Architecture; } }  
         public IMAGE_DATA_DIRECTORY GlobalPtr { get { return _GlobalPtr; } }  
         public IMAGE_DATA_DIRECTORY TLSTable { get { return _TLSTable; } }  
         public IMAGE_DATA_DIRECTORY LoadConfigTable { get { return _LoadConfigTable; } }  
         public IMAGE_DATA_DIRECTORY BoundImport { get { return _BoundImport; } }  
         public IMAGE_DATA_DIRECTORY IAT { get { return _IAT; } }  
         public IMAGE_DATA_DIRECTORY DelayImportDescriptor { get { return _DelayImportDescriptor; } }  
         public IMAGE_DATA_DIRECTORY CLRRuntimeHeader { get { return _CLRRuntimeHeader; } }  
         public IMAGE_DATA_DIRECTORY Reserved { get { return _Reserved; } }  
262    
263          public override string ToString()          public override string ToString()
264          {          {
# Line 267  namespace Sojaner.MemoryScanner Line 300  namespace Sojaner.MemoryScanner
300          public UInt32 _LoaderFlags;          public UInt32 _LoaderFlags;
301          public UInt32 _NumberOfRvaAndSizes;          public UInt32 _NumberOfRvaAndSizes;
302    
303          public IMAGE_DATA_DIRECTORY _ExportTable;          public DATA_DIRECTORIES _DATA_DIRECTORIES;
         public IMAGE_DATA_DIRECTORY _ImportTable;  
         public IMAGE_DATA_DIRECTORY _ResourceTable;  
         public IMAGE_DATA_DIRECTORY _ExceptionTable;  
         public IMAGE_DATA_DIRECTORY _CertificateTable;  
         public IMAGE_DATA_DIRECTORY _BaseRelocationTable;  
         public IMAGE_DATA_DIRECTORY _Debug;  
         public IMAGE_DATA_DIRECTORY _Architecture;  
         public IMAGE_DATA_DIRECTORY _GlobalPtr;  
         public IMAGE_DATA_DIRECTORY _TLSTable;  
         public IMAGE_DATA_DIRECTORY _LoadConfigTable;  
         public IMAGE_DATA_DIRECTORY _BoundImport;  
         public IMAGE_DATA_DIRECTORY _IAT;  
         public IMAGE_DATA_DIRECTORY _DelayImportDescriptor;  
         public IMAGE_DATA_DIRECTORY _CLRRuntimeHeader;  
         public IMAGE_DATA_DIRECTORY _Reserved;  
304    
305    
306          public string Magic { get { return ((MagicType)_Magic).ToString(); } }          public string Magic { get { return ((MagicType)_Magic).ToString(); } }
# Line 323  namespace Sojaner.MemoryScanner Line 341  namespace Sojaner.MemoryScanner
341          public string LoaderFlags { get { return string.Format("0x{0:x8}", _LoaderFlags); } }          public string LoaderFlags { get { return string.Format("0x{0:x8}", _LoaderFlags); } }
342          public string NumberOfRvaAndSizes { get { return string.Format("0x{0:x8}", _NumberOfRvaAndSizes); } }          public string NumberOfRvaAndSizes { get { return string.Format("0x{0:x8}", _NumberOfRvaAndSizes); } }
343    
344          // data directories          public DATA_DIRECTORIES DATA_DIRECTORIES { get { return _DATA_DIRECTORIES; } }
345          public IMAGE_DATA_DIRECTORY ExportTable { get { return _ExportTable; } }  
         public IMAGE_DATA_DIRECTORY ImportTable { get { return _ImportTable; } }  
         public IMAGE_DATA_DIRECTORY ResourceTable { get { return _ResourceTable; } }  
         public IMAGE_DATA_DIRECTORY ExceptionTable { get { return _ExceptionTable; } }  
         public IMAGE_DATA_DIRECTORY CertificateTable { get { return _CertificateTable; } }  
         public IMAGE_DATA_DIRECTORY BaseRelocationTable { get { return _BaseRelocationTable; } }  
         public IMAGE_DATA_DIRECTORY Debug { get { return _Debug; } }  
         public IMAGE_DATA_DIRECTORY Architecture { get { return _Architecture; } }  
         public IMAGE_DATA_DIRECTORY GlobalPtr { get { return _GlobalPtr; } }  
         public IMAGE_DATA_DIRECTORY TLSTable { get { return _TLSTable; } }  
         public IMAGE_DATA_DIRECTORY LoadConfigTable { get { return _LoadConfigTable; } }  
         public IMAGE_DATA_DIRECTORY BoundImport { get { return _BoundImport; } }  
         public IMAGE_DATA_DIRECTORY IAT { get { return _IAT; } }  
         public IMAGE_DATA_DIRECTORY DelayImportDescriptor { get { return _DelayImportDescriptor; } }  
         public IMAGE_DATA_DIRECTORY CLRRuntimeHeader { get { return _CLRRuntimeHeader; } }  
         public IMAGE_DATA_DIRECTORY Reserved { get { return _Reserved; } }  
346    
347          public override string ToString()          public override string ToString()
348          {          {
# Line 460  namespace Sojaner.MemoryScanner Line 463  namespace Sojaner.MemoryScanner
463          IMAGE_SUBSYSTEM_XBOX = 14          IMAGE_SUBSYSTEM_XBOX = 14
464    
465      }      }
466        [Flags]
467      public enum DllCharacteristicsType : ushort      public enum DllCharacteristicsType : ushort
468      {      {
469          RES_0 = 0x0001,          RES_0 = 0x0001,

Legend:
Removed from v.613  
changed lines
  Added in v.614

  ViewVC Help
Powered by ViewVC 1.1.22