Is there brain function during a cardiac arrest?

No. Cardiac arrest means- heart not beating, hence no blood flow/ circulation- brain does not function when there is no blood supply.
For a brief time. When the heart stops circulating blood to the brain the functions of brain cease after about 5 minutes. If CPR is performed the brain function can return. However prolonged CPR may not get enough blood to brain to prevent brain damage even if heart recovers.
Initially yes. The brain is highly reliant on adequate blood flow and oxygen so the longer there is a cardiac arrest the more likely permanent brain damage will occur. The point of doing CPR is to maintain at least some flow to the brain that hopefully will allow recovery when the heart performance can be re-established.

Related Questions

Can your brain still function after having cardiac arrest?

Yes. Depends how long the brain was without oxygen - if the patient was immediately resuscitated, many of them recover completely. Read more...
It depends. It really boils down to how long the brain was deprived of adequate blood flow. This depends on how long till the heart started functioning again and how quickly good CPR was started. The longer the brain goes without oxygen the more chance of brain injury. Read more...