Retirement tax questions

Here's some additional information.  The dividends were used to purchase additional insurance for the same policy.  Then at some point in the past, the additional insurance began to be used to pay the premiums.  By the time the policy was surrendered, all of the additional insurance was used up, and the final premium was paid out of pocket.  I am trying to figure out how the company computed the basis for the 1099-R.  Unfortunately, I have only a few of the more recent annual statements.  I contacted the insurance company and asked for the details over the life of the policy but have not received a reply.