NOT A TEACHER.
However, I will try.
I could have been a dear friend of her if she didn't lie to me from the beginning.
In above sentece, I found eveything fine but "didn't", seemd to be wrong.
I think " hadn't" would be the right verb.
Now, your subsitute for that sentence was, I could have been a dear friend of her if she wouldn't lie to me from the beginning.
Same problem again, when We use these kind of conditionals(3rd), We must abide by some ground rules. here "if" is followed by "would", which is wrong. If it followed by "had" (instead of would) it would be a correct sentence.
Lets wait for a TEACHER.
Student or Learner