When you create a procedure with the sp_ prefix in Master it's callable in the context of any database. The only additional thing sp_MS_marksystemobject appears to do is to make the static SQL in the procedure resolve object names in the context of the current database, rather than the context of the database containing the stored procedure.
You can accomplish this without using an undocumented procedure, as dynamic SQL always resolves object names with respect to the current database, not the database containing the stored procedure.
use master
go
create or alter procedure sp_test
as
begin
declare @sql nvarchar(max)= N'
select * from sys.objects
';
exec sp_executesql @sql
end
go
--and execute
exec msdb..sp_test
So all you have to do is take the body of your "system stored procedure" and paste it into a nvarchar(max) literal string, escaping any single quotes by replacing ' with '', and run it with sp_executesql.