We've got no chance of helping you from the information you've given us. At the moment, you've just shown us a birds nest with no indication of which wires are coming or going.
You need to first of all list all the cables coming out of the controller with the colours of the wires, then you need to do the same for the cables that come to the controller. Most of them come from the handlebars, so say which ones. Show us photos with all the wires spread out so that we can see them.
You'll also need a meter to check which wires have battery voltage. if you connect any of them to something that it shouldn't connect them to, it's instant death for your controller and much of what's connected to it.