Inspired by the answer from user9823668, I found another way on how to reverse the calculation. The inner loop of the code (including the division from the output line) basically represents the following polynomial:
![Polynomial of the inner loop](https://i.stack.imgur.com/3X3LN.png)
This polynomial is calculated for the values 0 to 10 in the outer loop of the code and yields the resulting ASCII characters. So the question is: How to fit a polynomial through given consecutive data points?
One of my search results points to the term Newton polynomial. This is a so-called interpolation polynomial for a given set of data points. As the polynomial is calculated for the values 0 to 10, we have the special case of xi = i here. Thus, in order to construct the above polynomial, we have to calculate some binomial coefficients.
At first we have to calculate the divided differences on the data points (i.e. the ASCII-encoded function output):
0: H = 72
1: E = 69 -3
2: L = 76 7 10
3: L = 76 0 -7 -17
4: O = 79 3 3 10 27
5: = 32 -47 -50 -53 -63 -90
6: W = 87 55 102 152 205 268 358
7: O = 79 -8 -63 -165 -317 -522 -790 -1148
8: R = 82 3 11 74 239 556 1078 1868 3016
9: L = 76 -6 -9 -20 -94 -333 -889 -1967 -3835 -6851
10: D = 68 -8 -2 7 27 121 454 1343 3310 7145 13996
Then, the topmost entries in each column are the coefficients that we need to construct the interpolating polynomial:
72
- 3 / 1 x
+ 10 / 2 x(x-1)
- 17 / 6 x(x-1)(x-2)
+ 27 / 24 x(x-1)(x-2)(x-3)
- 90 / 120 x(x-1)(x-2)(x-3)(x-4)
+ 358 / 720 x(x-1)(x-2)(x-3)(x-4)(x-5)
- 1148 / 5040 x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)
+ 3016 / 40320 x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)
- 6851 / 362880 x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)(x-8)
+ 13996 / 3628800 x(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)(x-7)(x-8)(x-9)
Here, the denominators represents n! (see the special case).
By expanding this formula (e.g. by using WolframAlpha), you get the polynomial shown above. In case anyone wonders, the polynomial looks as follows:
![Plot of the polynomial](https://i.stack.imgur.com/i8X1wm.png)