Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unmanaged Function Analysis #175

Open
ds5678 opened this issue Dec 18, 2022 · 0 comments
Open

Unmanaged Function Analysis #175

ds5678 opened this issue Dec 18, 2022 · 0 comments
Labels
area:analysis enhancement New feature or request

Comments

@ds5678
Copy link
Contributor

ds5678 commented Dec 18, 2022

In addition to the Il2Cpp native exports, there are a large number of helper methods created during the Il2Cpp conversion. These methods can be detected with disassembly analysis. Ideally, we could:

  • Detect them by analyzing calls from other methods.
    • This detection can be used recursively to find all the helper methods.
  • Analyze the calls and method content to build a method signature.
    • This may involve injecting additional fixed-size structs for unknown parameter types.
  • Assign the method a stable name and inject it under a static class like Cpp2ILInjected.CppNativeMethods.

In doing this, we can expand our capabilities in other areas

  • Call Analysis will report less "unknown" methods.
  • Attribute Injection will be able to generate an AddressAttribute for each of these disassembled methods.
    • Il2CppInterop could generate a usable wrapper for these methods allowing them to be called from managed code.
    • They could be patched with Harmony if desirable, or natively since the address is known and the function parameters are blittable.
  • Since they would have stable names, they could even be renamed with a deobfuscation map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:analysis enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants