| Input Magic |
What does the program do with those weird byte chains in main? |
2020-10-17 08:19 |
| OldSoft's KeyGenMe #2 -- Upgraded from DOS by wolverine2k |
Awesome challenge for beginners.
I struggled a lot understanding that the sum of two registers between square brackets doesn't have anything to do with pointers
main:
Read char* name
Read char* serial
Generate serial from name (generateSerial)
Compare generated serial with serial
generateSerial:
Serial is formatted "%d-%d" (decimal-decimal)
First parameter is the sum between the name length and the name length, bit shifted right by 1 and then multiplied by 3 (length+(length1)*3)
Second parameter is the sum of all the characters after adding 4 and their index (string[index]+index+4)
name: NCP
serial number: 6-240
|
2020-10-16 16:45 |