/* Untaint the register */ bool TaintEngine::untaintRegister(const triton::arch::Register& reg) { if (!this->isEnabled()) return this->isRegisterTainted(reg); this->taintedRegisters.erase(reg.getParent()); return !TAINTED; }
void Instruction::removeWrittenRegister(const triton::arch::Register& reg) { auto it = this->writtenRegisters.begin(); while (it != this->writtenRegisters.end()) { if (it->first.getId() == reg.getId()) it = this->writtenRegisters.erase(it); else ++it; } }
void Instruction::updateContext(const triton::arch::Register& reg) { this->registerState[reg.getId()] = reg; }
/* Returns true of false if the register is currently tainted */ bool TaintEngine::isRegisterTainted(const triton::arch::Register& reg) const { if (this->taintedRegisters.find(reg.getParent()) != this->taintedRegisters.end()) return TAINTED; return !TAINTED; }