It's a controller action, so you'd expect to see that in library/XenForo/ControllerAdmin.
It's a public template modification so you would be looking for TemplateModification.php.
That class extends TemplateModificationAbstract.php.
The specific code for saving a template modification would be public function actionSave() (because of /save/ in the url) and may appear in TemplateModification.php and/or TemplateModificationAbstract.php.