Skip to content

A Plugin Designed to Assist in Reverse Engineering for IDA Pro 9.0 . This plugin is tuned for WoW Reverse Engineering and for lower versions of IDA Pro (< 9.0) needs to be downported . This plugin is an active work in progress .

Notifications You must be signed in to change notification settings

AzDeltaQQ/AutoReverseIDA9.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AutoReverse Plugin for IDA Pro 9.0

πŸ€– AI-powered reverse engineering assistant using Google Gemini API

AutoReverse is a comprehensive IDA Pro 9.0 plugin designed to accelerate reverse engineering workflows with AI assistance. Specifically tuned for World of Warcraft 3.3.5a binary analysis, but applicable to general x86 reverse engineering tasks. AutoReverse

Note: Currently only coded for using free gemini tier. Model Gemini pro 2.5. eventually will add multi model support, paid tier, etc. Also currently only tested "Analyze Current Item" , will start working on other features soon TM.

🌟 Features

🧠 AI-Powered Function Analysis

  • Deep Context Analysis: Gathers comprehensive function context including callers, called functions, disassembly, and pseudocode
  • WoW-Specific Insights: Specialized prompts for World of Warcraft client analysis
  • Interactive Chat Interface: Follow-up questions and iterative analysis
  • Token Management: Smart context limits and rate limiting handling

πŸ“Š Comprehensive Analysis

  • Function Documentation: Automatic purpose identification and parameter analysis
  • Data Structure Analysis: Smart structure recognition and creation
  • Cross-Reference Analysis: Complete XREFs TO/FROM analysis with context
  • Calling Convention Detection: Automatic identification of calling patterns

πŸ”§ Code Enhancement Tools

  • Variable Renaming: AI-suggested meaningful variable names
  • Type Setting: Automatic function signature generation
  • Structure Creation: Data structure analysis and IDA integration
  • Copy-Paste Ready: Type declarations ready for IDA Pro

🎨 Modern User Interface

  • Rich Chat Interface: HTML-formatted responses with syntax highlighting
  • Multiline Input: Markdown support with Shift+Enter for new lines
  • Progress Tracking: Real-time analysis progress and token counting
  • Error Handling: Comprehensive error messages with suggestions

πŸ“¦ Installation

Option 1: Automatic Installation (Recommended)

# Download the repository
git clone https://github.com/AzDeltaQQ/AutoReverseIDA9.0.git

# Run the Windows installer
cd AutoReverseIDA9.0
python AutoReverse/install_windows.py

Option 2: Manual Installation

  1. Copy files to your IDA Pro plugins directory:

    C:\Program Files\IDA Professional 9.0\plugins\
    β”œβ”€β”€ auto_reverse.py                    # This file must go in plugins folder by itself.
    └── AutoReverse/                       #  This Folder must be in plugins folder .
        β”œβ”€β”€ modules/
        β”‚   β”œβ”€β”€ config_manager.py
        β”‚   β”œβ”€β”€ context_gatherer.py
        β”‚   β”œβ”€β”€ gemini_client.py
        β”‚   β”œβ”€β”€ struct_analyzer.py
        β”‚   β”œβ”€β”€ type_setter.py
        β”‚   β”œβ”€β”€ ui_manager.py
        β”‚   └── variable_renamer.py
        β”œβ”€β”€ install_windows.py
        β”œβ”€β”€ README.md
        β”œβ”€β”€ LICENSE
        └── requirements.txt
    
  2. Install dependencies:

    pip install -r AutoReverse/requirements.txt

πŸ”‘ Configuration

Get Google Gemini API Key

  1. Visit Google AI Studio
  2. Create a new API key
  3. Copy the key for plugin configuration

Setup in IDA Pro

  1. Start IDA Pro 9.0
  2. Open any binary file
  3. Go to Edit > AutoReverse > Configure API Key
  4. Paste your Gemini API key
  5. Edit > AutoReverse > Settings to configure preferences

πŸš€ Usage

Function Analysis

1. Position cursor in any function
2. Edit > AutoReverse > Analyze Current Item
3. Get comprehensive AI analysis with:
   - Function purpose and WoW context
   - Parameter analysis and calling convention
   - Cross-reference analysis
   - Copy-pastable type declaration

Interactive Chat

  • Ask follow-up questions about the analysis
  • Request specific insights or clarifications
  • Get code suggestions and improvements
  • Shift+Enter for multiline input

Data Analysis

1. Position cursor on data/offset/pointer
2. Edit > AutoReverse > Analyze Current Item
3. Get detailed data structure analysis

Settings & Customization

Edit > AutoReverse > Settings
- Toggle prompt display in chat
- View current model settings
- Context limit information

🎯 World of Warcraft 3.3.5a Specialization

Optimized for WoW Client Analysis

  • FrameScript System: Lua-to-C++ bridge analysis
  • Game Object Recognition: Player, NPC, item structures
  • Network Protocol: Packet handling and opcodes
  • UI System: WoW's custom UI framework analysis
  • Memory Management: Custom allocators and object pools

Example Analysis Output

Function: FrameScript_SerializeStringOrNil
Purpose: Pushes string or nil value onto Lua stack for UI scripting
Parameters: lua_State* L, const char* str
Context: FrameScript system for WoW UI addon communication

Type Declaration:
void FrameScript_SerializeStringOrNil(lua_State* L, const char* str);

πŸ› οΈ Technical Details

System Requirements

  • IDA Pro 9.0 with Python support
  • Windows (installer supports Windows, manual install for other OS)
  • Python 3.8+
  • Google Gemini API access

API Integration

  • Google Gemini 2.5 Pro: 2M token context window
  • Rate Limiting: Smart handling with helpful error messages
  • Context Optimization: Automatic truncation for API efficiency
  • Safety Settings: BLOCK_NONE for technical content

Performance Optimizations

  • Context Limits:
    • Max 8 callers per function (reduced from 10)
    • 80 lines disassembly (reduced from 100)
    • 40 lines per caller (reduced from 50)
  • Token Estimation: Improved accuracy accounting for system prompts
  • Parallel Processing: Async analysis with progress tracking

πŸ§ͺ Example Workflows

Basic Function Analysis

# 1. Open WoW 3.3.5a client in IDA Pro
# 2. Navigate to any function (e.g., spell casting, movement)
# 3. Use AutoReverse to get AI analysis
# 4. Get instant insights about game mechanics

Advanced Structure Analysis

# 1. Find data structures (player object, item data, etc.)
# 2. Analyze with AutoReverse
# 3. Get IDA structure definitions
# 4. Apply to improve analysis accuracy

Interactive Research

# 1. Analyze complex function
# 2. Ask follow-up questions in chat:
#    - "How does this relate to spell casting?"
#    - "What WoW systems use this function?"
#    - "Can you explain the network protocol here?"

πŸ”§ Development & Contribution

Module Structure

AutoReverse/modules/
β”œβ”€β”€ config_manager.py      # Settings and API key management
β”œβ”€β”€ context_gatherer.py    # Function analysis and context collection
β”œβ”€β”€ gemini_client.py       # Google Gemini API integration
β”œβ”€β”€ struct_analyzer.py     # Structure analysis and creation
β”œβ”€β”€ type_setter.py         # Type setting functionality
β”œβ”€β”€ ui_manager.py          # User interface management
└── variable_renamer.py    # Variable renaming suggestions

Key Features in Code

  • Error Handling: Comprehensive try-catch with detailed logging
  • Context Gathering: Smart XREFs analysis with external function filtering
  • UI Components: PyQt5 integration with HTML rendering
  • API Management: Rate limiting, token counting, and fallback handling

πŸ› Troubleshooting

Common Issues

Plugin Not Loading

- Check IDA Pro 9.0 Python support
- Verify all files in correct locations
- Check Output window for detailed errors

API Errors

- Verify Gemini API key is correct
- Check internet connectivity
- Monitor token usage (free tier: 250k/minute)

Performance Issues

- Large functions may hit rate limits
- Use Settings to adjust context limits
- Analyze smaller functions first

Rate Limiting Solutions

  • Free Tier: 15 RPM, 250k tokens/minute
  • Paid Tier: Higher limits available
  • Context Optimization: Plugin automatically manages context size
  • Error Recovery: Helpful suggestions for limit exceeded errors

πŸ“„ License

MIT License - see LICENSE for details.

🀝 Contributing

  1. Fork the repository
  2. Create feature branch: git checkout -b feature-name
  3. Commit changes: git commit -am 'Add feature'
  4. Push to branch: git push origin feature-name
  5. Submit pull request

πŸ“ž Support

  • GitHub Issues: Report bugs and request features
  • Documentation: Check AutoReverse/README.md for detailed usage
  • IDA Output Window: Enable debug logging for troubleshooting

πŸ† Acknowledgments

  • Google Gemini: AI analysis capabilities
  • IDA Pro: Reverse engineering platform
  • Hex-Rays: Decompiler integration
  • WoW Community: Reverse engineering insights

AutoReverse Plugin - Accelerating reverse engineering with AI assistance πŸš€

About

A Plugin Designed to Assist in Reverse Engineering for IDA Pro 9.0 . This plugin is tuned for WoW Reverse Engineering and for lower versions of IDA Pro (< 9.0) needs to be downported . This plugin is an active work in progress .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages