Exemple #1
0
        public ImageDosHeaderVM(object owner, HexDocument doc, ulong startOffset)
            : base(owner)
        {
            this.magicVM    = new UInt16HexField(doc, Name, "e_magic", startOffset + 0);
            this.cblpVM     = new UInt16HexField(doc, Name, "e_cblp", startOffset + 2);
            this.cpVM       = new UInt16HexField(doc, Name, "e_cp", startOffset + 4);
            this.crlcVM     = new UInt16HexField(doc, Name, "e_crlc", startOffset + 6);
            this.cparhdrVM  = new UInt16HexField(doc, Name, "e_cparhdr", startOffset + 8);
            this.minallocVM = new UInt16HexField(doc, Name, "e_minalloc", startOffset + 0x0A);
            this.maxallocVM = new UInt16HexField(doc, Name, "e_maxalloc", startOffset + 0x0C);
            this.ssVM       = new UInt16HexField(doc, Name, "e_ss", startOffset + 0x0E);
            this.spVM       = new UInt16HexField(doc, Name, "e_sp", startOffset + 0x10);
            this.csumVM     = new UInt16HexField(doc, Name, "e_csum", startOffset + 0x12);
            this.ipVM       = new UInt16HexField(doc, Name, "e_ip", startOffset + 0x14);
            this.csVM       = new UInt16HexField(doc, Name, "e_cs", startOffset + 0x16);
            this.lfarlcVM   = new UInt16HexField(doc, Name, "e_lfarlc", startOffset + 0x18);
            this.ovnoVM     = new UInt16HexField(doc, Name, "e_ovno", startOffset + 0x1A);
            this.res_0VM    = new UInt16HexField(doc, Name, "e_res[0]", startOffset + 0x1C);
            this.res_1VM    = new UInt16HexField(doc, Name, "e_res[1]", startOffset + 0x1E);
            this.res_2VM    = new UInt16HexField(doc, Name, "e_res[2]", startOffset + 0x20);
            this.res_3VM    = new UInt16HexField(doc, Name, "e_res[3]", startOffset + 0x22);
            this.oemidVM    = new UInt16HexField(doc, Name, "e_oemid", startOffset + 0x24);
            this.oeminfoVM  = new UInt16HexField(doc, Name, "e_oeminfo", startOffset + 0x26);
            this.res2_0VM   = new UInt16HexField(doc, Name, "e_res2[0]", startOffset + 0x28);
            this.res2_1VM   = new UInt16HexField(doc, Name, "e_res2[1]", startOffset + 0x2A);
            this.res2_2VM   = new UInt16HexField(doc, Name, "e_res2[2]", startOffset + 0x2C);
            this.res2_3VM   = new UInt16HexField(doc, Name, "e_res2[3]", startOffset + 0x2E);
            this.res2_4VM   = new UInt16HexField(doc, Name, "e_res2[4]", startOffset + 0x30);
            this.res2_5VM   = new UInt16HexField(doc, Name, "e_res2[5]", startOffset + 0x32);
            this.res2_6VM   = new UInt16HexField(doc, Name, "e_res2[6]", startOffset + 0x34);
            this.res2_7VM   = new UInt16HexField(doc, Name, "e_res2[7]", startOffset + 0x36);
            this.res2_8VM   = new UInt16HexField(doc, Name, "e_res2[8]", startOffset + 0x38);
            this.res2_9VM   = new UInt16HexField(doc, Name, "e_res2[9]", startOffset + 0x3A);
            this.lfanewVM   = new Int32HexField(doc, Name, "e_lfanew", startOffset + 0x3C);

            this.hexFields = new HexField[] {
                magicVM,
                cblpVM,
                cpVM,
                crlcVM,
                cparhdrVM,
                minallocVM,
                maxallocVM,
                ssVM,
                spVM,
                csumVM,
                ipVM,
                csVM,
                lfarlcVM,
                ovnoVM,
                res_0VM,
                res_1VM,
                res_2VM,
                res_3VM,
                oemidVM,
                oeminfoVM,
                res2_0VM,
                res2_1VM,
                res2_2VM,
                res2_3VM,
                res2_4VM,
                res2_5VM,
                res2_6VM,
                res2_7VM,
                res2_8VM,
                res2_9VM,
                lfanewVM,
            };
        }
Exemple #2
0
        public ImageDosHeaderVM(object owner, HexBuffer buffer, HexPosition startOffset)
            : base(owner)
        {
            MagicVM    = new UInt16HexField(buffer, Name, "e_magic", startOffset + 0);
            CblpVM     = new UInt16HexField(buffer, Name, "e_cblp", startOffset + 2);
            CpVM       = new UInt16HexField(buffer, Name, "e_cp", startOffset + 4);
            CrlcVM     = new UInt16HexField(buffer, Name, "e_crlc", startOffset + 6);
            CparhdrVM  = new UInt16HexField(buffer, Name, "e_cparhdr", startOffset + 8);
            MinallocVM = new UInt16HexField(buffer, Name, "e_minalloc", startOffset + 0x0A);
            MaxallocVM = new UInt16HexField(buffer, Name, "e_maxalloc", startOffset + 0x0C);
            SsVM       = new UInt16HexField(buffer, Name, "e_ss", startOffset + 0x0E);
            SpVM       = new UInt16HexField(buffer, Name, "e_sp", startOffset + 0x10);
            CsumVM     = new UInt16HexField(buffer, Name, "e_csum", startOffset + 0x12);
            IpVM       = new UInt16HexField(buffer, Name, "e_ip", startOffset + 0x14);
            CsVM       = new UInt16HexField(buffer, Name, "e_cs", startOffset + 0x16);
            LfarlcVM   = new UInt16HexField(buffer, Name, "e_lfarlc", startOffset + 0x18);
            OvnoVM     = new UInt16HexField(buffer, Name, "e_ovno", startOffset + 0x1A);
            Res_0VM    = new UInt16HexField(buffer, Name, "e_res[0]", startOffset + 0x1C);
            Res_1VM    = new UInt16HexField(buffer, Name, "e_res[1]", startOffset + 0x1E);
            Res_2VM    = new UInt16HexField(buffer, Name, "e_res[2]", startOffset + 0x20);
            Res_3VM    = new UInt16HexField(buffer, Name, "e_res[3]", startOffset + 0x22);
            OemidVM    = new UInt16HexField(buffer, Name, "e_oemid", startOffset + 0x24);
            OeminfoVM  = new UInt16HexField(buffer, Name, "e_oeminfo", startOffset + 0x26);
            Res2_0VM   = new UInt16HexField(buffer, Name, "e_res2[0]", startOffset + 0x28);
            Res2_1VM   = new UInt16HexField(buffer, Name, "e_res2[1]", startOffset + 0x2A);
            Res2_2VM   = new UInt16HexField(buffer, Name, "e_res2[2]", startOffset + 0x2C);
            Res2_3VM   = new UInt16HexField(buffer, Name, "e_res2[3]", startOffset + 0x2E);
            Res2_4VM   = new UInt16HexField(buffer, Name, "e_res2[4]", startOffset + 0x30);
            Res2_5VM   = new UInt16HexField(buffer, Name, "e_res2[5]", startOffset + 0x32);
            Res2_6VM   = new UInt16HexField(buffer, Name, "e_res2[6]", startOffset + 0x34);
            Res2_7VM   = new UInt16HexField(buffer, Name, "e_res2[7]", startOffset + 0x36);
            Res2_8VM   = new UInt16HexField(buffer, Name, "e_res2[8]", startOffset + 0x38);
            Res2_9VM   = new UInt16HexField(buffer, Name, "e_res2[9]", startOffset + 0x3A);
            LfanewVM   = new Int32HexField(buffer, Name, "e_lfanew", startOffset + 0x3C);

            hexFields = new HexField[] {
                MagicVM,
                CblpVM,
                CpVM,
                CrlcVM,
                CparhdrVM,
                MinallocVM,
                MaxallocVM,
                SsVM,
                SpVM,
                CsumVM,
                IpVM,
                CsVM,
                LfarlcVM,
                OvnoVM,
                Res_0VM,
                Res_1VM,
                Res_2VM,
                Res_3VM,
                OemidVM,
                OeminfoVM,
                Res2_0VM,
                Res2_1VM,
                Res2_2VM,
                Res2_3VM,
                Res2_4VM,
                Res2_5VM,
                Res2_6VM,
                Res2_7VM,
                Res2_8VM,
                Res2_9VM,
                LfanewVM,
            };
        }
		public ImageDosHeaderVM(object owner, HexBuffer buffer, HexPosition startOffset)
			: base(owner) {
			MagicVM = new UInt16HexField(buffer, Name, "e_magic", startOffset + 0);
			CblpVM = new UInt16HexField(buffer, Name, "e_cblp", startOffset + 2);
			CpVM = new UInt16HexField(buffer, Name, "e_cp", startOffset + 4);
			CrlcVM = new UInt16HexField(buffer, Name, "e_crlc", startOffset + 6);
			CparhdrVM = new UInt16HexField(buffer, Name, "e_cparhdr", startOffset + 8);
			MinallocVM = new UInt16HexField(buffer, Name, "e_minalloc", startOffset + 0x0A);
			MaxallocVM = new UInt16HexField(buffer, Name, "e_maxalloc", startOffset + 0x0C);
			SsVM = new UInt16HexField(buffer, Name, "e_ss", startOffset + 0x0E);
			SpVM = new UInt16HexField(buffer, Name, "e_sp", startOffset + 0x10);
			CsumVM = new UInt16HexField(buffer, Name, "e_csum", startOffset + 0x12);
			IpVM = new UInt16HexField(buffer, Name, "e_ip", startOffset + 0x14);
			CsVM = new UInt16HexField(buffer, Name, "e_cs", startOffset + 0x16);
			LfarlcVM = new UInt16HexField(buffer, Name, "e_lfarlc", startOffset + 0x18);
			OvnoVM = new UInt16HexField(buffer, Name, "e_ovno", startOffset + 0x1A);
			Res_0VM = new UInt16HexField(buffer, Name, "e_res[0]", startOffset + 0x1C);
			Res_1VM = new UInt16HexField(buffer, Name, "e_res[1]", startOffset + 0x1E);
			Res_2VM = new UInt16HexField(buffer, Name, "e_res[2]", startOffset + 0x20);
			Res_3VM = new UInt16HexField(buffer, Name, "e_res[3]", startOffset + 0x22);
			OemidVM = new UInt16HexField(buffer, Name, "e_oemid", startOffset + 0x24);
			OeminfoVM = new UInt16HexField(buffer, Name, "e_oeminfo", startOffset + 0x26);
			Res2_0VM = new UInt16HexField(buffer, Name, "e_res2[0]", startOffset + 0x28);
			Res2_1VM = new UInt16HexField(buffer, Name, "e_res2[1]", startOffset + 0x2A);
			Res2_2VM = new UInt16HexField(buffer, Name, "e_res2[2]", startOffset + 0x2C);
			Res2_3VM = new UInt16HexField(buffer, Name, "e_res2[3]", startOffset + 0x2E);
			Res2_4VM = new UInt16HexField(buffer, Name, "e_res2[4]", startOffset + 0x30);
			Res2_5VM = new UInt16HexField(buffer, Name, "e_res2[5]", startOffset + 0x32);
			Res2_6VM = new UInt16HexField(buffer, Name, "e_res2[6]", startOffset + 0x34);
			Res2_7VM = new UInt16HexField(buffer, Name, "e_res2[7]", startOffset + 0x36);
			Res2_8VM = new UInt16HexField(buffer, Name, "e_res2[8]", startOffset + 0x38);
			Res2_9VM = new UInt16HexField(buffer, Name, "e_res2[9]", startOffset + 0x3A);
			LfanewVM = new Int32HexField(buffer, Name, "e_lfanew", startOffset + 0x3C);

			hexFields = new HexField[] {
				MagicVM,
				CblpVM,
				CpVM,
				CrlcVM,
				CparhdrVM,
				MinallocVM,
				MaxallocVM,
				SsVM,
				SpVM,
				CsumVM,
				IpVM,
				CsVM,
				LfarlcVM,
				OvnoVM,
				Res_0VM,
				Res_1VM,
				Res_2VM,
				Res_3VM,
				OemidVM,
				OeminfoVM,
				Res2_0VM,
				Res2_1VM,
				Res2_2VM,
				Res2_3VM,
				Res2_4VM,
				Res2_5VM,
				Res2_6VM,
				Res2_7VM,
				Res2_8VM,
				Res2_9VM,
				LfanewVM,
			};
		}
Exemple #4
0
		public ImageDosHeaderVM(object owner, HexDocument doc, ulong startOffset)
			: base(owner) {
			this.magicVM = new UInt16HexField(doc, Name, "e_magic", startOffset + 0);
			this.cblpVM = new UInt16HexField(doc, Name, "e_cblp", startOffset + 2);
			this.cpVM = new UInt16HexField(doc, Name, "e_cp", startOffset + 4);
			this.crlcVM = new UInt16HexField(doc, Name, "e_crlc", startOffset + 6);
			this.cparhdrVM = new UInt16HexField(doc, Name, "e_cparhdr", startOffset + 8);
			this.minallocVM = new UInt16HexField(doc, Name, "e_minalloc", startOffset + 0x0A);
			this.maxallocVM = new UInt16HexField(doc, Name, "e_maxalloc", startOffset + 0x0C);
			this.ssVM = new UInt16HexField(doc, Name, "e_ss", startOffset + 0x0E);
			this.spVM = new UInt16HexField(doc, Name, "e_sp", startOffset + 0x10);
			this.csumVM = new UInt16HexField(doc, Name, "e_csum", startOffset + 0x12);
			this.ipVM = new UInt16HexField(doc, Name, "e_ip", startOffset + 0x14);
			this.csVM = new UInt16HexField(doc, Name, "e_cs", startOffset + 0x16);
			this.lfarlcVM = new UInt16HexField(doc, Name, "e_lfarlc", startOffset + 0x18);
			this.ovnoVM = new UInt16HexField(doc, Name, "e_ovno", startOffset + 0x1A);
			this.res_0VM = new UInt16HexField(doc, Name, "e_res[0]", startOffset + 0x1C);
			this.res_1VM = new UInt16HexField(doc, Name, "e_res[1]", startOffset + 0x1E);
			this.res_2VM = new UInt16HexField(doc, Name, "e_res[2]", startOffset + 0x20);
			this.res_3VM = new UInt16HexField(doc, Name, "e_res[3]", startOffset + 0x22);
			this.oemidVM = new UInt16HexField(doc, Name, "e_oemid", startOffset + 0x24);
			this.oeminfoVM = new UInt16HexField(doc, Name, "e_oeminfo", startOffset + 0x26);
			this.res2_0VM = new UInt16HexField(doc, Name, "e_res2[0]", startOffset + 0x28);
			this.res2_1VM = new UInt16HexField(doc, Name, "e_res2[1]", startOffset + 0x2A);
			this.res2_2VM = new UInt16HexField(doc, Name, "e_res2[2]", startOffset + 0x2C);
			this.res2_3VM = new UInt16HexField(doc, Name, "e_res2[3]", startOffset + 0x2E);
			this.res2_4VM = new UInt16HexField(doc, Name, "e_res2[4]", startOffset + 0x30);
			this.res2_5VM = new UInt16HexField(doc, Name, "e_res2[5]", startOffset + 0x32);
			this.res2_6VM = new UInt16HexField(doc, Name, "e_res2[6]", startOffset + 0x34);
			this.res2_7VM = new UInt16HexField(doc, Name, "e_res2[7]", startOffset + 0x36);
			this.res2_8VM = new UInt16HexField(doc, Name, "e_res2[8]", startOffset + 0x38);
			this.res2_9VM = new UInt16HexField(doc, Name, "e_res2[9]", startOffset + 0x3A);
			this.lfanewVM = new Int32HexField(doc, Name, "e_lfanew", startOffset + 0x3C);

			this.hexFields = new HexField[] {
				magicVM,
				cblpVM,
				cpVM,
				crlcVM,
				cparhdrVM,
				minallocVM,
				maxallocVM,
				ssVM,
				spVM,
				csumVM,
				ipVM,
				csVM,
				lfarlcVM,
				ovnoVM,
				res_0VM,
				res_1VM,
				res_2VM,
				res_3VM,
				oemidVM,
				oeminfoVM,
				res2_0VM,
				res2_1VM,
				res2_2VM,
				res2_3VM,
				res2_4VM,
				res2_5VM,
				res2_6VM,
				res2_7VM,
				res2_8VM,
				res2_9VM,
				lfanewVM,
			};
		}