When Kestrel realizes what's happening, she leaps up onto a shipping crate...perhaps that had been waiting to be filled with ill-gotten booty...and stands there silently until she's sure she has the attention of the pirates.
"You are all under arrest under the laws of the Galactic Republic," she informs them calmly. "You will have access to legal representation and will not be mistreated. Your actions and comments may be used in the upcoming trials."
She pauses significantly and nods. "Consider them carefully."