The present participle is used to refer to the activity of masturbation in a larger completed sentence. Compare the word with the past tense wrang it out in the same passage: except I sure wrang it out a hunderd times thinkin about you.
The source is Brokeback Mountain. Jack did not roll his own. He did not did not jerk off alone. This sentence was omitted in the French translation of the short story.
with women, yeah, but Jesus H., ain't nothin like this. I
"sh*t no," said Jack, who had been riding more than bulls, not rolling his own. "You know that. Old Brokeback got us good and it sure ain't over. We got a work out what the f*ck we're goin a do now."
Here the verb "wrang" is used in the past tense as Ennis admits that he had jerked off, or masturbated many times. The adverb "out" serves to intensify the strong emotions of longing experienced while thinking about the friend he had not seen nor touched for four years.
"I never had no thoughts a doin it with another guy except I sure wrang it out a hunderd times thinkin about you." This is from the written novel Brokeback Mountain by Annie Proulx