static void callbackBefore(IRBuilder *irb, CONTEXT *ctx, BOOL hasEA, ADDRINT ea, THREADID threadId) { /* Some configurations must be applied before processing */ processingPyConf.applyConfBeforeProcessing(irb); if (!analysisTrigger.getState()) /* Analysis locked */ return; if (hasEA) irb->setup(ea); /* Update the current context handler */ ap.updateCurrentCtxH(new PINContextHandler(ctx, threadId)); /* Setup Information into Irb */ irb->setThreadID(ap.getThreadID()); /* Python callback before IR processing */ processingPyConf.callbackBeforeIRProc(irb, &ap); Inst *inst = irb->process(ap); ap.addInstructionToTrace(inst); /* Export some information from Irb to Inst */ inst->setOpcode(irb->getOpcode()); inst->setOpcodeCategory(irb->getOpcodeCategory()); inst->setOperands(irb->getOperands()); /* Python callback before instruction processing */ processingPyConf.callbackBefore(inst, &ap); }