Old English of, unstressed form of æf (prep., adv.) "away, away from," from Proto-Germanic *af (source also of Old Norse af, Old Frisian af, of "of," Dutch af "off, down," German ab "off, from, down"), from PIE root *apo- "off, away."
The primary sense in Old English still was "away," but it shifted in Middle English with use of the word to translate Latin de, ex, and especially Old French de, which had come to be the substitute for the genitive case. "Of shares with another word of the same length, as, the evil glory of being accessory to more crimes against grammar than any other." [Fowler]
Also by 1837 of in print could be a non-standard or dialectal representation of have as pronounced in unstressed positions (could of, must of, etc.)