Stereo wiring confusion

I need help identifying what wires do what in my car, Im pretty sure someone who owned the car before me has done their own wiring that i need to redo as the stereo i had was aftermarket (bought a new one).


This is what plugged in to my current stereo. As you can see the blue wire isn't in use but I'm assuming its supposed to be a ground, the black wire is definitely a ground and in use (the rest doesn't really matter)

And this is what I assume where the original harness would've been. You can see that two wires are cut and i guess i should mention the driver side speaker doesn't work currently (might be speaker dependent, might be because the wires are cut but idk) Could I potentially get some help identifying what wires do what so i can make a new harness of my own? And is there any wire that should be there that isn't that I have to go digging behind the dash to find?