Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个小问题:是否有任何值X满足这个等式并且可以放入 32 位寄存器中?
X
7A40B660+X=004023A0
我需要它来调用 004023A0 地址(我控制 ESI 寄存器):
.code:00401095 mov eax, 7A40B660h .code:0040109A add eax, [esi] ; Add .code:0040109C call eax
都是十六进制数。
首先,让我们简单地解决问题:
7A40B660 + X = 004023A0
让我们自己把 X 放在一边:
X = 004023A0 - 7A40B660
在 32 位十六进制中,FFFFFFFF + 1 = 0. 向数字添加零不会改变它的值。所以让我们在右边加零:
FFFFFFFF + 1 = 0
X = FFFFFFFF + 1 + 004023A0 - 7A40B660
重新排列:
X = (FFFFFFFF - 7A40B660) + 1 + 004023A0
现在很容易解决。答案是 85FF6D40。