I know this is not the answer your looking for, but that answer is the not going to help you. This is not a virus, it is a browser redirect. It causes big problems because users freak out, and do exactly what you did, wind up spending money trying to detect a problem that does not exist, thinking it must exist because they knew something bad that only Microsoft could know! One detection failure leads to many tools battling for your systems resources which, cause your system to run slow, and soon re-installing the OS seems the only way out. The good news is you did not call them, and give a tech support scammer remote access, or your credit card to fix this.
Facebook verifies an ad's content will not cause problems. But after the ad is verified, the traffic is either redirected, or changed to cause your browser to block you from using your mouse on the page (very basic explanation).
They use information from your advertising ID to know what your interests are, and generate this stuff accordingly. Also in Facebook it may just be you belong to a group that market research suggests would be interested in adult-based ads because your friends are.
The bottom line is no virus detection will ever find this, and re-installing your OS will not change your browsing behavior. The best thing is to know Microsoft does not do this, the FBI would just arrest you, if you did something seriously illegal and you are in the US, and any message demanding money in exchange for not causing you any embarrassment or harm is illegal.
Also, just knowing what this is should be enough next time. It is browser redirect, plain and simple.