Overview
xAnalyzer’s extended API call analysis is its most powerful feature, providing comprehensive function detection and parameter information for over 13,000 API definitions. This transforms raw disassembly into richly annotated code that reveals the purpose and behavior of every API call.The API definition system is fully expandable - you can add or modify definitions to support any library or custom API.
How It Works
During analysis, xAnalyzer processes each CALL instruction and:- Identifies the target function - Strips module prefixes, decorations, and stub suffixes
- Locates the definition - Searches through 200 DLL definition files in
apis_def/ - Extracts parameters - Traces back through preceding instructions to identify arguments
- Applies type information - Resolves data types, flags, and enums from header files
- Generates comments - Creates detailed inline comments with full function signatures
Detection Capabilities
xAnalyzer detects multiple call patterns:API Definition Files
The definition system uses INI-structured.api files:
Main Definition File
Header File (Types & Constants)
Argument Notation
Parameters enclosed in brackets reference type definitions:[MessageBoxType] uType- Links to type definition in header fileLPCTSTR lpText- Standard Windows typeHANDLE hWnd- Basic handle type
Coverage Statistics
API Definitions
13,000+ function definitions
DLL Coverage
~200 Windows DLLs supported
Data Types
1,000+ enum definitions
Flag Types
800+ flag definitions
Supported Libraries
The definition files cover all major Windows APIs:Core System APIs
Core System APIs
kernel32.api- 141KB of definitions (memory, process, file I/O)kernelbase.api- 80KB (Windows 7+ base APIs)ntdll.api- 170KB (Native NT APIs)advapi32.api- 79KB (security, registry, services)
User Interface
User Interface
user32.api- 71KB (windowing, messaging, input)gdi32.api- 33KB (graphics device interface)gdiplus.api- 93KB (GDI+ graphics)comctl32.api- 15KB (common controls)
Networking & Internet
Networking & Internet
ws2_32.api- Winsock 2 networkingwininet.api- Internet APIswinhttp.api- HTTP clientnetapi32.api- Network management
Security & Cryptography
Security & Cryptography
crypt32.api- 44KB (cryptographic APIs)bcrypt.api- CNG crypto primitivesncrypt.api- Key storagewintrust.api- Code signing verification
Runtime Libraries
Runtime Libraries
msvcrxx.api- 113KB (Visual C++ runtime)vcruntime.api- VC++ runtime componentsucrtbase.api- Universal CRToleaut32.api- 43KB (OLE automation)
Type Resolution
xAnalyzer performs intelligent type resolution:Constant Value Detection
When analyzing arguments, xAnalyzer:- Identifies hexadecimal constant values
- Looks up flag and enum definitions
- Resolves symbolic names for constants
- Displays meaningful names instead of raw values
- Numeric Constants
- Boolean Values
- NULL Pointers
Customization
Adding New Definitions
You can extend xAnalyzer’s knowledge by creating custom.api files:
Modifying Existing Definitions
If you find incorrect or missing information:- Locate the relevant
.apifile (e.g.,kernel32.api) - Edit the function definition
- Save and reload the plugin
- Re-run analysis on your code
Benefits for Reverse Engineering
Faster Analysis
Instantly understand what each API call does without consulting MSDN
Parameter Tracking
Follow data flow from argument preparation through function calls
Malware Analysis
Quickly identify suspicious API usage patterns (registry, network, injection)
Code Comprehension
Transform cryptic assembly into documented, readable code
Implementation Details
Fromxanalyzer.cpp:336-460, the analysis engine:
Source Code Reference
Key implementation locations:xanalyzer.cpp:281-552- Main analysis loopxanalyzer.cpp:744-820- SetFunctionParams()xanalyzer.cpp:978-1028- Strip_x64dbg_calls()- API definition files:
~/source/apis_def/*.api
