private byte[] GetRuntimeMain() { if (this.module.Kind != ModuleKind.Dll && this.module.Kind != ModuleKind.NetModule) { return(ImageWriter.GetSimpleString("_CorExeMain")); } return(ImageWriter.GetSimpleString("_CorDllMain")); }
private void WriteImportDirectory() { base.WriteUInt32(this.text_map.GetRVA(TextSegment.ImportDirectory) + 40u); base.WriteUInt32(0u); base.WriteUInt32(0u); base.WriteUInt32(this.text_map.GetRVA(TextSegment.ImportHintNameTable) + 14u); base.WriteUInt32(this.text_map.GetRVA(TextSegment.ImportAddressTable)); base.Advance(20); base.WriteUInt32(this.text_map.GetRVA(TextSegment.ImportHintNameTable)); this.MoveToRVA(TextSegment.ImportHintNameTable); base.WriteUInt16(0); base.WriteBytes(this.GetRuntimeMain()); base.WriteByte(0); base.WriteBytes(ImageWriter.GetSimpleString("mscoree.dll")); base.WriteUInt16(0); }