yes it is tsql but with a weird way of declaring stuffs...
__setup is just setting variables to some default value could have been done using
@DECLARE @i__rc INT= 0 as well
and
__main_body is executing a storedprocedure with the name
USP_Core_CFR_SetUserName and a variable @vc__usr__name_CFR