BFE Services Denied Access

So recently I have been fighting this (assumed) virus on my computer with no luck. I tried to repair the PC by granting administrative permissions to the service it worked partially but I couldnt turn my firewall back on even after doing that. I think My OS got corrupted as well. I tried to Factory Reset my computer but wanted to keep my files. That, too, worked partially. Now I am back to square one with it being turned off again along with the firewall. By the way I had avast on my computer before all of this. I would let avast run an offline scan that showed some files on my PC were "decompression bombs". I have since removed Avast and just rely on Windows Security.
Today, in safe mode, I typed in elevated cmd
takeown /S mycomputername /U %username% /F %USERPROFILE% /R /SKIPSL. This worked.
I then tried cacls %USERPROFILE% /T /E /G %USERNAME%:F. This still gave Access Denied after.
Any help is appreciated.