C420sailor, I would presume that the aftermarket head unit had to be wired direct to the speakers, so there is this unknown variable of how that was done. They might've taken wires back to the sub amp to do it, or rerouted them after disconnecting from the factory amp, or did new wire runs that grafted on somewhere.
Regardless, you should have the wires you need at the aftermarket head unit, to wire in the new one. If they did not preserve the factory harness connector then you'll have to go by wire color, pinout for the aftermarket head unit to map them out, or use a multimeter to check wire resistance between each output wire and the speakers to determine which is which, as well as get the amp power wire, clock/memory wire, and ground (or see one of the wiring diagrams linked in my sig).
The aux or sub out from the new amp will go back to the sub amp. If they left that factory wire intact, great. If not, you'll need to add that.
You can try to reverse engineer the factory sub amp to reuse it, but if that seems daunting then just buy a standard, modest wattage (the factory sub driver can't take much wattage, don't recall how much but 200W would be more than enough if it can do, say 80W at low THD) replacement amp small enough to strap in where the original was, and with this conservative wattage you should be able to reuse the existing power wires that went to the factory amp, or again will have to string new wire if the prior installation removed that.