decompile_swf
Decompile all ActionScript code from a SWF file, extracting AS2/AS3 scripts into organized directories for analysis.
Instructions
Decompile all ActionScript code from a SWF file.
This tool extracts and decompiles all ActionScript (AS2/AS3) code from a Flash SWF file, organizing the output into a directory structure that mirrors the package hierarchy.
Args: swf_path: Absolute path to the SWF file to decompile output_dir: Directory where decompiled scripts will be saved timeout: Optional timeout in seconds (default: 60)
Returns: Dictionary with: - success: Whether decompilation succeeded - swf_path: Input SWF file path - output_dir: Output directory path - script_count: Number of ActionScript files extracted - message: Success message
Example: >>> decompile_swf("/path/to/game.swf", "/path/to/output") { "success": true, "swf_path": "/path/to/game.swf", "output_dir": "/path/to/output", "script_count": 42, "message": "Successfully decompiled 42 ActionScript files" }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"swf_path": "<swf_path>",
"output_dir": "<output_dir>"
},
"name": "decompile_swf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| swf_path | Yes | ||
| output_dir | Yes | ||
| timeout | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||