Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not follow conditional branching targets (JNE/JNZ) #3090

Open
the-Arioch opened this issue Feb 2, 2023 · 2 comments · May be fixed by #3146
Open

Can not follow conditional branching targets (JNE/JNZ) #3090

the-Arioch opened this issue Feb 2, 2023 · 2 comments · May be fixed by #3146
Labels
rizin Needs changes into rizin codebase.

Comments

@the-Arioch
Copy link

Environment information

  • Operating System: Windows 7 x64
  • Cutter version: 2.1.2 release and 2.1.2-git-1211 baeffba
  • Obtained from: Downloaded release from Cutter website or GitHub
  • File format: Win64 DLL (WinXP)

I am trying to fix Windows Clipboard API deficiency with non-Latin clipboard layouts. I can explain more, but it would be verbose offtopic here probably,

To do so, i must design more or less generic hooks that would work in both Win32 / WoW64 / Win64 and in a vast range of Windows versions too. Win32 hooks i already did, now time for Win64.

So, as of now, i am sitting at Windows 7 box and am looking into USER32.DLL taken form 64-bit WinXP and looking into OpenClipboard function.

  • xp_x64_user32.dll
  • 1 086 976 bytes
  • ver. 5.2.3790.3959 (srv03_sp2_rtm.070216-1710)
  • MD5 377aadb366b617396a6daf0d206a5c55
  • https://t.me/cutter_re/50349

The problem there, it seems that VC++ there did a heavy inlining, and so, the code flow can not be automatically separated into well-defined functions. Which in turns creates a non-navigable code in Disassembly panel.


xp_USER32_dll_OpenClipboard


2023-02-01 22_42_58-Cutter – WinTargets_xp_x64_user32 dll


2023-02-01 22_57_21-Cutter – WinTargets_xp_x64_user32 dll


See the 0x77c5d45a 0f 85 7a ec ff ff jne 0x77c5c0da opcode

The left slider clearly shows the outgoing arrow, and the Graph panel confirms it. Still...

  1. double-clicking or pressing Enter key does not result in scrolling to the branch target.
  2. Not sure if it causes at least hgilighting of the targe code block - can not have both in the screen at once. Definitely does not highlight it in the secondary Disasm panel.
  3. the context menu does not have a command like "Go/follow/scroll to 0x77c5c0da"
  4. when i open x-refs - they are empty!

2023-02-02 03_40_01-Cutter_WinTargets_xp_x64_user32 dll

@the-Arioch
Copy link
Author

WOW !

Is it something like "relative address can not go negative and so was lost" ???

2023-02-02 05_34_56-Cutter – D__DelphiProjects_Burov_XE2fixes_CopyPaste_WinTargets_xp_x64_user32 dll

@the-Arioch
Copy link
Author

Just for the record

2023-02-02 05_33_28-Issues · rizinorg_cutter - Vivaldi

whol-hoopa pushed a commit to whol-hoopa/cutter that referenced this issue Feb 23, 2023
whol-hoopa pushed a commit to whol-hoopa/cutter that referenced this issue Mar 5, 2023
whol-hoopa pushed a commit to whol-hoopa/cutter that referenced this issue Mar 5, 2023
whol-hoopa pushed a commit to whol-hoopa/cutter that referenced this issue Mar 9, 2023
whol-hoopa pushed a commit to whol-hoopa/cutter that referenced this issue Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rizin Needs changes into rizin codebase.
Projects
None yet
2 participants