While searching for King Mickey, Sora lands in Agrabah, while in Agrabah the heartless pop out. Sora defeat the heartless, then finds Jasmine. Then all of a sudden Jafar sends the heartless after Jasmine, and catches her. Sora and his gang go to the Cave of Wonders where he finds Aladdin and Abu in a sink hole surrounded by the heartless. Sora defeats the heartless and saves Aladdin and Abu. Then some more heartless come and Aladdin uses Genie to get rid of them. Afterwards they all head back to Agrabah to find that Jafar has taken Jasmine, there Aladdin uses Genie once again to save Jasmine. But instead Iago takes the lamp of (which who ever has the lamp controls Genie) Genie and gives it to Jafar. Jafar runs away with Jasmine and the Lamp and heads toward the Cave of Wonders. So Sora and his gang with Aladdin goes back to the Cave of Wonders to save Jasmine and the Lamp. When Sora and his gang with Aladdin find Jafar, Jafar used his first wish to find the key hole, then used his second wish to have Genie crush Sora, Donald, Goofy, and Aladdin. After Jafar was beaten, he then used his third and final wish to have Genie make himself an all powerful genie.