I'm fairly sure the CEO isn't aware of everything and how it's done, but I'd still be complaining to him about his buddy.
Well that sucks. I'd still want to sit down with them and lay out my case in a non judgmental/blame/accusatory manner, but you and I are different people. I've worked with people like that and I don't know why but I don't find them to treat me the way they treat others, and so far I've not been able to figure out what I do exactly that shuts them down when I'm dealing with them - at least not well enough to help others.
It feels a lot like dealing with a child, and the best I can say is to stand your ground and continue to say no to their unreasonable demands, trying to help them understand what is possible/reasonable, and completely ignoring - not even responding in any way - to anything they say which is irrelevant or was conveyed in a rude manner or meant to get a rise out of you.
The last time I tried informing upper management about such a bad apple, they held meetings to try to understand the problem, then nothing changed. Eventually that company lost all the great people who'd been working there for years, and thus lost an incalculable amount of knowledge and skill specific to the product. They've never recovered.
If you don't feel like you can even broach the subject, though, then your only option is to start finding your next job. Whether you start your job search now or later, you need to be out of there in a few months before you get to the point where you accept the abuse and stick around. Cut your losses now.
Given the protections you have in your country regarding firing decisions, I'd say you don't have nearly as much to lose bringing up the subject, and changing your behavior and patterns you use dealing with him. Who knows, you might actually be able to find a way to make it work.[DOUBLEPOST=1498236503,1498236230][/DOUBLEPOST]Also, you'll continue to run into people like this throughout your career and life. It's worth spending time, perhaps with a professional, figuring out how to deal with them so you don't come to harm (emotional/mental/etc). I know, it's terrible we have to deal with people like this in society, and they typically do get ahead simply because they figured out a pattern of working people over to get what they want, but we can't change them, so if we can change ourselves and perhaps society so those patterns no longer work, then things might get better.