While being forced to watch all this, Hermione will DEFINITELY create some kind of distraction. Attack a guard? Simply struggle and be a pain in the arse? Something to get the attention away from Ginny and hopefully stop the torture before it gets too bad really.
As far as Ginny doing any work however, Hermione won't let that happen. She'll keep shadowing Ginny if she can't just straight up be there with her and make sure all her work is done without the girl straining herself.
And Goyle...just earned a permanent place on the Hermione Granger patented shite list. (Sorry bloke, that means you go first on the list of arses to be kicked once a wand is secured).