As chief risk officer, going into a public company that goes bad not even 2 months after being hired -for strictly risk mismanagement, not fraud- tells you all you need to know about the competency of the person being hired.
EDIT: Sincerely curious about downvotes:
You are interviewing for a CTO job. As part of the process, you get unrestricted access to prod codebase. The stack/ libraries are something you are very familiar. You find out the software will be a critical component to make payments to people worldwide. Its a high profile project. You are the public face of the software that must go live very soon, no one can tell for sure, but its imminent.
Your (interview) prep finds a dumpster fire. There's no way this thing will even run. The entire thing is not salvageable.
Do you take the job ?