public static unsafe int Disassemble(byte[] data, uint ip, DisassembleType type, out string result, int offset = 0) { uint size = (uint)(data.Length - offset); if (size > MaxCmdSize) { size = MaxCmdSize; } DisasmModel model = new DisasmModel(); Disassemble(data, size, ip, ref model, type); result = new string(&model.Dump); if (model.Error > 0) { result = new string(&model.Comment); return(-1); } else { result = new string(&model.Result); return(0); } }
public static unsafe int Disassemble(byte[] data, uint ip, DisassembleType type, out string result, int offset = 0) { uint size = (uint)(data.Length - offset); if (size > MaxCmdSize) size = MaxCmdSize; DisasmModel model = new DisasmModel(); Disassemble(data, size, ip, ref model, type); result = new string(&model.Dump); if (model.Error > 0) { result = new string(&model.Comment); return -1; } else { result = new string(&model.Result); return 0; } }
public static extern ulong Disassemble(byte[] src, uint srcsize, uint srcip, ref DisasmModel disasm, DisassembleType type);