We beat our way windward.
A vessel has the weather gage of another when she is to windward of her. A weatherly ship is one that works well to windward, making but little leeway.
His code was the end justified the means with men who operated windward of the law. Since thieves followed no rules, he played the game accordingly, with a slight variation. He wrote his own rules as he went along.