public static BinHook CreateJMP(int hookLen, params BinElement[] code) { var hook = new BinHook(hookLen, null, new byte[1] { 0xE9 }); foreach (BinElement element in code) { hook.Add(element); } return(hook); }
public static BinaryEdit CreateEdit(string ident, int hookLen, params BinElement[] code) { var hook = new BinHook(hookLen, ident, new byte[1] { 0xE9 }); foreach (BinElement element in code) { hook.Add(element); } return(new BinaryEdit(ident) { hook, new BinLabel(ident) }); }