Would you know it if your brain was not functioning correctly? Perhaps; it depends on exactly what problem it was having.
Would you know if you had forgotten something? How could you if you have forgotten it? Wouldn’t simply knowing that you knew it allow you to know it? Again, it depends on the knowledge. It’s possible to know that you used to know how to integrate a calculus problem, but be unable to do so anymore because you’ve forgotten how. You have lost the primary knowledge, but retained the meta-knowledge, that is, knowledge about other knowledge. On the other hand, you could know that you have an appointment tomorrow, but forget it. There is no meta-knowledge involved in this however because the mere act of knowing that you know that you have an appointment is itself the primary knowledge: that you have an appointment. The closest thing to meta-knowledge in this case would be knowing that you had to do something, but cannot remember what, but that is too generic and applies to pretty much all knowledge one has.
What about more significant damage? What if you incur Alzheimer’s disease? Would you know it? How could you since the disease affects the fundamental ability to think?
These problems arise because the brain is our primary (and only) method of thinking about things, including our brains themselves. If the brain gets damaged, how can it think about itself? If you sustain some brain damage resulting a loss of cognitive ability, how can you know it if that requires the brain to know and understand it?