private void createData(PushedParamInfo paramInfo, Address address) {

		Listing listing = currentProgram.getListing();
		DataType dt = paramInfo.getDataType();
		if (!listing.isUndefined(address, address.add(dt.getLength() - 1))) {
			return; // don't overwrite existing data
		}

		CreateDataCmd cmd = new CreateDataCmd(address, dt);
		if (!cmd.applyTo(currentProgram)) {
			Msg.error(this, "Error making data: " + cmd.getStatusMsg());
		}
	}
This will return true if enough pushes before top of function.
This will return false if not enough pushes or if not a function.
Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/plugin/prototype/MicrosoftCodeAnalyzerPlugin/PropagateExternalParametersAnalyzer.java