Chlorinates and brominates suitable organic compounds. Involved in the biosynthesis of the antibiotic pyrrolnitrin. Homodimer. Belongs to the AB hydrolase superfamily. Bacterial non-heme haloperoxidase / perhydrolase family.