There's a table of dates (presumably), dbo.date.
The first SET command sets the @EndDate variable to be the most recent date from the dbo.date table that is earlier than the current datetime.
The second SET command sets @BeginDate to 12 months before @EndDate.
Cheers!