binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

`HKEY_LOCAL_MACHINE` enumeration (and others) missing

Open op2786 opened this issue 3 years ago • 4 comments

Binary Ninja Version: 3.4.4090-dev Platform: Windows 11 Version 22H2

if (RegOpenKeyExA(ffffffff80000002, "Software\Microsoft\Cryptography", 0, 0x101, &hKey) == NO_ERROR) {

Enum member (M) feature can not find a enumeration for ffffffff80000002.

There are other missing enumerations too, I don't want to open an issue for each of them. I.E INFINITE, SC_MANAGER_ALL_ACCESS, SOCK_STREAM, IPPROTO_TCP, SW_HIDE, SW_SHOW, STATUS_FATAL_APP_EXIT, SIOCGIFHWADDR etc.

op2786 avatar Feb 22 '23 08:02 op2786

Ok I looked into this issue and the root cause of this is that we aren't creating enumerations for the "Constants" in the json: https://github.com/Vector35/win32json

So we need to do some preprocessing on the data and convert some of those to enumerations, and then re-emit some new type libraries.

plafosse avatar Mar 21 '23 20:03 plafosse

Another examples:

  • DEBUG_ENGOPT_*
  • DEBUG_OUTPUT_*
  • DEBUG_ATTACH_*
  • DEBUG_REQUEST_*
  • DEBUG_DATA_SizeEThread (so DEBUG_DATA_*)

I hope all of these missing enumerations will be resolved once enumerations for constants are added.

op2786 avatar Jan 26 '24 09:01 op2786

Constants for fdwReason parameter of DllMain is also missing. (DLL_PROCESS_ATTACH etc.)

op2786 avatar Feb 07 '24 08:02 op2786

Related to https://github.com/Vector35/binaryninja-api/issues/4432

xusheng6 avatar Jun 05 '24 08:06 xusheng6