You have few options and none of them are pretty. You and some other of her male friends need to back this guy into a corner, beat the holy fucking hell out of him and tell him that if he ever goes near her again, nobody will ever find his body. You tell him that you know the first thing on his mind will be to go beat her ass in retaliation for the beating he just got from you and that if he does that you'll remove his limbs and dick with a blow torch before you gut his stupid ass.
OR, there's the option that doesn't involve this guy charging you with assault and getting you locked away where you can never be there for your friend again, in addition to turning her against you for beating up the thing she loves. A real option involves you recognizing that it's her life and that if she wants to fuck it up by being a complete idiot, that's her business. You tell her "I'm sorry, but I can't watch you do this to yourself and your baby. Call me when you grow a brain" and wash your hands of her. You may lose your friend, but that's life.
Your friend is a fucking idiot, but she's not alone in the particular boat of retardness that she finds herself in. It will probably take a long time and a lot more beatings before she gets a fucking clue. Even after they take her baby, she still won't get it. She's gonna think that other people just don't understand, just like she thinks you don't understand, when the fact of the matter is that she's the one who doesn't fucking understand. Really, she may never get it.
So no, dude, there really isn't anything you can do to help her. You can tell her that you'll be there for her when she's ready to get away from him and that you'll help her in any way you can, but she needs to WANT that help first. Until that time comes (if it ever does), the only thing you can do is wash your hands of her and her whole dumbass situation.
If you do decide to fucking kill his ass though, I didn't fucking tell you to do that! Don't go running to your public defender with "Galen told me it was ok to maim, torture, and kill the bastard!" Fuck that, I like my asshole the size it is, you go to jail if you want but leave me out of it!
All My Loathing,