Esempio n. 1
0
        public void Run()
        {
            uint off0 = off;

            os.Position = off0;
            Trace.Assert(br.ReadUInt32() == 0x01524142);
            uint cx = br.ReadUInt32();

            UtReloc.Rel4(os, off0 + 8U, reloc);
            SortedDictionary <uint, object> dict = new SortedDictionary <uint, object>();

            for (uint x = 0; x < cx; x++)
            {
                os.Position = off0 + 16U * (1 + x);
                uint a0 = br.ReadUInt32();
                uint a1 = br.ReadUInt32();
                uint a2 = br.ReadUInt32();
                uint a3 = br.ReadUInt32();
                if (a3 != 0)
                {
                    UtReloc.Rel4(os, off0 + (uint)(16U * (1 + x) + 8), reloc);
                    if ((a0 & 0xFFFF) == 0x11)
                    {
                        uint off1 = off0 + a2;

                        if (dict.ContainsKey(off1) == false)
                        {
                            dict[off1] = null;

                            os.Position = off1;
                            Trace.Assert(br.ReadUInt32() == 0x01524142);
                            uint cy = br.ReadUInt32();
                            UtReloc.Rel4(os, off1 + 8U, reloc);
                            for (uint y = 0; y < cy; y++)
                            {
                                os.Position = off1 + 16U * (1 + y);
                                uint b0 = br.ReadUInt32();
                                uint b1 = br.ReadUInt32();
                                uint b2 = br.ReadUInt32();
                                uint b3 = br.ReadUInt32();
                                if (b3 != 0)
                                {
                                    UtReloc.Rel4(os, off1 + (uint)(16U * (1 + y) + 8), reloc);
                                    if ((b0 & 0xFFFF) == 0x09)
                                    {
                                        uint off2 = off1 + b2;
                                        ty09(off2);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 2
0
        public uint Run()
        {
            os.Position = off + 4;
            int cnt = br.ReadInt32();

            UtReloc.Rel4(os, off + 8, reloc);
            uint r = 0;

            for (int c = 0; c < cnt; c++)
            {
                os.Position = off + 16 * (1 + c);
                uint c00 = br.ReadUInt32();
                uint pos = UtReloc.Rel4(os, (uint)(off + 16 * (1 + c) + 8), reloc).oldVal;
                if (c00 == 0x04)
                {
                    r = ty04(pos);
                }
            }
            return(r);
        }