Indefinite integral $\int \arcsin \left(k\sin x\right) dx$ It would take too long to explain the context reasonably well - but in short, this integral, or rather its equivalent
$$\int\frac{x\cos x\,dx}{\sqrt{1-k^2\sin^2x}},\qquad 0<k<1$$
is related to generating function of a canonical transformation between two distinguished sets of local Darboux coordinates on a certain $SL(2,\mathbb{C})$ character variety. 
I would be grateful for any help with the calculation of this integral. It would be especially nice to hear from people industrially guessing closed form expressions for integrals which look much less computable. The answer will be awarded a bounty, unless I manage to find it myself first.
P.S. I have reasons to believe that 


*

*The answer can be found in a closed form.

*Moreover, I expect it to be given by a linear combination of dilogarithms $\operatorname{Li}_2(\cdot)$ with arguments expressed in terms of elementary functions (roughly, square roots and trigonometric functions).
P.P.S. I intentionally do not tag my question as "integration", "calculus" etc, as these happen to be ignored tags of some highly-qualified participants. Please don't modify this!
 A: Let us denote
 $$ \mathcal{I}\left(k,x\right)=\int_0^x \eta\left(y\right)dy, \qquad \eta\left(y\right)=\arcsin\left(k\sin y\right).$$
 It turned out that this integral can be computed in a rather simple way. Namely, let us make the following observations:


*

*We have
$$
 \eta\left(x\right)=\frac{1}{2i}\left[\ln\left(1+k\, e^{i\left(x+\eta(x)\right)}\right)-\ln\left(1+k\, e^{-i\left(x+\eta(x)\right)}\right)\right]$$

*Also,
\begin{align*}
 2\left[1+\frac{k\,\cos x}{\sqrt{1-k^2\sin^2x}}\right]\times\frac{1}{2i}\left[\ln\left(1+k\, e^{i\left(x+\eta(x)\right)}\right)-\ln\left(1+k\, e^{-i\left(x+\eta(x)\right)}\right)\right]=\\
 =\frac{d}{dx}\left[\operatorname{Li}_2\left(-k\,e^{i\left(x+\eta(x)\right)}\right)+
 \operatorname{Li}_2\left(-k\,e^{-i\left(x+\eta(x)\right)}\right)\right]
 \end{align*}

*And finally:
\begin{align*}
 \eta'\left(x\right)=\frac{k\,\cos x}{\sqrt{1-k^2\sin^2x}}.
 \end{align*}


Combining these three formulas, we get
 \begin{align*}\boxed{
 \;2\mathcal{I}\left(k,x\right)=\operatorname{Li}_2\left(-k\,e^{i\left(x+\eta(x)\right)}\right)+
 \operatorname{Li}_2\left(-k\,e^{-i\left(x+\eta(x)\right)}\right)-2\operatorname{Li}_2\left(-k\right)-\eta^2\left(x\right)\;}
 \end{align*}
