  We use localization to evaluate the functional integral of string field
theory on AdS_2xS^2 background corresponding to the near horizon geometry of
supersymmetric black holes in 4d compactifications with N=2 supersymmetry. In
particular, for a theory containing n_v + 1 vector multiplets, we show that the
functional integral localizes exactly onto an ordinary integral over a
finite-dimensional submanifold in the field space labeling a continuous family
of instanton solutions in which auxiliary fields in the vector multiplets are
excited with nontrivial dependence on AdS_2 coordinates. These localizing
solutions are universal in that they follow from the off-shell supersymmetry
transformations and do not depend on the choice of the action. They are
parametrized by n_v +1 real parameters C^I, ; I= 0,..., n_v that correspond to
the values of the auxiliary fields at the center of AdS_2. In the Type-IIA
frame, assuming D-terms evaluate to zero on the solutions for reasons of
supersymmetry, the classical part of the integrand equals the absolute square
of the partition function of the topological string as conjectured by Ooguri,
Strominger, and Vafa; however evaluated at the off-shell values of scalar
fields at the center of AdS_2. In addition, there are contributions from
one-loop determinants, brane-instantons, and nonperturbative orbifolds that are
in principle computable. These results thus provide a concrete method to
compute exact quantum entropy of these black holes including all perturbative
and nonperturbative corrections and can be used to establish a precise relation
between the quantum degeneracies of black holes and the topological string.
