After debugging the process I have found the answer.
To reregister you have to open UnifiedAgentConfigurator.exe
In my case the installation was in:
C:\ASR\Agent\agent\UnifiedAgentConfigurator.exe
The path will depend on your installation path.