Loveable Rogue (Loveable RogueWiki?)
The lovable rogue is a literary trope in the form of a character, often from a dysfunctional or working-class upbringing, who tends to recklessly defy norms and social conventions but who still evokes empathy from the audience or other characters. The lovable rogue is generally male and is often trying to "beat the system" and better himself, though not by ordinary or widely accepted means. If the protagonist of a story is also a lovable rogue, he is frequently deemed an antihero.
This would describe someone like Han Solo, mentioned above. And Chaotic Good, also previously mentioned, is a popular alignment for rogues.