Hermione started looking for her wand, but she didn’t know which one to let go, Malfoy or the Horcrux to find it, so she said, "Take the cup!" and gave it to Malfoy who grasped it with trembling hands. She lifted the wand in one hand while holding Malfoy with the other. For some reason, the Dementors kept on only attacking Malfoy and not her, even when she raised her wand to fight them. Still, it didn’t make her task any easier.