Actually, it is not illegal to re-buy a stock within 30 days of selling. If you sell a stock within 30 days of the purchase of the exact same type of stock for a loss, it is known as a wash sale. You are not allowed to claim wash sales as a loss on tax returns. It gets to be more complicated from there though.
From the example given, it looks to be more like day-trading. You can buy/sell the same stock within the same day as long as you have the funds to cover the trade. If you don't, then you have to worry about being labeled as a "pattern day trader" which is prohibited.
At the end of the day, it seems like a tireless effort to keep this thing from sinking. Not sure it is worth it. Just let the stock play out, bottom, then buy from there.