Skip to content

Commit

Permalink
Fixed bugs and compatibility with Il2CppAssemblyUnhollower
Browse files Browse the repository at this point in the history
  • Loading branch information
1582421598 committed Jun 11, 2022
1 parent e69edd3 commit 01ec5a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Il2CppDumper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ static void Main(string[] args)
{
if (File.Exists(arg))
{
var file = File.ReadAllBytes(arg);
if (BitConverter.ToUInt32(file, 0) == 0xFAB11BAF)
if (arg.Contains("global-metadata.dat"))
{
metadataPath = arg;
}
Expand Down
8 changes: 6 additions & 2 deletions Il2CppDumper/Utils/Il2CppExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Il2CppExecutor(Metadata metadata, Il2Cpp il2Cpp)
this.metadata = metadata;
this.il2Cpp = il2Cpp;

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

public Il2CppTypeDefinition GetGenericClassTypeDefinition(Il2CppGenericClass genericClass)
{
if (il2Cpp.Version >= 27 && !Program.IsGenshinMetadata)
if (Program.IsGenshinMetadata)
{
return metadata.typeDefs[genericClass.type];
}
if (il2Cpp.Version >= 27)
{
var il2CppType = il2Cpp.GetIl2CppType(genericClass.type);
if (il2CppType == null)
Expand Down
2 changes: 1 addition & 1 deletion Il2CppDumper/ghidra.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ def make_function(start):
make_function(start)
monitor.incrementProgress(1)

print 'Script finished!'
print("Script finished!")

0 comments on commit 01ec5a6

Please sign in to comment.