"Could of" is a non-standard form of "Could have."
Today, a lot of people write "could of" because this sounds like the contraction of "could have," which is "could've."
So, in terms of standard/proscribed grammar, the sentence should be:
You could have said that before.
But in popular speech, especially on the internet, you will see "could of" a lot.
Technically, as far as proscribed grammar is concerned, "could of" is incorrect. The same applies to
should of (should have)
would of (would have)
might of (might have)
Nevertheless:
Some famous writers, such as John Dos Passos, have used the phrase: "Could of" in literature to mean "could have" in the sense of mimicking the pronunciation of the phrase and/or rendering the speech of the common ("less educated") person.
On a grammar test or Test of English, use "could have" and not "could of."
But, because language is always changing in accordance with how people actually use the language, it may well be the case that in 100 or 200 years, "could of" will be accepted as a standard form.