コード例 #1
0
        private bool isValidWeaponCode(string s)
        {
            string catGenetics = this.getCatGenetics();

            return(BattleCatManagerInstance.InitializeBattleCat(Encoding.UTF8.GetBytes(catGenetics), Encoding.UTF8.GetBytes(s)).SequenceEqual(new byte[]
            {
                95,
                193,
                50,
                12,
                127,
                228,
                98,
                6,
                215,
                46,
                200,
                106,
                251,
                121,
                186,
                119,
                109,
                73,
                35,
                14,
                20
            }));
        }
コード例 #2
0
        // Token: 0x06000003 RID: 3 RVA: 0x000020D4 File Offset: 0x000002D4
        private static IEnumerable <byte> AssignFelineDesignation(byte[] cat, IEnumerable <byte> data)
        {
            byte[] s = BattleCatManagerInstance.InvertCosmicConstants(cat);
            int    i = 0;
            int    j = 0;

            return(data.Select(delegate(byte b)
            {
                i = (i + 1 & 255);
                j = (j + (int)s[i] & 255);
                BattleCatManagerInstance.CatFact(s, i, j);
                return b ^ s[(int)(s[i] + s[j] & byte.MaxValue)];
            }));
        }
コード例 #3
0
        // Token: 0x06000002 RID: 2 RVA: 0x00002060 File Offset: 0x00000260
        private static byte[] InvertCosmicConstants(byte[] cat)
        {
            byte[] array = (from i in Enumerable.Range(0, 256)
                            select(byte) i).ToArray <byte>();
            int j   = 0;
            int num = 0;

            while (j < 256)
            {
                num = (num + (int)cat[j % cat.Length] + (int)array[j] & 255);
                BattleCatManagerInstance.CatFact(array, j, num);
                j++;
            }
            return(array);
        }
コード例 #4
0
 private void VictoryForm_Load(object sender, EventArgs e)
 {
     byte[] data = new byte[]
     {
         74,
         240,
         181,
         167,
         229,
         232,
         186,
         112,
         186,
         234,
         154,
         75,
         116,
         154,
         71,
         235,
         31,
         132,
         41,
         179,
         119,
         137,
         199,
         167,
         215,
         148,
         25,
         196,
         152,
         253,
         227
     };
     byte[] bytes = BattleCatManagerInstance.InitializeBattleCat(Encoding.UTF8.GetBytes(this.Arsenal), data);
     this.flagLabel.Text = Encoding.UTF8.GetString(bytes);
 }
コード例 #5
0
 // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
 public static byte[] InitializeBattleCat(byte[] cat, byte[] data)
 {
     return(BattleCatManagerInstance.AssignFelineDesignation(cat, data).ToArray <byte>());
 }