예제 #1
0
        int IComparer.Compare(object A_0, object A_1)
        {
            string strA = Class321.smethod_0((string)A_0);
            string strB = Class321.smethod_0((string)A_1);

            return(string.CompareOrdinal(strA, strB));
        }
        // Token: 0x06001E3A RID: 7738 RVA: 0x00061D90 File Offset: 0x0005FF90
        private static void smethod_2(Class321 pd, BinaryWriter write_stream, uint add_length, byte[] add_buffer, uint copy_length, uint copy_pos)
        {
            if (add_length == 0U && copy_length == 0U)
            {
                return;
            }
            uint num = 0U;

            while (add_length > 65535U)
            {
                Class292.smethod_1(write_stream, 65535U, add_buffer, num);
                num        += 65535U;
                add_length -= 65535U;
                Class292.smethod_0(pd, write_stream, 0U, 0U);
            }
            Class292.smethod_1(write_stream, add_length, add_buffer, num);
            while (copy_length > 65535U)
            {
                Class292.smethod_0(pd, write_stream, 65535U, copy_pos);
                copy_pos    += 65535U;
                copy_length -= 65535U;
                Class292.smethod_1(write_stream, 0U, null, 0U);
            }
            Class292.smethod_0(pd, write_stream, copy_length, copy_pos);
        }
 // Token: 0x06001E3C RID: 7740 RVA: 0x00061EAC File Offset: 0x000600AC
 public static void smethod_4(Class321 pd, BinaryWriter write_stream, uint add_length, byte[] add_buffer, uint start_pos, uint copy_length, uint copy_pos)
 {
     if (add_length != 0U)
     {
         if (pd.uint_3 != 0U)
         {
             Class292.smethod_3(pd, write_stream);
         }
         byte[] array = new byte[add_length];
         Array.Copy(add_buffer, (long)((ulong)start_pos), array, 0L, (long)((ulong)add_length));
         pd.queue_0.Enqueue(array);
     }
     if (copy_length != 0U)
     {
         if (pd.uint_3 == 0U)
         {
             pd.uint_4 = copy_pos;
             pd.uint_3 = copy_length;
             return;
         }
         if (pd.uint_4 + pd.uint_3 == copy_pos)
         {
             pd.uint_3 += copy_length;
             return;
         }
         Class292.smethod_3(pd, write_stream);
         pd.uint_4 = copy_pos;
         pd.uint_3 = copy_length;
     }
 }
        // Token: 0x06001E44 RID: 7748 RVA: 0x00062274 File Offset: 0x00060474
        public static void smethod_12(Class321 pd, Enum81 type, BinaryWriter write_stream, uint offset_orig, uint offset_new, Stream stream_orig, Stream stream_new)
        {
            switch (type)
            {
            case Enum81.const_1:
                if (!Class136.smethod_3(stream_orig, stream_new))
                {
                    type = Enum81.const_0;
                }
                break;

            case Enum81.const_2:
                if (!Class132.smethod_1(stream_orig, stream_new))
                {
                    type = Enum81.const_0;
                }
                break;
            }
            switch (type)
            {
            case Enum81.const_1:
                Class136.smethod_0(pd, write_stream, offset_orig, offset_new, stream_orig, stream_new);
                return;

            case Enum81.const_2:
                Class132.smethod_2(pd, write_stream, offset_orig, offset_new, stream_orig, stream_new);
                return;

            default:
                Class292.smethod_11(pd, write_stream, offset_orig, stream_orig, stream_new);
                return;
            }
        }
        // Token: 0x06001E38 RID: 7736 RVA: 0x00061D5C File Offset: 0x0005FF5C
        private static void smethod_0(Class321 pd, BinaryWriter write_stream, uint length, uint copy_pos)
        {
            int value = (int)(copy_pos - pd.uint_5);

            write_stream.Write((ushort)length);
            if (length != 0U)
            {
                write_stream.Write(value);
                pd.uint_5 = copy_pos + length;
            }
        }
예제 #6
0
        public TexExplorer(string string_2)
        {
            this.InitializeComponent();
            this.string_0 = string_2;
            base.Closed  += new EventHandler(this.TexExplorer_Closed);
            this.Text     = "Texture Explorer - LOOKING FOR TEXTURES (PLEASE WAIT!)";
            Class321 @class = new Class321(this.string_0);

            @class.method_1(new Class321.Delegate9(this.UpdateSearchText));
            @class.method_0(new Class321.Delegate8(this.method_1));
            this.thread_0 = new Thread(new ThreadStart(@class.method_2));
            this.thread_0.Start();
        }
        // Token: 0x06001E43 RID: 7747 RVA: 0x00062160 File Offset: 0x00060360
        private static void smethod_11(Class321 pd, BinaryWriter write_stream, uint offset_orig, Stream stream_orig, Stream stream_new)
        {
            uint num  = (uint)stream_orig.Length;
            uint num2 = (uint)stream_new.Length;

            stream_orig.Position = 0L;
            stream_new.Position  = 0L;
            byte[] array  = new byte[num];
            byte[] array2 = new byte[num2];
            stream_orig.smethod_6(array);
            stream_new.smethod_6(array2);
            uint[] link_table = new uint[num];
            if (pd.uint_6 == null)
            {
                pd.uint_6 = new uint[16777216];
            }
            Class292.smethod_10(array, num, pd.uint_6, link_table);
            uint num3 = 0U;
            uint num4 = 0U;

            if (num2 >= 9U)
            {
                while (num3 < num2 - 9U)
                {
                    uint   num5 = 0U;
                    ushort num6 = 0;
                    Class292.smethod_6(num3, ref num5, ref num6, pd.uint_6, link_table, array, num, array2, num2);
                    if (num6 < 9)
                    {
                        num3 += 1U;
                    }
                    else
                    {
                        int add_length = (int)(num3 - num4);
                        Class292.smethod_4(pd, write_stream, (uint)add_length, array2, num4, (uint)num6, num5 + offset_orig);
                        num3 += (uint)num6;
                        num4  = num3;
                    }
                }
            }
            if (num4 != num2)
            {
                uint num7 = num2 - num4;
                Class292.smethod_4(pd, write_stream, num7, array2, num4, 0U, 0U);
                num4 += num7;
            }
        }
예제 #8
0
        // Token: 0x0600243F RID: 9279 RVA: 0x0007AE64 File Offset: 0x00079064
        private static void smethod_1(Class321 pd, BinaryWriter write_stream, uint offset_orig, uint offset_new, string filename, Stream stream_orig, uint orig_start, uint orig_end, Stream stream_new, uint new_start, uint new_end)
        {
            uint num  = new_end - new_start;
            uint num2 = orig_end - orig_start;

            using (Stream3 stream = new Stream3(stream_orig, (long)((ulong)orig_start), (long)((ulong)orig_end)))
            {
                using (Stream3 stream2 = new Stream3(stream_new, (long)((ulong)new_start), (long)((ulong)new_end)))
                {
                    if (num == num2 && Struct43.smethod_5(stream.smethod_2(), stream2.smethod_2()))
                    {
                        Class292.smethod_4(pd, write_stream, 0U, null, 0U, num2, offset_orig + orig_start);
                    }
                    else
                    {
                        Class292.smethod_12(pd, Class292.smethod_15(filename), write_stream, offset_orig + orig_start, offset_new + new_start, stream, stream2);
                    }
                }
            }
        }
예제 #9
0
 // Token: 0x0600243E RID: 9278 RVA: 0x0007AC18 File Offset: 0x00078E18
 public static void smethod_0(Class321 pd, BinaryWriter write_stream, uint offset_orig, uint offset_new, Stream stream_orig, Stream stream_new)
 {
     using (Stream3 stream = new Stream3(stream_orig))
     {
         using (Stream3 stream2 = new Stream3(stream_new))
         {
             using (Class136 @class = new Class136(stream))
             {
                 using (Class136 class2 = new Class136(stream2))
                 {
                     List <KeyValuePair <string, Class136.Class339> > list  = new List <KeyValuePair <string, Class136.Class339> >();
                     List <KeyValuePair <string, Class136.Class339> > list2 = null;
                     long endPosition;
                     class2.method_9(ref list, out endPosition);
                     long endPosition2;
                     @class.method_9(ref list2, out endPosition2);
                     using (Stream3 stream3 = new Stream3(stream, 0L, endPosition2))
                     {
                         using (Stream3 stream4 = new Stream3(stream2, 0L, endPosition))
                         {
                             Class292.smethod_12(pd, Enum81.const_0, write_stream, offset_orig, offset_new, stream3, stream4);
                         }
                     }
                     foreach (KeyValuePair <string, Class136.Class339> keyValuePair in list)
                     {
                         if (@class.method_6(keyValuePair.Key))
                         {
                             Class136.Class339 class3 = @class[keyValuePair.Key] as Class136.Class339;
                             Class136.smethod_1(pd, write_stream, offset_orig, offset_new, keyValuePair.Key, stream, class3.uint_4, class3.uint_4 + class3.DataLength, stream2, keyValuePair.Value.uint_4, keyValuePair.Value.uint_4 + keyValuePair.Value.DataLength);
                         }
                         else
                         {
                             class2.method_15(keyValuePair.Value);
                             Class292.smethod_4(pd, write_stream, keyValuePair.Value.DataLength, keyValuePair.Value.Data, 0U, 0U, 0U);
                         }
                     }
                 }
             }
         }
     }
 }
 // Token: 0x06001E48 RID: 7752 RVA: 0x000623E0 File Offset: 0x000605E0
 private static void smethod_16(Stream stream_orig, Stream stream_new, Stream stream_patch, Enum81 type)
 {
     using (Stream3 stream = new Stream3(stream_orig))
     {
         using (Stream3 stream2 = new Stream3(stream_new))
         {
             using (Stream3 stream3 = new Stream3(stream_patch))
             {
                 using (BinaryWriter binaryWriter = new BinaryWriter(stream3))
                 {
                     Class292.smethod_7(binaryWriter, stream, stream2);
                     Class321 @class = new Class321();
                     Class292.smethod_12(@class, type, binaryWriter, 0U, 0U, stream, stream2);
                     Class292.smethod_8(@class, binaryWriter);
                     @class.queue_0 = null;
                     @class.uint_6  = null;
                 }
             }
         }
     }
 }
        // Token: 0x06001E3B RID: 7739 RVA: 0x00061E24 File Offset: 0x00060024
        private static void smethod_3(Class321 pd, BinaryWriter write_stream)
        {
            IEnumerable <byte[]> queue_ = pd.queue_0;

            if (Class292.func_0 == null)
            {
                Class292.func_0 = new Func <byte[], int>(Class292.smethod_18);
            }
            uint num = (uint)queue_.Sum(Class292.func_0);

            byte[] array = new byte[num];
            int    num2  = 0;

            while (pd.queue_0.Count > 0)
            {
                byte[] array2 = pd.queue_0.Dequeue();
                array2.CopyTo(array, num2);
                num2 += array2.Length;
            }
            Class292.smethod_2(pd, write_stream, num, array, pd.uint_3, pd.uint_4);
            pd.uint_3 = 0U;
        }
 public abstract void Visit(Class321 c);
 public override void Visit(Class321 c) { }
 // Token: 0x06001E40 RID: 7744 RVA: 0x0000B95F File Offset: 0x00009B5F
 private static void smethod_8(Class321 pd, BinaryWriter write_stream)
 {
     Class292.smethod_3(pd, write_stream);
     Class292.smethod_1(write_stream, 0U, null, 0U);
     Class292.smethod_0(pd, write_stream, 0U, 0U);
 }