The program calls rand() without calling srand() first. In C, if srand() is never called, rand() uses the default seed of 1 - 100% predictable. Run the same rand() call locally in C (seed=1) to get the exact value the server will use. XOR it with 0xDEADBEEF to compute the required key, then provide it.