I can't for the love of me figure this one out.
I'd assume the instruction
lea 0x0(,%rcx,4),%esi
to mean "set %esi to the result of multiplication of %rcx by 4". But that's not it. So what does it mean? It's odd in the first place that the offset is 0x0 and that mul isn't used instead...
EDIT: I think something is implicitly used as a base. But I don't know what.
It was my mistake. I overlooked the fact the destination is marked as 32-bit. What this means is if the result of the multiplication is higher than that, it will get cut off.
So if you have some long value such as 2400923063, 2400923063*4=0x23c6cb6dc, but then the last half-byte will get cut off, and you will get 0x3c6cb6dc as the result (1013757660).