Join Date: Jun 2008
Location: Edmonton AB
Motorcycle: 2014 675R, 2019 Husky TE300i, 2014 Grom. Yes, Grom, fuck you, it's fun.
Re: What the heck is this wire
That's the connector between regulator and stator.
Do a site search for your manual and go through the charging system testing procedures. You need to test the R/R, Generator, and battery, even though you say the bike runs fine. If you are good at solder, there no reason you can't just connect new pins and replace the connector. That's assuming none of your parts are forked.