(idiomatic, sometimes euphemistic for improper behavi) Anything, including measures which may be extreme or wrongful, that is required to achieve an objective.
Wiktionary
Whatever-it-takes Sentence Examples
They want fame and will do whatever it takes to get it.
Then she added, "Julie practically begged me to bring Molly out there and help the both of them to get back home, whatever it takes to do so."
I will try to do whatever it takes to keep you there.
The Immortal side of him is weak. He'll do whatever it takes to get his mate back, and I intend to plant the idea in his head.