If they're good friends, they will see what he is doing and ignore him. If not, you might have to wait this out.
I can tell you that the more you react, the more he will bug you. When you flail around, holler at him, stamp your feet, whine about your friends - or whatever reaction you have - HE WINS. And he will win - every single time you react.
The trick is to show no reaction to what he is doing or saying. You need to act unconcerned. When someone does something outrageous, they are dying for someone to cry, or whine about how unfair they are being.
If he says something embarrassing about you to your friends, say, "oh my goodness, I can't believe you remember that. It was so long ago", smile and walk away. I can tell you that almost everyone has done something embarrassing when they were younger.
When he cannot get a reaction out of you, no matter what he does, he will find another target. This is what siblings do.
Smile and walk away. Don't inflame the situation by getting into an argument with him - it won't work. Be classy and stay cool. This, too, will run its course.