Exemple #1
0
        private static byte[] sub_403220(byte[] src)
        {
            byte[][] numArray = new byte[17][];
            numArray[0] = L1PakTools.sub_4032E0(src, L1PakTools.Map1);
            int index = 0;
            int a1    = 15;

            while (a1 >= 0)
            {
                numArray[index + 1] = L1PakTools.sub_403340(a1, numArray[index]);
                --a1;
                ++index;
            }
            return(L1PakTools.sub_4032E0(new byte[8]
            {
                numArray[16][4],
                numArray[16][5],
                numArray[16][6],
                numArray[16][7],
                numArray[16][0],
                numArray[16][1],
                numArray[16][2],
                numArray[16][3]
            }, L1PakTools.Map2));
        }
Exemple #2
0
        private static byte[] sub_4033B0(byte[] a1, int a2)
        {
            byte[] numArray = L1PakTools.sub_403450(a1);
            int    index    = a2 * 6;

            return(L1PakTools.sub_4035A0(L1PakTools.sub_403520(new byte[6]
            {
                (byte)((uint)numArray[0] ^ (uint)L1PakTools.Map5[index]),
                (byte)((uint)numArray[1] ^ (uint)L1PakTools.Map5[index + 1]),
                (byte)((uint)numArray[2] ^ (uint)L1PakTools.Map5[index + 2]),
                (byte)((uint)numArray[3] ^ (uint)L1PakTools.Map5[index + 3]),
                (byte)((uint)numArray[4] ^ (uint)L1PakTools.Map5[index + 4]),
                (byte)((uint)numArray[5] ^ (uint)L1PakTools.Map5[index + 5])
            })));
        }
Exemple #3
0
 private static byte[] sub_403340(int a1, byte[] a2)
 {
     byte[] a1_1 = new byte[4];
     Array.Copy((Array)a2, 4, (Array)a1_1, 0, 4);
     byte[] numArray = L1PakTools.sub_4033B0(a1_1, a1);
     return(new byte[8]
     {
         a2[4],
         a2[5],
         a2[6],
         a2[7],
         (byte)((uint)numArray[0] ^ (uint)a2[0]),
         (byte)((uint)numArray[1] ^ (uint)a2[1]),
         (byte)((uint)numArray[2] ^ (uint)a2[2]),
         (byte)((uint)numArray[3] ^ (uint)a2[3])
     });
 }
Exemple #4
0
        private static byte[] Coder(byte[] src, int index, bool IsEncode)
        {
            byte[] numArray = new byte[src.Length - index];
            if (L1PakTools.progressbar != null)
            {
                L1PakTools.progressbar.Maximum = src.Length;
                L1PakTools.progressbar.Value   = 0;
            }
            if (numArray.Length >= 8)
            {
                byte[] src1             = new byte[8];
                int    num              = numArray.Length / 8;
                int    destinationIndex = 0;
                for (; num > 0; --num)
                {
                    Array.Copy((Array)src, destinationIndex + index, (Array)src1, 0, 8);
                    if (IsEncode)
                    {
                        Array.Copy((Array)L1PakTools.sub_403160(src1), 0, (Array)numArray, destinationIndex, 8);
                    }
                    else
                    {
                        Array.Copy((Array)L1PakTools.sub_403220(src1), 0, (Array)numArray, destinationIndex, 8);
                    }
                    destinationIndex += 8;
                    if (L1PakTools.progressbar != null)
                    {
                        L1PakTools.progressbar.Increment(8);
                    }
                }
            }
            int length = numArray.Length % 8;

            if (length > 0)
            {
                int destinationIndex = numArray.Length - length;
                Array.Copy((Array)src, destinationIndex + index, (Array)numArray, destinationIndex, length);
            }
            if (L1PakTools.progressbar != null)
            {
                L1PakTools.progressbar.Value = src.Length;
            }
            return(numArray);
        }
Exemple #5
0
 public static L1PakTools.IndexRecord Decode_Index_FirstRecord(byte[] src)
 {
     byte[] src1 = new byte[36];
     Array.Copy((Array)src, (Array)src1, src1.Length);
     return(new L1PakTools.IndexRecord(L1PakTools.Decode(src1, 4), 0));
 }
Exemple #6
0
 public static byte[] Decode(byte[] src, int index)
 {
     return(L1PakTools.Coder(src, index, false));
 }
Exemple #7
0
 public static byte[] Encode(byte[] src, int index)
 {
     return(L1PakTools.Coder(src, index, true));
 }