我曾试图推翻工程师的游戏功能,但I m美妙药混淆不清。 I m 粗略为新来扭转工程(Im , ollydbg btw),因此我没有真正了解所有陷阱和细节。
Anyway here s my problem. This function is called when you pick up any Item in the game. It then calculates the value of the item and adds this value to your score. Before the function is called, a value is pushed which I m quite confident is the ID of the item. This is the code that confuses me:
SHL ESI,7
MOV CX,WORD PTR DS:[EDX+ESI+42]
ESI = the ID of the item EDX = constant value FE56A0
I was guessing that EDX (FE56A0) was the start of an array of items, ESI was the index of the item somehow and 42 would be the index of the value the item holds. This would be kinda weird though since your bit shifting ESI to the left by 7. As ESI increases, it s bit shifted value doesn t grow linearly.
So if EDX represent the start of an array and ESI would be an index, the items in the array wouldn t be of equal size. The meaning of this code is puzzling me.
Anyone got an idea what this code could represent?