1 write to image
Mono.Cecil (1)
Mono.Cecil.PE\ImageReader.cs (1)
35
image
= new Image ();
57 references to image
Mono.Cecil (57)
Mono.Cecil.PE\ImageReader.cs (57)
36
image
.Stream = stream;
37
image
.FileName = file_name;
42
BaseStream.Position =
image
.ResolveVirtualAddress (directory.VirtualAddress);
70
image
.Architecture = ReadArchitecture ();
76
image
.Timestamp = ReadUInt32 ();
92
image
.Characteristics = characteristics;
93
image
.Kind = GetModuleKind (characteristics, subsystem);
94
image
.DllCharacteristics = (ModuleCharacteristics) dll_characteristics;
123
image
.LinkerVersion = ReadUInt16 ();
144
image
.SubSystemMajor = ReadUInt16 ();
145
image
.SubSystemMinor = ReadUInt16 ();
174
image
.Win32Resources = ReadDataDirectory ();
183
image
.Debug = ReadDataDirectory ();
267
image
.Sections = sections;
284
image
.Attributes = (ModuleAttributes) ReadUInt32 ();
286
image
.EntryPointToken = ReadUInt32 ();
288
image
.Resources = ReadDataDirectory ();
290
image
.StrongName = ReadDataDirectory ();
309
image
.RuntimeVersion = ReadZeroTerminatedString (ReadInt32 ());
316
var section =
image
.GetSectionAtVirtualAddress (metadata.VirtualAddress);
320
image
.MetadataSection = section;
325
if (
image
.PdbHeap != null)
328
if (
image
.TableHeap != null)
334
if (
image
.Debug.IsZero) {
335
image
.DebugHeader = new ImageDebugHeader (Empty<ImageDebugHeaderEntry>.Array);
339
MoveTo (
image
.Debug);
341
var entries = new ImageDebugHeaderEntry [(int)
image
.Debug.Size / ImageDebugDirectory.Size];
370
image
.DebugHeader = new ImageDebugHeader (entries);
387
image
.TableHeap = new TableHeap (data);
391
image
.StringHeap = new StringHeap (data);
394
image
.BlobHeap = new BlobHeap (data);
397
image
.GuidHeap = new GuidHeap (data);
400
image
.UserStringHeap = new UserStringHeap (data);
403
image
.PdbHeap = new PdbHeap (data);
412
MoveTo (offset +
image
.MetadataSection.PointerToRawData);
421
var heap =
image
.TableHeap;
423
MoveTo (table_heap_offset +
image
.MetadataSection.PointerToRawData);
442
if (
image
.PdbHeap != null) {
444
if (!
image
.PdbHeap.HasTable ((Table) i))
447
heap.Tables [i].Length =
image
.PdbHeap.TypeSystemTableRows [i];
458
SetIndexSize (
image
.StringHeap, sizes, 0x1);
459
SetIndexSize (
image
.GuidHeap, sizes, 0x2);
460
SetIndexSize (
image
.BlobHeap, sizes, 0x4);
475
return
image
.GetTableIndexSize (table);
480
return
image
.GetCodedIndexSize (index);
485
uint offset = (uint) BaseStream.Position - table_heap_offset -
image
.MetadataSection.PointerToRawData; // header
487
int stridx_size =
image
.StringHeap != null ?
image
.StringHeap.IndexSize : 2;
488
int guididx_size =
image
.GuidHeap != null ?
image
.GuidHeap.IndexSize : 2;
489
int blobidx_size =
image
.BlobHeap != null ?
image
.BlobHeap.IndexSize : 2;
491
var heap =
image
.TableHeap;
744
var heap =
image
.PdbHeap;
767
return reader.
image
;
779
reader.
image
.Sections = new[] {
791
return reader.
image
;