400W would be on the low output side for an RX580 if this were a quality 400W PSU. This is most assuredly not a quality 400W power supply, but one that's firmly in the garbage tier; Codegen is one of the most notorious purveyors of ancient, low-quality power supplies.
And really, it's like not even a garbage 400W power supply, but more likely a garbage 200-250W power supply. The +12V rail in all the Codegen 400W PSUs I've had the misfortune to run into have been between 14A and 20A, meaning that these are actually 168W-240W PSUs in the modern sense.
Low-quality power supplies with old group-regulated designs typically get a lot of their claimed wattage by having beefy +3.3V and +5V rails. That mattered in 1997. But modern CPUs and GPUs all care about the +12V rail.
So no, do not use this power supply under any circumstances, with this GPU. This isn't a mediocre Corsair VS "can I use this for a couple of weeks before my quality one arrives" PSU. This is one that you give to your local recycling center.