1. run FLOSS on the binary, and we find that it is packed with UPX packer
  2. Obviously, there is a encryption algorithm within this code, and in fact, it is scrambling this flag
  3. There is this decrypt files program that seems to output the same things Looks pretty useless to me.
  4. Lets use GDB.
    1. Set a breakpoint anywhere after the gameloop is ran. I set mine here:
    2. Set another breakpoint at scrambledata function
    3. lets jump to the scrambledata function.
    4. Takes the strlen of magpieCTF{s4mpl3_fl4g} which is 22 or 0x16
    5. Afterwards, enter a loop that goes 22 times, after that loop with all the operations, you land here: