Skip to main content

Overview

The Analyze Selection feature allows you to perform a targeted analysis on a specific set of instructions that you’ve selected in the x64dbg disassembly window. This is useful when you want to quickly analyze a particular code segment without processing the entire function or module.
This is the fastest analysis mode in xAnalyzer, perfect for analyzing specific code sections or multiple selected calls.

How to Analyze a Selection

There are three ways to analyze a selected range of instructions:

Method 1: Using the Context Menu

1

Select instructions

In the disassembly window, click and drag to select multiple instructions that you want to analyze.
2

Open the context menu

Right-click on the selected instructions to open the context menu.
3

Choose xAnalyzer

Navigate to PluginsxAnalyzerAnalyze Selection.
4

View results

xAnalyzer will process the selected instructions and add comments with function definitions, arguments, and data types.

Method 2: Using the Command

You can use the x64dbg command line to execute the analysis:
xanal selection
This command performs the same analysis as the menu option.

Method 3: Using Hotkeys

You can set custom hotkeys in the x64dbg GUI for quick access:
1

Open hotkey settings

In x64dbg, go to OptionsPreferencesShortcuts.
2

Find the command

Search for the xAnalyzer selection analysis command.
3

Assign a hotkey

Set your preferred keyboard shortcut (e.g., Ctrl+Shift+X).
4

Apply and use

Click Apply and use your hotkey to quickly analyze selections.

What Gets Analyzed

When you analyze a selection, xAnalyzer will:
  • Detect API function calls within the selection
  • Add function definitions and prototypes as comments
  • Identify and label function arguments with their data types
  • Recognize known constants and enums
  • Process nested function calls
  • Detect loop structures within the selection

Example Analysis

Before analysis, your selected code might look like this:
push 0
push 403000
push 403010
push 0
call <user32.MessageBoxA>
After running Analyze Selection, xAnalyzer adds detailed information:
push 0          ; uType = MB_OK
push 403000     ; lpCaption = "Error"
push 403010     ; lpText = "An error occurred"
push 0          ; hWnd = NULL
call <user32.MessageBoxA>  ; MessageBoxA(hWnd, lpText, lpCaption, uType)
Selection analysis is ideal when you’re focused on a specific code section and don’t need to analyze surrounding code. It’s faster and more targeted than function or module analysis.

Use Cases

Quick API inspection: When you spot an interesting API call and want to see its parameters immediately. Multiple call analysis: Select multiple related function calls to analyze them as a group. Code snippet review: When reviewing a specific algorithm or code pattern without analyzing the entire function. Performance-focused analysis: When working with large modules but only need information about specific sections.

Analyze Function

Analyze an entire function from your current position

Analyze Module

Perform full analysis on the entire module

Remove Analysis

Remove analysis data from your code

Commands Reference

View all available xAnalyzer commands
Make sure you have the api_def folder properly installed with xAnalyzer for the analysis to detect and define API functions correctly.

Build docs developers (and LLMs) love