Maybe check out Writing for emotional impact : advanced dramatic techniques to attract, engage, and fascinate the reader from beginning to end by Karl Iglesias
There are plenty of dramatic tools that make us at least identify with characters while we still find their actions abhorrent.
One of the most common anti-hero characters he uses is Melvin Udall from As Good As It Gets. Which definitely deserves a watch. I'm a gay man, and he opens the movie flinging some pretty offensive slurs. And somehow... I rooted for him by the end of the movie.
Karl breaks down the writing tools of WHY we root for a racist, homophobic, sexist creep. It's a great read and is the newest book I included in my list of recommended books!