diff --git a/Il2CppInspector.Common/Outputs/IDAPythonScript.cs b/Il2CppInspector.Common/Outputs/IDAPythonScript.cs index 846cfce..12b213f 100755 --- a/Il2CppInspector.Common/Outputs/IDAPythonScript.cs +++ b/Il2CppInspector.Common/Outputs/IDAPythonScript.cs @@ -108,9 +108,7 @@ typedef __int64 int64_t; writeSectionHeader("Method.Invoke thunks"); foreach (var method in model.ILModel.MethodInvokers.Where(m => m != null)) { - var address = method.VirtualAddress.Start; - writeName(address, method.Name); - writeComment(address, method); + writeTypedName(method.VirtualAddress.Start, method.ToString(), method.Name); } } diff --git a/Il2CppInspector.Common/Reflection/MethodInvoker.cs b/Il2CppInspector.Common/Reflection/MethodInvoker.cs index 4f73a25..08894f1 100644 --- a/Il2CppInspector.Common/Reflection/MethodInvoker.cs +++ b/Il2CppInspector.Common/Reflection/MethodInvoker.cs @@ -53,10 +53,10 @@ namespace Il2CppInspector.Reflection _ => type }; - public string Name => $"RunTimeInvoker_{!IsStatic}{ReturnType.BaseName}_" + string.Join("_", ParameterTypes.Select(p => p.BaseName)); + public string Name => $"RuntimeInvoker_{!IsStatic}{ReturnType.BaseName.ToCIdentifier()}_" + string.Join("_", ParameterTypes.Select(p => p.BaseName.ToCIdentifier())); - // Display as a C++ method signature - public string Signature => Name + "(Il2CppMethodPointer pointer, const RuntimeMethod* methodMetadata, void* obj, void** args)"; + // Display as a C++ method signature; MethodInfo* is the same as RuntimeMethod* (see codegen/il2cpp-codegen-metadata.h) + public string Signature => $"void* {Name}(Il2CppMethodPointer pointer, const MethodInfo* methodMetadata, void* obj, void** args)"; public override string ToString() => Signature; }