private void handleIndirectCall(PcodeOp pcodeOp, Address indirectPtr, Varnode destValue,
			ContextState currentState, TaskMonitor monitor) throws InlineCallException,
			CancelledException {

		Function func = null;

		Address destAddr = null;
		List<Address> destinations = handleIndirectFlow(pcodeOp, destValue, currentState, monitor);
		if (destinations != null && !destinations.isEmpty()) {
			destAddr = destinations.get(0);
		}
		else if (destValue.isConstant()) {
			destAddr = pcodeOp.getSeqnum().getTarget().getNewAddress(destValue.getOffset());
		}
		if (destAddr != null) {
			func = program.getListing().getFunctionAt(destAddr);
		}
		if (func == null) {
			if (indirectPtr != null) {
				// Check pointer thunk
				func = program.getListing().getFunctionAt(indirectPtr);
			}
			else if (destValue.isConstant()) {
				Address thunkAddr = externalThunkMap.get(destAddr.getOffset());
				if (thunkAddr != null) {
					func = program.getListing().getFunctionAt(thunkAddr);
				}
			}
		}
		else if (func.isInline()) {
			throw new InlineCallException(func.getEntryPoint());
		}

		if (func == null) {
			if (DEBUG) {
				Msg.debug(this, "Function not found at " + indirectPtr +
					" indirectly called from " + pcodeOp.getSeqnum().getTarget() +
					" - call affects unknown");
			}
			return;
		}

		applyFunctionAffects(pcodeOp.getSeqnum(), destAddr, func, currentState, monitor);

		applyFunctionPurge(pcodeOp.getSeqnum(), destAddr, func, currentState, monitor);
	}
Returns list of registers which are read before written.
Ghidra/Features/Base/src/main/java/ghidra/util/state/ResultsState.java