示例#1
0
        public override void read(BinaryReader br)
        {
            this.i3   = br.ReadInt32();
            this.uia1 = new uint[this.i3];
            this.sa1  = new string[this.i3];
            int[] array = new int[this.i3];

            for (int i = 0; i < this.i3; ++i)
            {
                this.uia1[i] = br.ReadUInt32();
            }

            for (int j = 0; j < this.i3; ++j)
            {
                array[j] = br.ReadInt32();
            }

            long position = br.BaseStream.Position;

            for (int k = 0; k < this.i3; ++k)
            {
                br.BaseStream.Seek(position + array[k], SeekOrigin.Begin);
                this.sa1[k] = UnknownAP.a(br);
            }
        }
示例#2
0
        public void am(RootRecord A_0, UnknownB0 A_1)
        {
            UnknownA8 a   = A_1.a(VLTOtherValue.TABLE_END) as UnknownA8;
            int       num = a.genht1[A_0.position].i2;

            A_1.ms1.Seek(num, SeekOrigin.Begin);
            BinaryReader a_ = new BinaryReader(A_1.ms1);

            this.genht1 = new Dictionary <uint, aclzz>(A_0.i3);
            for (int i = 0; i < A_0.i3; ++i)
            {
                UnknownDE.aclzz a2 = new UnknownDE.aclzz();
                a2.s1  = UnknownAP.a(a_);
                a2.i1  = A_0.ia1[i];
                a2.ui1 = JenkinsHash.getHash32(a2.s1);
                this.genht1.Add(a2.ui1, a2);
                HashTracker.addHashFromVLTDB(a2.s1);
            }
            this.genht2 = new Dictionary <uint, VLTClass>();
        }
示例#3
0
        public override void write(BinaryWriter bw)
        {
            int num = 0;

            bw.Write(this.i3);

            for (int i = 0; i < this.i3; ++i)
            {
                bw.Write(this.uia1[i]);
            }

            for (int j = 0; j < this.i3; ++j)
            {
                bw.Write(num);
                num += this.sa1[j].Length + 1;
            }

            for (int k = 0; k < this.i3; ++k)
            {
                UnknownAP.a(bw, this.sa1[k]);
            }
        }
示例#4
0
        public void a(Stream A_0, Stream A_1)
        {
            byte[] array = new byte[A_0.Length];
            A_0.Read(array, 0, array.Length);               // array.Length --> .vlt FileSize
            this.ms2       = new MemoryStream(array);
            this.genc0list = new List <UnknownC0>();
            BinaryReader a_ = new BinaryReader(this.ms2);
            UnknownC0    c;

            while ((c = this.a(a_)) != null)
            {
                this.genc0list.Add(c);
            }

            this.Trim();

            UnknownDH dh = this.a(VLTOtherValue.TABLE_START) as UnknownDH;

            for (int i = 0; i < dh.asa1.Length; ++i)
            {
                dh.asa1[i].b(a_);                   // TODO read vs b? b, DEFINITELY b
            }
            if (A_1 == null)
            {
                DirectoryInfo directoryInfo = new DirectoryInfo(this.directory);
                UnknownBA     ba            = this.a(VLTOtherValue.VLTMAGIC) as UnknownBA;
                string        text          = ba.sa1[1];
                FileInfo[]    files         = directoryInfo.GetFiles(text);
                if (files.Length == 0)
                {
                    throw new Exception("Required file " + text + " was not found.");
                }
                A_1   = new FileStream(files[0].FullName, FileMode.Open, FileAccess.ReadWrite);
                array = new byte[A_1.Length];
                A_1.Read(array, 0, array.Length);
                A_1.Close();
            }
            else
            {
                array = new byte[A_1.Length];
                A_1.Read(array, 0, array.Length);
            }
            this.ms1 = new MemoryStream(array);
            a_       = new BinaryReader(this.ms1);
            this.ms1.Seek(0L, SeekOrigin.Begin);
            c = this.a(a_);
            c.e1.seekToDataStart(this.ms1);
            if (c.e1.ce1 == VLTOtherValue.BINMAGIC)
            {
                long num = this.ms1.Position + c.e1.dataSize();
                while (this.ms1.Position < num)
                {
                    string text2 = UnknownAP.a(a_);
                    if (text2 != "")
                    {
                        HashTracker.addHashFromVLTDB(text2);
                    }
                }
            }
            UnknownA8 a = this.a(VLTOtherValue.TABLE_END) as UnknownA8;

            a.a(this.ms1);
        }