Installation
Python Dependencies
Install required packages for the Python version used by your IDA Pro installation:IDA Pro 7.x typically uses Python 2, while IDA Pro 8.x and newer use Python 3. The scripts support both versions.
Configuration File
IDA Pro restricts certain characters in symbol names. To allow the full range of characters used in FFXIVClientStructs:- Locate the file
idauser.cfgin the FFXIVClientStructs repository (source/ida/idauser.cfg) - Copy it to
%AppData%\Hex-Rays\IDA Pro\(Windows)
:) in class names.
Available Scripts
ffxiv_idarename.py
The primary script for applying names from data.yml to your IDA database.What It Does
- Renames global variables and constants
- Names standalone functions
- Creates class hierarchies with proper vtable layouts
- Names virtual functions with inheritance tracking
- Names member functions
- Labels global class instances
- Adds inheritance tree comments to vtables
Usage
- Open ffxiv_dx11.exe in IDA Pro
- Wait for initial auto-analysis to complete
- Load the script:
File → Script file...orAlt+F7 - Navigate to
FFXIVClientStructs/ida/ffxiv_idarename.py - Execute
Re-running the Script
You can safely re-run ffxiv_idarename.py multiple times:- Updates names if data.yml has changed
- Fixes inheritance issues
- Applies new findings
Example Transformation
Before:Function Naming Behavior
The script intelligently handles different function name prefixes:| Current Name | Action |
|---|---|
sub_* | Rename to class.function |
j_* (jump stub) | Strip prefix and rename |
qword_* in vtable | Convert to code and rename |
nullsub_* | Rename with _nullsub suffix |
loc_*, locret_* | Rename with _loc/_locret suffix |
_purecall | Skip (will be named in derived class) |
| Already named | Update if different |
Virtual Table Handling
The script processes vtables with inheritance support:- Size Detection: Scans from vtable start until finding non-offset or cross-reference
- Inheritance: Applies base class names to inherited vfuncs
- Comments: Adds inheritance tree visualization
- Validation: Checks for size mismatches between base and derived classes
ffxiv_sigmaker.py
Historical script for generating byte signatures from data.yml. Dependencies (Python 3 only):ffxiv_exdgetters.py
Ingests game Excel sheet definitions (.exh files) and renames functions that fetch specific sheets.
What It Does
Transforms generic Exd getter calls into typed functions: Before:ffxiv_structimporter.py
Ingestsffxiv_structs.yml and creates IDA struct definitions with proper member types and function signatures.
ffxiv_fullrun_ida.py
Convenience script that runs in sequence:- ffxiv_idarename.py
- ffxiv_exdgetters.py
- ffxiv_structimporter.py
Script Architecture
API Abstraction Layer
All scripts use an abstraction layer (classBaseApi) that allows the same code to work across IDA Pro, Ghidra, and Binary Ninja.
Key methods:
get_image_base()- Get current executable base addressget_addr_name(ea)- Get symbol name at addressset_addr_name(ea, name)- Set symbol nameget_qword(ea)- Read 8 bytes at addressxrefs_to(ea)- Get cross-referencesis_offset(ea)- Check if address contains pointer
IDA-Specific Implementation
The scripts use IDA Python API:/home/daytona/workspace/source/ida/ffxiv_idarename.py:208-314 for the complete IDA implementation.
Rebasing Support
If your IDA database uses a different image base than 0x140000000, the scripts automatically adjust all addresses:Error Messages
Common Warnings
“Multiple vtables are defined at 0xXXXXXXXX”- Two classes claim the same vtable address in data.yml
- Check for duplicate entries
- Referenced base class missing from data.yml
- Add a placeholder entry for the base class
- Derived class explicitly names a vfunc that’s already named in base class
- Usually informational, not an error
Common Errors
“Function at 0xXXXXXXXX had unexpected name ‘YYY’ during naming of ZZZ”- Function has an unexpected existing name
- May indicate wrong address or naming conflict
- Review the function manually
- Vtable size detection found fewer functions than the base class
- May indicate incorrect inheritance or missing vtable entries
Tips and Tricks
Finding Vtables
Look for constructor functions that write pointers:Identifying Virtual Functions
Virtual function calls use vtable offsets:Handling Inheritance
When a class has multiple vtables, the first is the main vtable, and additional ones represent base classes:Testing Changes
- Make changes to data.yml
- Re-run ffxiv_idarename.py
- Navigate to renamed functions to verify
- Check IDA Output window for errors
Next Steps
- Learn about data.yml structure
- See Ghidra scripts for Ghidra-specific workflows
- Read the contributing guide to submit your findings