Example #1
0
 public void Test(uint fnumber)
 {
     this.Fnumber = fnumber;
     this.GetFilename(fnumber);
     this.Filehash    = Helpers.InvertUint32(Calculation.GetHash(this.Filename));
     this.PkgEntry    = this._pkgStream.PkgEntryList[(int)fnumber];
     this.PkgFileType = FileClassification.SetD2Filetype(this.PkgEntry);
     this.GetBlockEntries();
 }
Example #2
0
 public PkgFile(PkgStream pkgStream, uint fnumber)
 {
     this.Fnumber    = fnumber;
     this._pkgStream = pkgStream;
     this.GetPkgFile();
     this.GetFilename(fnumber);
     this.Filehash    = Helpers.InvertUint32(Calculation.GetHash(this.Filename));
     this.PkgEntry    = this._pkgStream.PkgEntryList[(int)fnumber];
     this.Nonce       = pkgStream.Nonce;
     this.PackageId   = pkgStream.Header.PackageId;
     this.LangId      = pkgStream.Header.LangId;
     this.PkgFileType = FileClassification.SetD2Filetype(this.PkgEntry);
     this.GetBlockEntries();
 }
Example #3
0
        public void StartProcess()
        {
            while (this._state != 0xA && this._state != -1)
            {
                try
                {
                    switch (this._state)
                    {
                    case 0:
                        this.GetPkgEntry();
                        this._state = 1;
                        break;

                    case 1:
                        this.PkgFileType = FileClassification.SetD2Filetype(this.PkgEntry);
                        this._state      = 2;
                        break;

                    case 2:
                        this.GetBlockEntries();
                        this._state = 3;
                        break;

                    case 3:
                        this.MakeNonce(this._pkgStream.Header.PackageId);
                        this._state = 4;
                        break;

                    case 4:
                        this.GetPackageId();
                        this._state = 5;
                        break;

                    case 5:
                        this.GetLangId();
                        this._state = 7;
                        break;

                    case 7:
                        this._state = 0xA;
                        break;
                    }
                }
                catch (Exception)
                {
                    this._state = -1;
                }
            }
        }