I'm making an early guess that it is Porites sp. Take another photo when it has become larger and we might get a better idea. The polyps are very tiny, located at each of the light-colored spots. Your crab might not have truly harmed it.
Yes, Porites is relatively hardy. It will probably adapt to wherever you place it by modifying its growth form. It is found in a very wide range of conditions in reef (and even mangrove) environments.