> For the complete documentation index, see [llms.txt](https://writeups.adityadindi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://writeups.adityadindi.com/crackmes.one/1-difficulty-rating/untitled.md).

# Easy Keyg3nme

![](/files/-MfYL7ok_7UlKBy4KbIe)

Lets download the zip file and unzip it. (Password: crackmes.one)

![](/files/-MfYLNQ5KoqoINUPLWXY)

Lets run the file

![](/files/-MfYLeViNzJ5pywSJuN0)

Its asks for a key, and it looks like if we type in the wrong key, its gives us a response saying `nope`.

Lets look at the file into more detail with the `strings` command

![](/files/-MfYLvIhRWwxMr1CMF2n)

Ok so it looks like we will get a message saying `Good job mate, now go keygen me` if we give it the right key. Lets open the file with `gdb` and look at the functions

![](/files/-MfYMGzTNa1Or097cCrF)

Lets look at the main function by disassembling it

![](/files/-MfYMUZa8hBfi-HRkiQG)

We are calling the `validate_key` function, lets check it out

![](/files/-MfYMfUetWODNdTlNqWg)

This line is the most interesting , we are using the `imul` instruction. Lets see what it does on google

![](/files/-MfYN10nJkj-v6tbPMac)

So it multiplies the integers, so in the screenshot above, we are multiplying `eax` with itself, and the value being `0x4c7` which is also `1223` in decimal

![](/files/-MfYNSfzI83e0n8OHS4d)

So lets try entering `1223` as the key or any multiple of 1223 as the key as we are multiplying it by itself and storing it in a variable that is the valid key.

![](/files/-MfYO8iQQitrUJVb_Nha)

We have the answer
