Let me see if I can help. So... what I think you're saying is that this is a hard task to estimate because to do the estimate you need to actually do the work, i.e. you need to fully understand the code. Is that correct? ( I know, no more questions.
)
But it's like this with any estimate. You just have to give the best estimate you can. Your manager will understand if you are a little late, as long as you don't have consistently short estimates and are always late. Most of the time you will do a little of the work to get a good estimate.
If I were tackling this problem, I would first try to get a very high level understanding of the code; not even go through each class, just get a basic understanding of what the program or API does. Then I would take one of the classes and actually do the work. Don't take the hardest one or the easiest, but somewhere in between. You should be able to get a feel for how long it will take to do all of them based on commenting the one class.
Are there unit tests? This can be very valuable in determining how a class was meant to be used.
Also, I assume the person that wrote the code is no longer there? I'm probably pointing out the obvious, but that person would be the best resource and could affect your estimate.