-
Notifications
You must be signed in to change notification settings - Fork 281
Better workflow for loading and applying the type of an API function #7434
Description
A very common workflow in malware analysis is to identify API function via hashes (or other ways). Right now, a pain point is that after you identify a specific API function, there is no straightforward way of applying that type to a variable. One would have to 1) find and import the type library, 2) apply the type of the function.
For 1), there is no UI to do it, and we have to do it through the API, which is quite inconvenient. (Python equivalent: type_lib = bv.platform.get_type_libraries_by_name(lib + '.dll')[0]) I would suggest that we add support for it though the typelib browser.
For 2), even if the type library is already imported, we cannot simply press Y and set the type to the API function, e.g., CreateFileA. That is because the type needs to be imported first (Python equivalent: t = bv.import_library_object(name, type_lib)) before it can be used. The next issue I hit is even after the type is imported, I cannot set a variable's type using its name, e..g, I cannot set the type of a variable to CreateFileA -- I know this is because the function types are all named objected rather than types in the type library, though I do not really understand the differences. Another slight inconvenient is that the types in the type library is the type of the function itself, and usually we want a pointer of the type
Related to #3635 and Vector35/debugger#210