解析CE步骤4的运算

自己瞎分析的,不知道对不对

//从eax取值给[ebp-30]

Tutorial-i386.exe+26B19 - 89 45 D0              - mov [ebp-30],eax

//整数入栈, st0=(double)[ebp-30]
Tutorial-i386.exe+26B1C - DB 45 D0              - fild dword ptr [ebp-30]

//将[ebp-40]里面的浮点数据压入st0。这里的[ebp-40],应该是和[ebp-30]相等吧。
Tutorial-i386.exe+26B1F - DB 6D C0              - fld tword ptr [ebp-40]

//这一句好像没意义吧
Tutorial-i386.exe+26B22 - DEC1                  - faddp 

//将ST0里面的浮点值,放到ebp-04这个内存里面,清空ST0里面的值
Tutorial-i386.exe+26B24 - D9 5D FC              - fstp dword ptr [ebp-04]

//将浮点数据压入st0
Tutorial-i386.exe+26B27 - D9 45 FC              - fld dword ptr [ebp-04]

// st0=st0-[esi+000004C0]
Tutorial-i386.exe+26B2A - D8 AE C0040000        - fsubr dword ptr [esi+000004C0]

//将ST0里面的浮点值,放到esi+000004C0这个内存里面,清空ST0里面的值
Tutorial-i386.exe+26B30 - D9 9E C0040000        - fstp dword ptr [esi+000004C0]

因此要想改每次减少的健康值,应该是改了eax就可以了

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

//这里改为1,就可以保证每次就只减少2点健康值,试过了确实可以。
cmp eax,1
jb originalcode
sub eax,1
jmp newmem
originalcode:
mov [ebp-30],eax
fild dword ptr [ebp-30]

exit:
jmp returnhere

"Tutorial-i386.exe"+26B19:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"Tutorial-i386.exe"+26B19:
db 89 45 D0 DB 45 D0
//mov [ebp-30],eax
//fild dword ptr [ebp-30]

  • 10
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值