public void setRegisterValue() {
		Register reg = program.getRegister(is64Bit ? "GS_OFFSET" : "FS_OFFSET");
		BigInteger val = BigInteger.valueOf(tebAddress.getOffset());
		for (MemoryBlock block : program.getMemory().getBlocks()) {
			if (!block.isExecute()) {
				continue;
			}
			SetRegisterCmd cmd = new SetRegisterCmd(reg, block.getStart(), block.getEnd(), val);
			cmd.applyTo(program);
		}
	}
Set FS_OFFSET for 32-bit or GS_OFFSET for 64-bit to the address of the TEB across the program.
Ghidra/Features/Base/src/main/java/ghidra/app/util/datatype/microsoft/ThreadEnvironmentBlock.java