[Enable]
  alloc(HookFR,1024)
  registersymbol(HookFR)
  label(HookRet)
  label(HPHandler)
  label(MPHandler)
  label(FastRecoverHP)
  label(DoNormalHP)
  label(HPCheck)
  alloc(HPCounter,4)
  alloc(SetHPCounter,4)
  alloc(RecoverTime,4)
  registersymbol(SetHPCounter)
  label(FastRecoverMP)
  label(DoNormalMP)
  label(MPCheck)
  alloc(MPCounter,4)
  alloc(SetMPCounter,4)
  registersymbol(SetMPCounter)
HookFR:
  cmp [esp],009d3961  //
  je HPHandler
  cmp [esp],009d3acf  //
  je MPHandler
HookRet:
  push ebp
  mov ebp,esp
  sub esp,0c
  jmp 004289ce  //
HPHandler:
  mov [esp],FastRecoverHP
  jmp HookRet
MPHandler:
  mov [esp],FastRecoverMP
  jmp HookRet
FastRecoverHP:
  push eax
  mov eax,[ebp-1c]
  mov [RecoverTime],eax
  pop eax
  cmp [HPCounter],0
  je HPCheck
  dec [HPCounter]
  cmp ebx,1
  jmp 009d3964  //
HPCheck:
  sub [RecoverTime],0A
  cmp ebx,[RecoverTime]
  jna DoNormalHP
  push eax
  mov eax,[SetHPCounter]
  dec eax
  mov [HPCounter],eax
  pop eax
DoNormalHP:
  cmp ebx,[ebp-1c]
  jmp 009d3964  //

FastRecoverMP:
  cmp [MPCounter],0
  je MPCheck
  dec [MPCounter]
  cmp ebx,1
  jmp 009d3ad5 //
MPCheck:
  cmp ebx,00002708
  jna DoNormalMP
  push eax
  mov eax,[SetMPCounter]
  dec eax
  mov [MPCounter],eax
  pop eax
DoNormalMP:
  cmp ebx,00002710
  jmp 009d3ad5  //
SetHPCounter:
  dd A          // 10倍HP,易斷線的請調低倍數
SetMPCounter:
  dd 8          // 8倍MP,易斷線的請調低倍數
004289c8:
jmp HookFR
[Disable]
004289c8:
db 55 8b ec 83 ec 0c
  unregistersymbol(HookFR)
  dealloc(HookFR)
  dealloc(HPCounter)
  dealloc(SetHPCounter)
  dealloc(RecoverTime)
  unregistersymbol(SetHPCounter)
  dealloc(MPCounter)
  dealloc(SetMPCounter)
  unregistersymbol(SetMPCounter)

創作者介紹

❤~眼見心不見~❤

Rossi Shie 發表在 痞客邦 留言(0) 人氣()