Since Marvel comics came together with Sony studios, it is difficult to determine who has the character rights. Most likely, Marvel comics always kept the rights because they would most likely not have given away the characters rights of their own characters that this company created. Sony studios would most likely not have character rights.
Instead, Sony studios will make money from the movie if it is a big hit. It really doesn’t matter whether the movie become a hit or not, it depends on who owns the character rights. It is believed that Marvel kept the rights, but they may have signed a contract about the character rights, but most likely they did not. Instead, the just came together to make the movie.