Read it more carefully. It's setting to 13 every p[i] where i % 92 == 90, and to 10 every p[i] where i % 92 == 91. In other words, it makes sure that there's a CRLF sequence at least once every 92 characters (including the sequence itself).
Just picked random part which is probably written specially for this code and not pasted from elsewhere and then run search on this site (I wanted to check this statement: "I probably copied it from someone's post here to test it."). So, here is the search request: