s3: printing: Split handling of PE file into separate function.