Skip to content

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

Open
@the-Arioch

Description

@the-Arioch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    rizinNeeds changes into rizin codebase.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions