80483ed: b8 00 00 00 00 mov $0x0,%eax │~
80483f2: 83 c0 0f add $0xf,%eax │~
80483f5: 83 c0 0f add $0xf,%eax │~
80483f8: c1 e8 04 shr $0x4,%eax │~
80483fb: c1 e0 04 shl $0x4,%eax │~
80483fe: 29 c4 sub %eax,%esp
This is an assembly code snippet from the start of a main function of a crackme binary I objdump -d
ed. The eax
manipulation is very odd to me:
1. eax = 0
2. eax += 0xf
3. eax += 0xf // eax = 0x1e (30 decimal, 11110 in binary)
4. eax >>= 4 // eax = 1
5. eax <<= 4 // eax = 16 (0x10)
Is this some kind of a fast way of manipulating eax
that is good for some reason? Or is this just a confusing C code that was compiled without optimization in order to throw off the person trying to RE it?