private HashMap<Address, Long> associateResource(String resourceRoutine, int paramIndex,
			AddressSetView restrictedSet, boolean printScriptMsgs) {

		HashMap<Address, Long> constUse = new HashMap<>();

		Symbol symbol = lookupRoutine(resourceRoutine, printScriptMsgs);
		if (symbol == null) {
			return constUse;
		}

		//Continue along if a symbol was found
		routines.add(symbol.getAddress());
		paramIndexes.add(paramIndex);
		ArrayList<PcodeOp> defUseList = new ArrayList<>();
		defUseLists.add(defUseList);

		HashSet<Address> doneRoutines = new HashSet<>();

		//Have a list of routines found based on symbol lookups
		while (routines.size() > 0) {
			// get the next routine to lookup
			Address addr = routines.remove(0);
			paramIndex = paramIndexes.remove(0);
			defUseList = defUseLists.remove(0);

			if (doneRoutines.contains(addr)) {
				continue;
			}

			doneRoutines.add(addr);

			// Get the list of references to this address
			ReferenceIterator referencesTo =
				currentProgram.getReferenceManager().getReferencesTo(addr);
			for (Reference reference : referencesTo) {
				if (monitor.isCancelled()) {
					break;
				}

				// Get the address of the function which is referenced
				Address refAddr = reference.getFromAddress();

				// if set is null, do no checks
				if (restrictedSet != null && !restrictedSet.contains(refAddr)) {
					continue;
				}

				// was this location already checked?
				if (alreadyDoneAddressSetPropertyMap != null) {
					if (alreadyDoneAddressSetPropertyMap.contains(refAddr)) {
						continue;
					}
					alreadyDoneAddressSetPropertyMap.add(refAddr, refAddr);
				}

				Function refFunc =
					currentProgram.getFunctionManager().getFunctionContaining(refAddr);

				if (refFunc == null) {
					refFunc = UndefinedFunction.findFunction(currentProgram, refAddr, monitor);
				}

				// this is an indirect reference, need to add the references to here.
				if (refFunc == null && reference.isExternalReference()) {
					routines.add(reference.getFromAddress());
					paramIndexes.add(paramIndex);
					defUseLists.add(new ArrayList<PcodeOp>());
					continue;
				}

				if (refFunc == null) {
					continue;
				}

				// decompile function
				// look for call to this function
				// display call
				@SuppressWarnings("unchecked")
				ArrayList<PcodeOp> localDefUseList = (ArrayList<PcodeOp>) defUseList.clone();

				monitor.setMessage(
					"Analyzing : " + refFunc.getName() + " for refs to " + resourceRoutine);

				analyzeFunction(constUse, decomplib, currentProgram, refFunc, refAddr, paramIndex,
					localDefUseList);
			}
		}

		return constUse;
	}
Associates a resource name with the name and ID of that resource
@param resourceRoutine - Name of the resource routine
@param paramIndex - Argument index of windows function call for resource lookup
@param restrictedSet - Address space to use
@param printScriptMsgs - if true, print output; if false, do not print any output;
@return HashMap<Address, Long> map of addresses
Ghidra/Features/Decompiler/ghidra_scripts/WindowsResourceReference.java