java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.emulator.unicorn.UnicornEngine
All Implemented Interfaces:
AutoCloseable

public class UnicornEngine extends Object implements AutoCloseable
UnicornEngine wrapper. Most methods are not thread-safe.
  • Constructor Details

    • UnicornEngine

      public UnicornEngine(int arch, int mode)
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getErrorMessage

      public String getErrorMessage(int errorCode)
    • getLastError

      public int getLastError()
    • setCpuModel

      public void setCpuModel(int cpuModel)
    • memIsMapped

      public boolean memIsMapped(long address)
    • memMap

      public void memMap(long address, long size, int perms)
    • memWrite

      public void memWrite(long address, byte[] data)
    • memRead

      public void memRead(long address, byte[] data)
    • memRead32

      public int memRead32(long address)
    • memRead64

      public long memRead64(long address)
    • regRead

      public void regRead(int regId, byte[] buffer)
    • regWrite

      public void regWrite(int regId, byte[] buffer)
    • regRead32

      public int regRead32(int regId)
    • regWrite32

      public void regWrite32(int regId, int val)
    • regRead64

      public long regRead64(int regId)
    • regWrite64

      public void regWrite64(int regId, long val)
    • hookAdd

      public com.sun.jna.Pointer hookAdd(int hookType, com.sun.jna.Callback callback)
    • hookAdd

      public com.sun.jna.Pointer hookAdd(int hookType, com.sun.jna.Callback callback, long begin, long end)
    • hookDel

      public void hookDel(com.sun.jna.Pointer hook)
    • emuStart

      public void emuStart(long begin, long until)
    • emuStart

      public void emuStart(long begin, long until, long timeout, long maxcount)
    • emuStop

      public void emuStop()