yes, paying dividends out of debt is completely illegal
but apparently not if you wrap it in half a dozen companies in various tax havens
(that have no legitimate purpose other than various types of laundering)