replay: Move external processing in a dedicated method
That code grew a lot so better putting it in a dedicated method, plus it enables to remove one indentation level for better readability.
Depends on !115 (closed)
Migrated from D7086 (view on Phabricator)