How to find the address of the base structure with negative offsets

I recycle the old game using CE. I found code that modifies the HP unit, but I can’t find the base address, since the offset is negative.

OPCODE: "mov [esi-282], ax" [1]

The thing is, I don’t even know how this works, it sounds silly to me, why does the / dev compiler do it anyway? Is this a temporary stack pointer? Is there any way to find it? (I'm sure there is a way) This is frustrating because I found the offsets as ID, HP and stuff, but the base ... I have no problem with this normally, the offsets are positive.

I thought the base would be something like [esi-STRUCTURE_SIZE] and the last element would be[esi]

Or maybe I'm completely wrong.

Thanks:)

+4
1

, . , , .

, . , , , . , , , .

+2

Source: https://habr.com/ru/post/1628446/


All Articles