Skip to main content
added 97 characters in body
Source Link

I wrote a very basic crackme to learn how assembly works.

Even though I wrote it myself, I am having some trouble understanding a few pieces of the assembly:

enter image description here

What I know up to now is: [rbp+rax+input_buffer] is basically input_buffer[rax], xor'ing two of the same registers resets them and that's about it (apart from the very basic stuff like add, mov, inc).

I specifically don't understand what movsx .. and add ecx, 0FFF.. is doing.

The input_buffer is filled withThe input_buffer is filled with _fgets. I'm intentionally not saying a working input to see if you can figure it out (it shouldn't be hard anyways).

A proper input would be _fgets0123456789\n. I'm intentionally not saying a working input to see if you can figure it out, note that I discard the newline via (it shouldn't be hard anyways)strcspn.

I wrote a very basic crackme to learn how assembly works.

Even though I wrote it myself, I am having some trouble understanding a few pieces of the assembly:

enter image description here

What I know up to now is: [rbp+rax+input_buffer] is basically input_buffer[rax], xor'ing two of the same registers resets them and that's about it (apart from the very basic stuff like add, mov, inc).

I specifically don't understand what movsx .. and add ecx, 0FFF.. is doing.

The input_buffer is filled with _fgets. I'm intentionally not saying a working input to see if you can figure it out (it shouldn't be hard anyways).

I wrote a very basic crackme to learn how assembly works.

Even though I wrote it myself, I am having some trouble understanding a few pieces of the assembly:

enter image description here

What I know up to now is: [rbp+rax+input_buffer] is basically input_buffer[rax], xor'ing two of the same registers resets them and that's about it (apart from the very basic stuff like add, mov, inc).

I specifically don't understand what movsx .. and add ecx, 0FFF.. is doing.

The input_buffer is filled with _fgets. I'm intentionally not saying a working input to see if you can figure it out (it shouldn't be hard anyways).

A proper input would be 0123456789\n, note that I discard the newline via strcspn.

Source Link

What is this assembly doing?

I wrote a very basic crackme to learn how assembly works.

Even though I wrote it myself, I am having some trouble understanding a few pieces of the assembly:

enter image description here

What I know up to now is: [rbp+rax+input_buffer] is basically input_buffer[rax], xor'ing two of the same registers resets them and that's about it (apart from the very basic stuff like add, mov, inc).

I specifically don't understand what movsx .. and add ecx, 0FFF.. is doing.

The input_buffer is filled with _fgets. I'm intentionally not saying a working input to see if you can figure it out (it shouldn't be hard anyways).