It has a wiring harness in there but it’s not right, only one speaker works and there are several wires not attached to anything. And what is the blue and green connection? I’ve been trying to figure out but I can’t find much information on this stuff. All the colors seem to be different than the diagrams I’ve seen, which makes things harder.
Had to do this for customers before : start by removing all the non-original stuff.
Then with the key off use a meter and find the permanent live, next key to aux and find switched live, the ground or earth is usually brown - check by looking at the cigar lighter.
How many speakers? Then there will be that many pairs of wires - usually recognisable as a base colour and a trace colour(s) which match. If this is still not clear then take the door covers off and look on the speakers.
As length will be an issue, as each wire is identified I would extend it (30cm gives plenty of options and can always be cut down...) by soldering and insulating with heat shrink (those crimp connectors take up a lot of space and form an inflexible lump) and labelling each one.