123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- [enable]
- alloc(newmem,82)
- alloc(spawntimer, 4)
- alloc(spawnthreshhold, 4)
- registersymbol(spawntimer)
- registersymbol(spawnthreshhold)
- label(returnhere)
- label(originalcode)
- label(exit)
- label(spawnspiralsword)
-
- spawntimer:
- dd (float)0.0
-
- spawnthreshhold:
- dd (float)85.0
-
- newmem:
- //edi should hold the address of the player character
- cmp [edi+19ac], 2 //check if the player is vergil
- jne originalcode //if not jump out
- movss xmm3, [spawntimer] //move spawn timer in
- addss xmm3, xmm0 //accumulate time in here
- comiss xmm3, [spawnthreshhold] //check spawn timer against threshhold
- jae spawnspiralsword //if reached spawn a set of spiral swords
- movss [spawntimer], xmm3
-
- originalcode:
- movss [esi],xmm0
- pop esi
-
- exit:
- jmp returnhere
-
- spawnspiralsword:
- push eax //keep eax on the stack
- mov eax, 2 //i.d of spiral swords
- mov [edi+7ad0], eax //constantly read address will result in spawning
- xorps xmm3, xmm3 //clear spawn timer
- movss [spawntimer], xmm3 //update value in memory
- pop eax //restore eax
- jmp originalcode
-
- "DevilMayCry4SpecialEdition.exe"+16E2C0:
- jmp newmem
- returnhere:
-
- [disable]
- dealloc(newmem)
- dealloc(spawntimer)
- dealloc(spawnthreshhold)
- "DevilMayCry4SpecialEdition.exe"+16E2C0:
- movss [esi],xmm0
- pop esi
|