tl;dr:1. Notice strange function called after winning the game2. Reverse a bit, dump parameters with debugger3. Solve set of linear equations to recover flag
Full writeup: https://github.com/p4-team/ctf/tree/master/2019-09-14-realworld-quals/puzzle