diff options
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index fa0a4716..57f896dd 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -22342,6 +22342,19 @@ namespace BinaryNinja { virtual std::optional<DerivedString> RecognizeImport( const HighLevelILInstruction& instr, Type* type, int64_t val); + /*! Can be overridden to recognize strings for constant data expressions (HLIL_CONST_DATA). + These expressions are generated by the outline resolver when it recovers constant data + streams from scattered stores. The instruction provides access to the data buffer and + builtin type via its \c constant_data accessor. + + If a string is found, return a \c DerivedString with the string information. + + \param instr High level expression containing the constant data + \return Optional \c DerivedString for any string that is found + */ + virtual std::optional<DerivedString> RecognizeConstantData( + const HighLevelILInstruction& instr); + /*! Registers the string recognizer. \param recognizer The string recognizer to register. @@ -22361,6 +22374,8 @@ namespace BinaryNinja { int64_t val, uint64_t offset, BNDerivedString* result); static bool RecognizeImportCallback( void* ctxt, BNHighLevelILFunction* hlil, size_t expr, BNType* type, int64_t val, BNDerivedString* result); + static bool RecognizeConstantDataCallback( + void* ctxt, BNHighLevelILFunction* hlil, size_t expr, BNDerivedString* result); }; class CoreStringRecognizer : public StringRecognizer @@ -22376,6 +22391,8 @@ namespace BinaryNinja { const HighLevelILInstruction& instr, Type* type, int64_t val, uint64_t offset) override; std::optional<DerivedString> RecognizeImport( const HighLevelILInstruction& instr, Type* type, int64_t val) override; + std::optional<DerivedString> RecognizeConstantData( + const HighLevelILInstruction& instr) override; }; } // namespace BinaryNinja |
