From 19b4b43870ec8ac2cefacc7ac626a28e48e88f58 Mon Sep 17 00:00:00 2001 From: Perfare Date: Wed, 22 Feb 2023 14:41:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Il2CppDumper/Attributes/ArrayLengthAttribute.cs | 4 ---- Il2CppDumper/ExecutableFormats/ElfClass.cs | 4 +--- Il2CppDumper/ExecutableFormats/MachoClass.cs | 7 +------ Il2CppDumper/ExecutableFormats/MachoFat.cs | 2 -- Il2CppDumper/ExecutableFormats/NSOClass.cs | 7 +------ Il2CppDumper/ExecutableFormats/PE.cs | 1 - Il2CppDumper/ExecutableFormats/PEClass.cs | 3 --- Il2CppDumper/Extensions/HexExtensions.cs | 3 --- Il2CppDumper/Extensions/StringExtensions.cs | 5 +---- Il2CppDumper/IO/Lz4DecoderStream.cs | 14 +++++++------- Il2CppDumper/Outputs/DummyAssemblyExporter.cs | 7 +------ Il2CppDumper/Outputs/Il2CppConstants.cs | 8 +------- Il2CppDumper/Utils/BlobValue.cs | 8 +------- Il2CppDumper/Utils/Il2CppDummyDll.cs | 6 +++--- Il2CppDumper/Utils/MyAssemblyResolver.cs | 6 +----- Il2CppDumper/Utils/SearchSection.cs | 7 +------ 16 files changed, 19 insertions(+), 73 deletions(-) diff --git a/Il2CppDumper/Attributes/ArrayLengthAttribute.cs b/Il2CppDumper/Attributes/ArrayLengthAttribute.cs index 1955df5..f4d765f 100644 --- a/Il2CppDumper/Attributes/ArrayLengthAttribute.cs +++ b/Il2CppDumper/Attributes/ArrayLengthAttribute.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Il2CppDumper { diff --git a/Il2CppDumper/ExecutableFormats/ElfClass.cs b/Il2CppDumper/ExecutableFormats/ElfClass.cs index 525bba5..111482f 100644 --- a/Il2CppDumper/ExecutableFormats/ElfClass.cs +++ b/Il2CppDumper/ExecutableFormats/ElfClass.cs @@ -1,6 +1,4 @@ -using System; - -namespace Il2CppDumper +namespace Il2CppDumper { public class Elf32_Ehdr { diff --git a/Il2CppDumper/ExecutableFormats/MachoClass.cs b/Il2CppDumper/ExecutableFormats/MachoClass.cs index 1cf52a5..76f4c9a 100644 --- a/Il2CppDumper/ExecutableFormats/MachoClass.cs +++ b/Il2CppDumper/ExecutableFormats/MachoClass.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Il2CppDumper +namespace Il2CppDumper { public class MachoSection { diff --git a/Il2CppDumper/ExecutableFormats/MachoFat.cs b/Il2CppDumper/ExecutableFormats/MachoFat.cs index 9c31c79..261d465 100644 --- a/Il2CppDumper/ExecutableFormats/MachoFat.cs +++ b/Il2CppDumper/ExecutableFormats/MachoFat.cs @@ -1,8 +1,6 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; namespace Il2CppDumper { diff --git a/Il2CppDumper/ExecutableFormats/NSOClass.cs b/Il2CppDumper/ExecutableFormats/NSOClass.cs index 73be0b9..0637bdf 100644 --- a/Il2CppDumper/ExecutableFormats/NSOClass.cs +++ b/Il2CppDumper/ExecutableFormats/NSOClass.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Il2CppDumper +namespace Il2CppDumper { public class NSOHeader { diff --git a/Il2CppDumper/ExecutableFormats/PE.cs b/Il2CppDumper/ExecutableFormats/PE.cs index 18f4d58..384bfa8 100644 --- a/Il2CppDumper/ExecutableFormats/PE.cs +++ b/Il2CppDumper/ExecutableFormats/PE.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; namespace Il2CppDumper { diff --git a/Il2CppDumper/ExecutableFormats/PEClass.cs b/Il2CppDumper/ExecutableFormats/PEClass.cs index 7bc95ff..e3362f6 100644 --- a/Il2CppDumper/ExecutableFormats/PEClass.cs +++ b/Il2CppDumper/ExecutableFormats/PEClass.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Il2CppDumper { diff --git a/Il2CppDumper/Extensions/HexExtensions.cs b/Il2CppDumper/Extensions/HexExtensions.cs index 26ce27d..5f81e95 100644 --- a/Il2CppDumper/Extensions/HexExtensions.cs +++ b/Il2CppDumper/Extensions/HexExtensions.cs @@ -1,8 +1,5 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading.Tasks; namespace Il2CppDumper { diff --git a/Il2CppDumper/Extensions/StringExtensions.cs b/Il2CppDumper/Extensions/StringExtensions.cs index 881b662..ec48f9e 100644 --- a/Il2CppDumper/Extensions/StringExtensions.cs +++ b/Il2CppDumper/Extensions/StringExtensions.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Text; namespace Il2CppDumper { diff --git a/Il2CppDumper/IO/Lz4DecoderStream.cs b/Il2CppDumper/IO/Lz4DecoderStream.cs index 4f6226d..5db3f91 100644 --- a/Il2CppDumper/IO/Lz4DecoderStream.cs +++ b/Il2CppDumper/IO/Lz4DecoderStream.cs @@ -131,7 +131,7 @@ namespace Il2CppDumper goto copyMatch; } - readToken: + readToken: int tok; if (inBufPos < inBufEnd) { @@ -172,7 +172,7 @@ namespace Il2CppDumper goto copyLiteral; } - readExLiteralLength: + readExLiteralLength: int exLitLen; if (inBufPos < inBufEnd) { @@ -202,7 +202,7 @@ namespace Il2CppDumper phase = DecodePhase.CopyLiteral; goto copyLiteral; - copyLiteral: + copyLiteral: int nReadLit = litLen < nToRead ? litLen : nToRead; if (nReadLit != 0) { @@ -246,7 +246,7 @@ namespace Il2CppDumper phase = DecodePhase.ReadOffset; goto readOffset; - readOffset: + readOffset: if (inBufPos + 1 < inBufEnd) { matDst = (decBuf[inBufPos + 1] << 8) | decBuf[inBufPos]; @@ -279,7 +279,7 @@ namespace Il2CppDumper goto copyMatch; } - readExMatchLength: + readExMatchLength: int exMatLen; if (inBufPos < inBufEnd) { @@ -308,7 +308,7 @@ namespace Il2CppDumper phase = DecodePhase.CopyMatch; goto copyMatch; - copyMatch: + copyMatch: int nCpyMat = matLen < nToRead ? matLen : nToRead; if (nCpyMat != 0) { @@ -346,7 +346,7 @@ namespace Il2CppDumper phase = DecodePhase.ReadToken; goto readToken; - finish: + finish: nRead = count - nToRead; int nToBuf = nRead < DecBufLen ? nRead : DecBufLen; diff --git a/Il2CppDumper/Outputs/DummyAssemblyExporter.cs b/Il2CppDumper/Outputs/DummyAssemblyExporter.cs index 69b2095..ae2b1e6 100644 --- a/Il2CppDumper/Outputs/DummyAssemblyExporter.cs +++ b/Il2CppDumper/Outputs/DummyAssemblyExporter.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; namespace Il2CppDumper { diff --git a/Il2CppDumper/Outputs/Il2CppConstants.cs b/Il2CppDumper/Outputs/Il2CppConstants.cs index 561ae5b..f8bb86a 100644 --- a/Il2CppDumper/Outputs/Il2CppConstants.cs +++ b/Il2CppDumper/Outputs/Il2CppConstants.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Il2CppDumper +namespace Il2CppDumper { class Il2CppConstants { diff --git a/Il2CppDumper/Utils/BlobValue.cs b/Il2CppDumper/Utils/BlobValue.cs index 630c4b8..69d0055 100644 --- a/Il2CppDumper/Utils/BlobValue.cs +++ b/Il2CppDumper/Utils/BlobValue.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Il2CppDumper +namespace Il2CppDumper { public class BlobValue { diff --git a/Il2CppDumper/Utils/Il2CppDummyDll.cs b/Il2CppDumper/Utils/Il2CppDummyDll.cs index 8cf811f..a349a5a 100644 --- a/Il2CppDumper/Utils/Il2CppDummyDll.cs +++ b/Il2CppDumper/Utils/Il2CppDummyDll.cs @@ -1,7 +1,7 @@ -using System; -using System.Reflection; -using Mono.Cecil; +using Mono.Cecil; using Mono.Cecil.Cil; +using System; +using System.Reflection; using FieldAttributes = Mono.Cecil.FieldAttributes; using MethodAttributes = Mono.Cecil.MethodAttributes; using TypeAttributes = Mono.Cecil.TypeAttributes; diff --git a/Il2CppDumper/Utils/MyAssemblyResolver.cs b/Il2CppDumper/Utils/MyAssemblyResolver.cs index cedb83f..a0565e5 100644 --- a/Il2CppDumper/Utils/MyAssemblyResolver.cs +++ b/Il2CppDumper/Utils/MyAssemblyResolver.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Mono.Cecil; +using Mono.Cecil; namespace Il2CppDumper { diff --git a/Il2CppDumper/Utils/SearchSection.cs b/Il2CppDumper/Utils/SearchSection.cs index 7d0e121..31ceca9 100644 --- a/Il2CppDumper/Utils/SearchSection.cs +++ b/Il2CppDumper/Utils/SearchSection.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Il2CppDumper +namespace Il2CppDumper { public enum SearchSectionType {