Does this mean:a) I end up badly when I get drunkb) Things end up badly when I get drunkc) People end up badly when they get drunk with med) People end up badly when they get drunk around mee) Things end up badly when people get drunk around me

I couldn't say what that statement means. I've never heard "ends badly" expressed that way.
"Getting drunk (usually, often, always, sometimes) ends badly for me" is what I would expect to hear and the meaning is quite clear.

"with me " or "for me" are both meaningful. The difference between them seems to be more of a nuance. "With" seems to affect others more than me; "for" affects me more than others.

So, and having trouble with the examples:

- for : drinking alone, waking up completely hung over, and finding you have painted the flat with pictures of Fidel Castro in tomato sauce and mustard and Joe McCarthy is expected for breakfast.

- with : Got drunk with the firm's main client told them the product was a bag of s***, woke up with a massive hangover in the afternoon, found a text from work "client cancelled", you, your brother, your mother, your sister, your sister's husband, and your best friend are now out of work.