(Lua, ASMx86) Replication of Devil May Cry 4's debug functions for it's re-released version.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

blue-tutu-of-death.CEA 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [enable]
  2. alloc(newmem,82)
  3. alloc(spawntimer, 4)
  4. alloc(spawnthreshhold, 4)
  5. registersymbol(spawntimer)
  6. registersymbol(spawnthreshhold)
  7. label(returnhere)
  8. label(originalcode)
  9. label(exit)
  10. label(spawnspiralsword)
  11. spawntimer:
  12. dd (float)0.0
  13. spawnthreshhold:
  14. dd (float)85.0
  15. newmem:
  16. //edi should hold the address of the player character
  17. cmp [edi+19ac], 2 //check if the player is vergil
  18. jne originalcode //if not jump out
  19. movss xmm3, [spawntimer] //move spawn timer in
  20. addss xmm3, xmm0 //accumulate time in here
  21. comiss xmm3, [spawnthreshhold] //check spawn timer against threshhold
  22. jae spawnspiralsword //if reached spawn a set of spiral swords
  23. movss [spawntimer], xmm3
  24. originalcode:
  25. movss [esi],xmm0
  26. pop esi
  27. exit:
  28. jmp returnhere
  29. spawnspiralsword:
  30. push eax //keep eax on the stack
  31. mov eax, 2 //i.d of spiral swords
  32. mov [edi+7ad0], eax //constantly read address will result in spawning
  33. xorps xmm3, xmm3 //clear spawn timer
  34. movss [spawntimer], xmm3 //update value in memory
  35. pop eax //restore eax
  36. jmp originalcode
  37. "DevilMayCry4SpecialEdition.exe"+16E2C0:
  38. jmp newmem
  39. returnhere:
  40. [disable]
  41. dealloc(newmem)
  42. dealloc(spawntimer)
  43. dealloc(spawnthreshhold)
  44. "DevilMayCry4SpecialEdition.exe"+16E2C0:
  45. movss [esi],xmm0
  46. pop esi