INCORRECT ANSWER. I noted my mistake below.
Obviously the final move was the white queen moving from somewhere to g4. But where did it move from?
The white pieces in the lower right can only come about with white moves h2-h3, B??-h2, g2-g3, Bf1-g2, in order. (Pieces could move around and come back after that.)
The white h1 rook used at least 6 moves after the above Bf1-g2 to get where it is now. This rook can't get out past the white king until after Bf1-g2, plus at least one more white move (such as 0-0).
So white has made at least these 11 moves after h2-h3: B??-h2, g3, Bf1-g2, 0-0 (or more), 6 rook moves, Q??-g4++
Since no pieces have been captured, we can unambiguously talk about the black pawn on a given file. The last black move which was not a pawn push was Kg4-h5. This happened in response to white h2-h3 or earlier, so black has made at least 10 pawn moves since then. At least one of those moves pushed black's c pawn, and the white knight moved to c4 after that. Now we know white made at least 12 moves after h2-h3, so black made at least 11 pawn moves. At least one of those moves pushed black's d pawn, and the white knight moved to d5 after that.
So white has made at least these 13 moves after h2-h3: B??-h2, g3, Bf1-g2, 0-0 (or more), 6 rook moves and 2 knight moves, Q??-g4++.
Before black Kg4-h5, black moved either the b7 or d7 pawn (or both), to let out the c8 bishop. After Kg4-h5, black made at most 12 moves, all of them pushing the a, b, c, or d pawn. Given the earlier b or d move, only 12 pawn moves are possible.
Therefore the game ended with white h2-h3+, black Kg4-h5, exactly 12 white moves and 12 black pawn pushes, and finally white Q??-g4++.
Before h2-h3+ Kg4-h5, the white queen was not threatening g4. The queen made only one move after that, onto g4. Therefore a piece was between the white queen and g4. The white rooks were stuck on the first rank and g7, so it couldn't be either of them. The white bishop at g2 and the knight at c4 each made just one move after that, and couldn't have been in a place to block the white queen.
There was my mistake. The bishop could in fact have been at f4, and that's the case in the only actual solution.
If the white knight at d5 moved from f4, that could block the queen at e4, but that's not possible since the knight at f4 would make Kg4-h5 illegal.
The only remaining possibility is that the white queen was at c8, blocked from threatening g4 by the black pawn at d7. So the final move was Qc8-g4++.