Quick question about the answer to the question: Purpose of ESI & EDI registers?
srcp [srcidx++] = argv [j]; C code translates too
8B550C mov edx,[ebp+0C]
8B0C9A mov ecx,[edx+4*ebx]
894CBDAC mov [ebp+4*edi-54],ecx
47 inc edi
I've taken an assembly class and know the basics, not looking for what mov means, but I'm mostly confused as the what the +0C, the +4*ebx, and the ebp+4*edi-54 statements are for. He explains it in the post but I'm still not understanding.
The ebp+12 has argv, but why is it incremented by 12?
The ebx is j, but why is that multiplied by 4 and added onto ebp?
And he says that "third instruction uses edi multiplied by 4 and adds ebp offset by 0x54 (location of srcp)"; why does it have to be multiplied by 4?
Also he says add the offset; why is it -54 and not +54 in the code?
Just a little confused.