There's a button which, when clicked, writes some data to the clipboard. I'm trying to call the function this button executes using DLL Injection. I managed to find the function in win32u.dll which accesses the clipboard, and I was able to set a breakpoint there which gets triggered. Obviously, I don't want to call this function directly, but the function that calls it (from the origin program). How do I figure this address out?
I can't use the buttons handle since the button doesn't show up in any UI spy tools and as it is a part of a context menu, it disappears as soon as the focus is lost.
I'm using x64dbg as a debugger, but if you know a solution in OllyDbg, that will be fine since I know how to use both.