I'm curious what you mean by illegal issues? Are you saying there are items that aren't up to code? There are zillions of homes out there that aren't up to code, because codes change over the years. That doesn't make them "illegal". It's up to you and whether you want to buy a property with issues or not.
Your agent should be doing a market analysis on the home to see what similar homes have been selling for in recent months. If it does need a lot of work, then make your offer and see what happens. They can reject your offer, counter it, or accept it!
If the property has something illegal and that would prevent conventional financing, I can see a cash sale as a solution to the problem.
Put yourself in the sellers shoes and if its a mutually beneficial solution, it may work. Low balling may shut the communication channels down.