Overview
The Analyze Function feature performs a comprehensive analysis of an entire function based on your current position in the disassembly window. xAnalyzer automatically detects the function boundaries (from prolog to return) and processes all instructions within that function.This is the recommended analysis mode when you’re working within a specific function and want complete context without analyzing the entire module.
How to Analyze a Function
There are three ways to analyze a function:Method 1: Using the Context Menu
Position your cursor
Click on any instruction within the function you want to analyze. You don’t need to be at the function start.
Method 2: Using the Command
Execute the function analysis command directly in the x64dbg command line:Method 3: Using Hotkeys
Set up custom keyboard shortcuts for faster access:Function Boundary Detection
xAnalyzer automatically detects function boundaries by identifying: Function Prologs: Standard entry sequences like:push ebp / mov ebp, esp(x86)push rbp / mov rbp, rsp(x64)- Other common prolog patterns
retinstructionsretnwith immediate values- Function return patterns
What Gets Analyzed
Function analysis provides comprehensive information:API Function Calls
- Complete function prototypes
- Argument names and data types
- Return value information
- Calling convention details
Loop Detection
- Automatic detection of loop structures
- Loop entry and exit points
- Nested loop recognition
Undefined Functions
- Generic analysis for undefined calls (if enabled in settings)
- Argument prediction for unknown functions
- Smart function tracking for indirect calls
Code Flow
- Jump destinations
- Conditional branch analysis
- Call chains and relationships
Example Analysis
Before function analysis:Configuration Options
Function analysis respects your xAnalyzer configuration settings: Analyze Undefined Functions: Controls whether to analyze calls not defined in API definition files. Clear Auto Comments/Labels: Determines if previous analysis data should be cleared before new analysis. Track Undefined Functions: Enables smart prediction for indirect function calls likeCALL {REGISTER}.
Configuration Options
Learn more about xAnalyzer configuration settings
Use Cases
Reverse engineering: When analyzing a specific algorithm or function behavior. Malware analysis: Understanding what a suspicious function does without analyzing the entire binary. Debugging preparation: Adding context to a function before stepping through it. Code documentation: Generating detailed comments for a specific function in your analysis. Performance optimization: Focusing analysis resources on functions of interest.Limitations
Related Features
Analyze Selection
Analyze only selected instructions
Analyze Module
Perform full module analysis
Remove Analysis
Remove analysis from a function
Loop Detection
Learn about automatic loop detection
