Is there any (hidden) built-in function on MS-SQL to unquote object names?
Sometimes I store objects names in some of our databases
I must take care to store this names always with or without brackets.

An &quot;object name&quot; is technically called an identifier.  In some contexts an identifier will be appear TSQL code surrounded by [ and ] or &quot; and &quot;.  These characters are not part of the identifier, and you should never store them.
Instead store the identifier as a nvarchar(128) (or sysname), and add the delimiters at runtime using the QUOTENAME function.
The inverse of QUOTENAME is PARSENAME, which has the additional ability to navigate multi-part names.
Note that QUOTENAME has an optional second parameter, and if you specify a single quote character for that parameter QUOTENAME does not create a valid delimited identifier expression.  It emits a varchar literal expression.