Skip to content

A simple x64dbg plugin that loads FASM (Flat Assembler) symbol information from .fas files directly into the debugger as labels

License

Notifications You must be signed in to change notification settings

CynicRus/FASMDbgHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FASMDbgHelper

FASMDbgHelper is a plugin for x64dbg that enables loading of FASM assembler .fas symbol files and imports FASM labels as comments and named labels into the current debugging session. This greatly improves usability when debugging binaries assembled with FASM.

⚠️ To use the plugin, you must be paused on EIP/RIP of the process you want to import symbols for (i.e., at the entry point of the debugged module).


Features

  • Loads .fas symbol files generated by FASM assembler.
  • Imports labels as comments and named labels for the currently debugged module in x64dbg.
  • Intuitive GUI integration via the plugin menu.
  • Error and status notifications via message boxes and log messages.
  • Architecture independence: supports both x86 (Win32) and x64 builds.

Requirements

  • x64dbg (with recent plugin SDK, both x86 and x64 supported)
  • CMake >= 3.15
  • Visual Studio with C++17 support, or any compatible Windows C++17 compiler.
  • FASM .fas file for the binary you are debugging (must be produced with compatible project options!)

Installation

  1. Build the plugin (see Build Instructions below).
  2. Copy the compiled plugin (FASMDbgHelper.dp32 for x86 or FASMDbgHelper.dp64 for x64) to your x64dbg plugins folder for the corresponding architecture:
    • x64dbg/x64/release/x64/plugins/ (for x64)
    • x64dbg/x32/release/x86/plugins/ (for x86)
  3. Restart x64dbg.

Usage

  1. Start debugging your binary in x64dbg.
  2. Pause the process at a valid instruction pointer (EIP/RIP) for your main module.
    • The plugin locates module base relative to the current EIP/RIP, so this step is required.
  3. Open the Plugins → FASMDbgHelper → Load Labels menu.
  4. Select your compiled .fas file using the file dialog.
  5. The plugin will import all suitable labels as comments and x64dbg labels for your debugged module.
  6. If successful, a message box confirms the import.

You can access plugin information via Plugins → FASMDbgHelper → About.


Build Instructions

FASMDbgHelper uses CMake for building. You need to have x64dbg’s plugin SDK and dependencies available, and set the X64DBG_ROOT path to your x64dbg source tree.

1. Prepare

  • Download or clone the source.
  • Place it alongside the x64dbg sources or set the path in CMake.

2. Build:

From the root of the repository, run in your terminal:

mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 ..    # or -A Win32 for 32bit build
cmake --build . --config Release

Debug Output

When compiled with the DEBUG flag, the plugin provides extensive logging:

  • File parsing progress
  • Memory allocation status
  • Symbol filtering details
  • Module base address detection
  • Label setting success/failure
  • Error diagnostics

Error Handling

The plugin includes comprehensive error handling for:

  • Invalid .fas file format
  • Memory allocation failures
  • Module detection issues
  • Symbol parsing errors
  • File access problems

Troubleshooting

Common Issues

  • "No process is being debugged" Solution: Start debugging a process in x64dbg first
  • "Failed to get module base address" Solution: Ensure the EIP is within the module you want to load symbols for
  • "No symbols were loaded" Solution: Check that your .fas file contains valid symbols and was generated with the correct FASM options
  • "Invalid .fas file signature" Solution: Ensure the file is a valid .fas file generated by FASM

Debug Mode

Enable debug output by compiling with the DEBUG flag. This provides detailed logging to help diagnose issues.

Contributing

Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest new features.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

CynicRus - Version 1.0

About

A simple x64dbg plugin that loads FASM (Flat Assembler) symbol information from .fas files directly into the debugger as labels

Resources

License

Stars

Watchers

Forks

Packages

No packages published