It's a junction block. Put an ohmmeter on each post and check resistance to ground. Should have infinite resistance. "0L" on most meters. But....
Look at the red wire close to the master cylinder. It looks melted to hell and back. There's a yellow splice at least that looks melted. When you pull too many amps through a wire, it doesn't melt locally. It usually smokes the whole wire. Anywhere that wire goes that touches metal where the insulation melted off will create a drain. Need to chase that wire and whatever it's connected to. Of course, that's if I'm seeing what I think I'm seeing.
Also, don't perform the first ohmmeter test, with this wire hooked up. A ground somewhere in this wire will show up as a ground at the junction block if it's connected. Remove wires > test junction block > reattach wires if good. Also try the same test on just that burnt wire while it's disconnected. If it has a low resistance to ground, it's shorting out somewhere. Look for similar damage elsewhere and repeat.