8000 GitHub - average-bit/kappa: 🐸 VS Code extension designed to help you when decompiling a codebase · GitHub
[go: up one dir, main page]

Skip to content
average-bitPublic
forked from macabeus/kappa

About

🐸 VS Code extension designed to help you when decompiling a codebase

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Kappa

GitHub Stars Visual Studio Marketplace Downloads

VS Code extension designed to help you when decompiling a codebase.

⚠️ Work in Progress: This extension is currently under active development. Features and APIs may change.

  • ✅ AI Prompt Builder: Craft high-quality prompts to guide AI in decompiling a function.
  • ✅ Automated Code Fixes: Use plugins to automatically update the code’s AST, eliminating repetitive tasks and correcting common errors.
  • 🚧 Agent Mode: Automatically decompile a given function, until it reache 100% match (coming soon).
  • 🚧 Integration with decomp.me: Create a new scratch from VS Code (coming soon).

✨ AI Prompt Builder

Prompt.Builder.Demo.mp4

The AI Prompt Builder creates context-aware prompts for decompiling a assembly function. It automatically analyzes your codebase to provide the AI with an accurate context for this task.

How to use it

  1. Select an assembly function
  2. Run the code action "Build a prompt to decompile it"
  3. Get a comprehensive prompt that includes:
    • Real examples from your codebase: Functions that have already been decompiled (found via Git history)
    • Function signatures of dependencies used in the target assembly
    • Clear instructions and formatting rules for the AI

🔌 Kappa Plugins

Kappa.Plugin.Demo.-.Lift.Variable.Declarations.mp4

Kappa plugins are scripts that transform the Abstract Syntax Tree (AST) of C/C++ code blocks. They can be used to:

  • Fix common decompilation errors
  • Avoid repetitive tasks

Example Kappa Plugin Case

For instance: When decompiling Sonic Advance 3 using AI, it kept messing up by using raw numbers instead of the proper Q notation. So, we can ApplyQNotationPlugin that catches assignments to Vec32 using a raw number and replaces it with the Q format.

// Before: Raw decompiled code
player.x = 256;

// After: ApplyQNotationPlugin transformation
player.x = Q(1);

Check more examples on ./example-kappa-plugins.

How to use it

  1. Add the plugins in a folder called .kappa-plugins from the workspace root.
  2. Select a function
  3. Run the action Run Kappa Plugins

Contributing

About

🐸 VS Code extension designed to help you when decompiling a codebase

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0