The function f(x) seems to rearrange the characters of the input string in a non-linear and random way.
