3

in x32/x64 debugger, how can I break when a new window is opened?

When inside my application, I click the "File" button in the menu bar then select "options" I want to break on that call to open the window. (The window has multiple tabs, with checkboxes and buttons etc I am not sure what type of window this is called)

The application I am debugging will show more options if the serial key is valid than if the serial key is missing/invalid so Im trying to break when it does its checking.

Raz Razman
  • 361
  • 1
  • 3
  • 8

1 Answers1

3

You should place a breakpoint to the window-creating APIs. Here is my list of APIs that might open a window.

        <Api Name="CreateDialogIndirectParamA"/>
        <Api Name="CreateDialogIndirectParamW"/>
        <Api Name="CreateDialogParamA"/>
        <Api Name="CreateDialogParamW"/>
        <Api Name="CreateWindowA"/>
        <Api Name="CreateWindowExA"/>
        <Api Name="CreateWindowExW"/>
        <Api Name="CreateWindowW"/>
        <Api Name="DialogBoxIndirectParamA"/>
        <Api Name="DialogBoxIndirectParamW"/>
        <Api Name="DialogBoxParamA"/>
        <Api Name="DialogBoxParamW"/>
        <Api Name="MessageBoxA"/>
        <Api Name="MessageBoxExA"/>
        <Api Name="MessageBoxExW"/>
        <Api Name="MessageBoxIndirectA"/>
        <Api Name="MessageBoxIndirectW"/>
        <Api Name="MessageBoxTimeoutA"/>
        <Api Name="MessageBoxTimeoutW"/>
        <Api Name="MessageBoxW"/>

Use programs such as API Monitor to find how the application opens the window, and place a BP on it.

Mick
  • 7,562
  • 3
  • 26
  • 40
Shmuel Fomberg
  • 263
  • 2
  • 8