Interface IBinaryPattern
- All Known Implementing Classes:
BinaryPattern
Definition of a binary pattern. The pattern can be masked. The basic verification routine
does something like:
if(checkedByte[i] == (pattern[i] & mask[i])) ... - See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]Binary bytes.getExtra()Get some extra data associated to this pattern.byte[]getMask()Binary mask.intValid processor mode for this Binary Pattern.intThe real start offset.booleanvalidate(INativeCodeAnalyzer<?> gca, long address, byte[] buffer, int offset, int offsetEnd) Final validation.
-
Method Details
-
getBinary
byte[] getBinary()Binary bytes. Mandatory.- Returns:
- binary bytes
-
getMask
byte[] getMask()Binary mask. Optional. If present, must have same length asgetBinary().- Returns:
- binary mask, or null
-
getRealStartOffset
int getRealStartOffset()The real start offset.- Returns:
- real start offset
-
getProcessorMode
int getProcessorMode()Valid processor mode for this Binary Pattern. Can beIProcessor.MODE_DEFAULTif valid in any mode.- Returns:
- processor mode
-
validate
boolean validate(INativeCodeAnalyzer<?> gca, long address, byte[] buffer, int offset, int offsetEnd) Final validation. Optional method.- Parameters:
gca- native code analyzeraddress- address being checkedbuffer- data bufferoffset- start offset in the bufferoffsetEnd- end offset in the buffer- Returns:
- true if the candidate match is valid
-
getExtra
Object getExtra()Get some extra data associated to this pattern. Client specific.- Returns:
- optional data
-