Interface IBinaryPattern

All Known Implementing Classes:
BinaryPattern

@Ser public interface IBinaryPattern
Definition of a binary pattern. The pattern can be masked. The basic verification routine does something like: {@code if(checkedByte[i] == (pattern[i] & mask[i])) { ... } @author Nicolas Falliere @see BinaryPatternVerifier
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Binary bytes.
    Get some extra data associated to this pattern.
    byte[]
    Binary mask.
    int
    Valid processor mode for this Binary Pattern.
    int
    The real start offset.
    boolean
    validate(INativeCodeAnalyzer<?> gca, long address, byte[] buffer, int offset, int offsetEnd)
    Final validation.
  • Method Details

    • getBinary

      byte[] getBinary()
      Binary bytes. Mandatory.
      Returns:
    • getMask

      byte[] getMask()
      Binary mask. Optional. If present, must have same length as getBinary().
      Returns:
    • getRealStartOffset

      int getRealStartOffset()
      The real start offset.
      Returns:
    • getProcessorMode

      int getProcessorMode()
      Valid processor mode for this Binary Pattern. Can be IProcessor.MODE_DEFAULT if valid in any mode.
      Returns:
    • validate

      boolean validate(INativeCodeAnalyzer<?> gca, long address, byte[] buffer, int offset, int offsetEnd)
      Final validation. Optional method.
      Parameters:
      gca -
      address -
      buffer -
      offset -
      offsetEnd -
      Returns:
    • getExtra

      Object getExtra()
      Get some extra data associated to this pattern. Client specific.
      Returns:
      optional data