Skip to content

Commit 01ec5a6

Browse files
committed
Fixed bugs and compatibility with Il2CppAssemblyUnhollower
1 parent e69edd3 commit 01ec5a6

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

Il2CppDumper/Program.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ static void Main(string[] args)
4343
{
4444
if (File.Exists(arg))
4545
{
46-
var file = File.ReadAllBytes(arg);
47-
if (BitConverter.ToUInt32(file, 0) == 0xFAB11BAF)
46+
if (arg.Contains("global-metadata.dat"))
4847
{
4948
metadataPath = arg;
5049
}

Il2CppDumper/Utils/Il2CppExecutor.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public Il2CppExecutor(Metadata metadata, Il2Cpp il2Cpp)
3838
this.metadata = metadata;
3939
this.il2Cpp = il2Cpp;
4040

41-
if ((il2Cpp.Version >= 27 && il2Cpp.Version < 29)&& !Program.IsGenshinMetadata)
41+
if ((il2Cpp.Version >= 27 && il2Cpp.Version < 29) && !Program.IsGenshinMetadata)
4242
{
4343
customAttributeGenerators = new ulong[metadata.imageDefs.Sum(x => x.customAttributeCount)];
4444
foreach (var imageDef in metadata.imageDefs)
@@ -274,7 +274,11 @@ public Il2CppRGCTXDefinition[] GetRGCTXDefinition(string imageName, Il2CppMethod
274274

275275
public Il2CppTypeDefinition GetGenericClassTypeDefinition(Il2CppGenericClass genericClass)
276276
{
277-
if (il2Cpp.Version >= 27 && !Program.IsGenshinMetadata)
277+
if (Program.IsGenshinMetadata)
278+
{
279+
return metadata.typeDefs[genericClass.type];
280+
}
281+
if (il2Cpp.Version >= 27)
278282
{
279283
var il2CppType = il2Cpp.GetIl2CppType(genericClass.type);
280284
if (il2CppType == null)

Il2CppDumper/ghidra.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ def make_function(start):
8484
make_function(start)
8585
monitor.incrementProgress(1)
8686

87-
print 'Script finished!'
87+
print("Script finished!")

0 commit comments

Comments
 (0)