Looks like I found final score formula. If you lose you get 5 * quantity of cards moved to foundation. If you win you get 5 * 52 points for moving every card to foundation + 1150 bonus points - your final time in seconds (seems like in final result it rounds to the nearest digit but in final window displays number rounded down) - 3 * number of moves. Tested correctly on 17 results.
Edit: OMG, why have I done this?