public static Set<Address> findImageBaseOffsets32(Program program, int alignment,
			Address toAddress, TaskMonitor monitor) throws CancelledException {

		if (monitor == null) {
			monitor = TaskMonitor.DUMMY;
		}

		Memory memory = program.getMemory();

		Address imageBase = program.getImageBase();

		long offsetValue = toAddress.subtract(imageBase);
		int offsetSize = 4; // 32 bit offset
		byte[] bytes = new byte[offsetSize];
		for (int i = 0; i < offsetSize; i++) {
			bytes[i] = (byte) offsetValue;
			offsetValue >>= 8; // Shift by a single byte.
		}

		Set<Address> iboRefsAddrs = new TreeSet<>();

		findBytePattern(memory, (AddressRange) null, bytes, alignment, iboRefsAddrs, monitor);

		return iboRefsAddrs;
	}
Checks a programs memory for 32 bit image base offset references to the address 
indicated.  These relative references are only found at addresses that match the 
indicated alignment. 

@param program the program whose memory is to be checked.
@param alignment 32 bit image base offset relative references are to only be found 
at the indicated alignment in memory.
@param toAddress address that we are interested in finding references to.
@param monitor a task monitor for progress or to allow canceling.
@return list of addresses with 32 bit image base offset relative references to the 
toAddress

@throws CancelledException if the user cancels via the monitor.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMemoryUtil.java