Is it covered under your insurance policy?
That's in a very bad area and good chance it's causing the codes.
Splice the broken wires to repair or replace the entire harness, Subaru will have those in stock (i think).
Subaru will only replace the entire wiring harness, they will not repair the current harness. At least all the dealers I know won't, maybe there's a few willing to "break the rules".