From d892423829f4ae71067c709e6d4817a66703e96d Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Sun, 16 Aug 2020 22:43:07 +0200 Subject: [PATCH] JSON: Write APIs with full C++ signatures --- Il2CppInspector.Common/Outputs/JSONMetadata.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Il2CppInspector.Common/Outputs/JSONMetadata.cs b/Il2CppInspector.Common/Outputs/JSONMetadata.cs index b86765f..09c4a7b 100644 --- a/Il2CppInspector.Common/Outputs/JSONMetadata.cs +++ b/Il2CppInspector.Common/Outputs/JSONMetadata.cs @@ -38,6 +38,7 @@ namespace Il2CppInspector.Outputs writeUsages(); writeFunctions(); writeMetadata(); + writeApis(); writeExports(); writeSymbols(); }, @@ -178,6 +179,17 @@ namespace Il2CppInspector.Outputs }, "IL2CPP Function Metadata"); } + private void writeApis() { + var apis = model.AvailableAPIs; + writeArray("apis", () => { + foreach (var api in apis) { + var address = apis.primaryToSubkeyMapping[api.Key]; + + writeObject(() => writeTypedFunctionName(address, api.Value.ToSignatureString(), api.Key)); + } + }, "IL2CPP API functions"); + } + private void writeExports() { var exports = model.Exports;