It’s been said before - a guy can talk smack when in the company of his guy friends, boys will be boys - just so long as he knows how to behave when he’s with ladies.
Off-colour jokes by a guy doesn’t make him a bad guy. It’s when he doesn’t have the capacity to recognize the difference between a joke and ghattiya thinking about women that there may be an issue.