yes, its legal, but most deals have anti-shorting clauses, provisions that are intended to prevent lenders/funders from manipulating and working against the share price to enrich themselves more than they already are by getting discounted shares...
whether allowed or legal, many do it anyway, through other accounts, usually off-shore