private Address findResource(String tableName, long rsrcID) throws CancelledException {

		SymbolIterator siter =
			currentProgram.getSymbolTable().getSymbolIterator(tableName + "*", true);

		if (!siter.hasNext()) {
			return null;
		}

		// Search each table
		while (siter.hasNext()) {
			monitor.checkCancelled();

			Symbol sym = siter.next();

			String symName = sym.getName();

			long curRsrcID = rsrcID;
			if (rsrcID != 0) {
				symName = symName.replaceAll(tableName + "_", "");
				//Find the specific table number of the resource
				String pattern = "_+[0-9]+";
				Pattern r = Pattern.compile(pattern);
				Matcher m = r.matcher(symName);
				String hexString = "";
				if (m.find()) {
					//Strip off the constant value to leave just the resource number
					hexString = symName.replaceAll(m.group(), "");
				}

				curRsrcID = Integer.parseInt(hexString, 16);
				curRsrcID = (curRsrcID - 1) * 0x10;
				curRsrcID = rsrcID - curRsrcID;
				if (curRsrcID > 0x10) {
					continue; // tables have 16 entries
				}
				if (curRsrcID < 0) {
					continue;
				}
			}

			Address currItemAddr = sym.getAddress();
			Data data = currentProgram.getListing().getDataAt(currItemAddr);

			while (curRsrcID > 0) {
				currItemAddr = data.getAddress();
				data = currentProgram.getListing().getDataAfter(currItemAddr);
				if (data == null || !data.isDefined()) {
					break;
				}
				curRsrcID--;
			}

			if (data == null) {
				continue;
			}

			if (curRsrcID == 0) {
				return data.getAddress();
			}

		}
		return null;
	}
Returns the address of the resource located in the program
@param tableName - Name of the resource table
@param rsrcID - ID of the resource to find
@return Address of the found resource
@throws CancelledException
Ghidra/Features/Decompiler/ghidra_scripts/WindowsResourceReference.java