I'm currently debugging a program using x64dbg, and I'm struggling to set up a conditional breakpoint on the CreateFileW function:
HANDLE CreateFileW( [in] LPCWSTR lpFileName, [in] DWORD dwDesiredAccess, [in] DWORD dwShareMode, [in, optional] LPSECURITY_ATTRIBUTES lpSecurityAttributes, [in] DWORD dwCreationDisposition, [in] DWORD dwFlagsAndAttributes, [in, optional] HANDLE hTemplateFile ); Specifically, I need the breakpoint to trigger only when the function is called with a specific filename/path, such as "C:/my/file/txt.txt".
Despite searching online, I haven't found a clear solution for my scenario. Can anyone guide how to achieve this in x64dbg?
What I tried
I tried to set a conditional breakpoint with:
arg.get(0) == "C:/my/file/" However, that doesn't work, it seemingly breaks on every file, no matter the path.
- How can I set a conditional breakpoint for when the debugger is accessing the path of
C:/my/file/bla.txt?