-
Notifications
You must be signed in to change notification settings - Fork 245
Description
Version and Platform (required):
- Binary Ninja Version: 4.2.6455
- OS: macOS
- OS Version: 15.3
- CPU Architecture: x64
Bug Description:
Given one database with full annotation, custom types, correct function names, correct variable names, and a new file getting a fresh analysis, functions with a custom type in the function's type cause WARP to only partially work. The type name of the argument changes, but the variable is still arg1
. Also, I can tell by the return type still being grey that there was something that failed during the setting of the new function type and it only partially completed. The name of the function still starts with sub_
.
Steps To Reproduce:
- Open a database with full custom types, connected to a type library, funtion names, everything that can be annotated is done.
- Move all the old SigKit signatures out of the signatures directory for the duration of this process so they don't have a chance to add any interactions with any of this.
- Make a signature file from the database using WARP
- Disable WARP sig matching in binja config. If you don't have the type archive attached before WARP runs, this function gets nothing at all. Not even the partial change here.
- Open a new file that doesn't have a database yet.
- Notice that if a function has a custom type in its type that type name appears, but the function name doesn't change nor do the variable names.
- **Expected Behavior:**The function should have the name changed, it should be WARP tagged, parameters renamed, all the usual WARPy stuff.
Screenshots/Video Recording:
z_stream
is a linked custom type that is found in NSIS installers. this isn't the whole type. Just the top piece that I needed, but that shouldn't have an effect.

Here is the source database:

Here is the result in the new file:

Binary:
You can use the same zlib nsis sample I already sent you.
Additional Information:
This part is probably a feature request in addition to the bug above. Or maybe I am missing a step or feature: Having a type archive connected to a database and specific types pulled in seems to help with WARP. It would be good if there were a way to do the type library connection and pull before WARP does its thing without having to just turn off the WARP matcher and then run it manually. Maybe WARP can be linked to a type archive? Maybe I can do something in open with options? Maybe there's already some way I'm missing?