APMX64 Analyser is a Python-based toolkit for extracting, reverse-engineering, and querying Rohitab API Monitor .apmx64 capture files without replying on the GUI.
The tools allow you to bypass the monolithic, often slow API Monitor UI when dealing with massive multi-gigabyte captures. It decodes the internal binary structures, joins them with fast CSV-based index tables, and provides a powerful cross-capture querying workflow tailored for heavy reverse engineering, protocol analysis, and debugging tasks.
- Binary Extraction (
extract.py): Reconstructs internal tree arrays directly from the proprietary.apmx64ZIP boundaries (which contains raw memory buffers and unparsed call-stack offset tables). - Mapping Synthesis (
build_mapping.py): Resolves internalfuncIDtree identifiers by matching and coalescing overlapping hooks exposed via API Monitor CSV exports. - Cross-package Queries (
query.py): A single CLI to search API traces across multiple sessions. Filter globally by row ID, API function name, time boundaries, call category, or executed DLL module. - Deep Decode (
decode_binary.py): For records holding buffers unrepresented in the CSV (e.g.DeviceIoControlstructs), reads the internal raw memory dumps and restores string layouts and nested structures straight from hex.
We recommend using the newly introduced init_package.py wizard, which automatically handles all the extraction, setup, and mapping.
To create a new workspace package called v2_stylus_capture:
- Use API Monitor to drop your session:
File -> Save As -> v2_stylus_capture.apmx64 - Export your session context:
Select All -> File -> Export -> CSV (v2_stylus_capture.csv) - Run the toolkit:
python scripts/init_package.py --apmx64 "C:\Temp\v2_stylus_capture.apmx64" --csv "C:\Temp\v2_stylus_capture.csv"This will construct a fully initialized package at data/v2_stylus_capture/ holding all extracted traces and JSON mapping files.
Once initialized, querying your data is instantaneous and runs straight from the command line structure.
Use the --package (or -p) parameter to target a unique workspace context. All rows are 1-based matching the API Monitor UI.
# Get details for a specific function call by Row Number
python scripts/query.py -p v2_stylus_capture --row 1576
# Find all HID Input reads inside your trace
python scripts/query.py -p v2_stylus_capture --api ReadFile --args-contain "HID"
# Summarize and output failing functions
python scripts/query.py -p v2_stylus_capture --error-only --stats
# Output into machine-readable JSON format
python scripts/query.py -p v2_stylus_capture --row 15 --format jsonIf you have multiple captures loaded (e.g., baseline_trace and failure_trace), just omit the --package parameter. The script will automatically index across all packages allowing you to find anomalies over disparate tests.
# Query across ALL packages for DeviceIoControl
python scripts/query.py --api DeviceIoControlIf the API arguments exported into the CSV were truncated, you can query the underlying binary buffer arrays.
# Decodes the memory dump for Row 1576 directly out of the extracted process tree
python scripts/decode_binary.py -p v2_stylus_capture --row 1576apmx64-analyser/
├── README.md # You're looking at it
├── SKILL.md # Detailed reference guide
├── scripts/
│ ├── init_package.py # Single-stage ingestion
│ ├── extract.py # Binary unzip parser
│ ├── build_mapping.py # funcID matching algorithm
│ ├── query.py # Analytical search engine
│ └── decode_binary.py # Buffer/Hex deep-inspector
└── data/ # Created workspaces
├── cache_v1/ # Example Workspace A
└── cache_v2/ # Example Workspace B
API Monitor files are standard uncompressed Zip caches wrapped with .apmx64.
process/N/data: Concatenated binary call records storing runtime parametersprocess/N/calls: Fixed array ofu64absolute offsets pointing into thedataheapdefinitions: A binary tree node structure identifying APIsmonitoring.txt: UTF-16LE log handling process loading bases