not sure this will help, but I’ve also had a problem with the Google Analytics code related to its changing of link syntaxes in my theme; it makes certain elements of my page display weird that I am still trying to sort out; possibly that is causing some of the display weirdness?
Also, I too had a theme where there was base 64 code in the footer which displayed the owners ads. A quick google search on base 64 decoding changed it back to clear HTML and I could edit the code there. that also might help you at least figure out what that code is doing. if its making calls to something totally out there like a .cn extension or something, you know your problem.
good luck.