Hello strahd_von_zarovich,
I think you are correct in that the component marked: A40A 585V is an Op-Amp. And going
by what I was able to search, there's a good chance its an OPA40A Single-Supply, Rail-to-Rail Operational Amp.
As for the 577X LEVB, once again I'm sure you're correct in that it might be a voltage regulator, a 5 volt type as
you've ascertained by your markings. I was unable to find any info on it though. :-(
By the way, could you please tell me what program you used to mark the PCB? It almost looks like Micro$oft Picture It 7.
Regards,
Relayer