I offer this as a service. Typically when there’s a big acquisition and an audit of the codebase is needed, I gather up a group of developers each paid about $250/hr to go through the codebase and conduct audits looking for any red flags and giving an estimation of existing technical debt.
When I did code dilligence, I just add it to a list of possible risks... or areas we'd like deeper investigation. Usually go back over it in follow up.