the answer is: The share investors
When a joint-stock company is established, several share investors have made an agreement among themselves regarding the percentage of capital owned by each investors, the loss and profit distribution among the investors, and the roles that each investors shall take within the company/
Technically, all the money and property that bought by the company all belong to this small group of investors. If the company is being liquidated, all of those property would be sold and spread proportionally to the investors' ownership percentage.