I disassemble some code using IDA Pro and get the pseudo-code. It showed something like below.
for ( i = 0; i < 6; ++i )
{
v7 = (int)&val_253;
for ( k = 1; k < key[i]; ++k )
v7 = *(_DWORD *)(v7 + 8);
v4[i] = v7;
}
I can't understand what is happening in v7 = *(_DWORD *)(v7 + 8);
line. After executing this line the value of v7 changes from 0xC
. I can't understand how it happens. I thought the value should change from 0x8
.
And I thought *(_DWORD *)
should return a value. But instead, it returns another pointer. How is that happened (The both values of the memory, 0xc
away from &val_253
and 0x8
away from &val_253
are zero).
v7 = *(_DWORD *)(v7 + 8);
codeline, it may resolve half of my problems..0x8
away from&val_253
is not zero. It points to another memory location which is located0xC
away from&val_253
. I didn't see that before. Though I thought*(_DWORD *)
should return a value, it returns a pointer. That's why after executing value of v7 changes from0xC