 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
ricekingrulz Grandmaster Cheater
Reputation: 0
Joined: 13 Jun 2008 Posts: 984
|
Posted: Wed Sep 01, 2010 1:00 pm Post subject: [Help] Need help with the disable part of a script. |
|
|
Code: | [Enable]
RegisterSymbol(PetGetItem)
RegisterSymbol(PetGetItemSwitch)
Alloc(PetGetItem, 256)
Alloc(PetGetItemSwitch, 4)
Label(NormalPet)
PetGetItemSwitch:
DD 1
PetGetItem:
CMP [PetGetItemSwitch], 0
JE NormalPet
PUSH EBX
MOV EBX,[EBP+0C]
MOV [EBX],EDI
MOV [EBX+04],EAX //+20
POP EBX
JMP 005049D6
NormalPet: //004E9BD
LEA EAX, [EBP-34]
PUSH EAX
CALL DWORD PTR [00BF0484]
JMP 005049C7
005049B6:
JMP PetGetItem
[Disable]
UnRegisterSymbol(PetGetItem)
UnRegisterSymbol(PetGetItemSwitch)
DeAlloc(PetGetItem, 256)
DeAlloc(PetGetItemSwitch, 4)
005049B6:
LEA EAX, [EBP-34] |
So the disable is not completed yet, I need some help. I would need to dealloc PetGetItemSwitch and dealloc PetGetItem correct?
Edit:
Added in dealloc and unregistersymbol
Last edited by ricekingrulz on Wed Sep 01, 2010 6:51 pm; edited 1 time in total |
|
Back to top |
|
 |
justa_dude Grandmaster Cheater
Reputation: 23
Joined: 29 Jun 2010 Posts: 891
|
Posted: Wed Sep 01, 2010 4:29 pm Post subject: |
|
|
The dealloc is good practice (same for unregistering symbols), but failing to do so shouldn't cause your script to crash. It looks like you're replacing three bytes of code (lea eax...) with five bytes (jmp petgetitem). When you disable your script, all is not as it was before you enabled it. The best thing to do, I think, is to let CE handle the alloc/dealloc/jmp stuff. Just go to the auto-assembler, choose the table framework, then choose injection for 0x5049b6, and CE will handle all the allocation/deallocation and detour code automatically.
Cheers,
adude
|
|
Back to top |
|
 |
ricekingrulz Grandmaster Cheater
Reputation: 0
Joined: 13 Jun 2008 Posts: 984
|
Posted: Wed Sep 01, 2010 5:03 pm Post subject: |
|
|
justa_dude wrote: | The dealloc is good practice (same for unregistering symbols), but failing to do so shouldn't cause your script to crash. It looks like you're replacing three bytes of code (lea eax...) with five bytes (jmp petgetitem). When you disable your script, all is not as it was before you enabled it. The best thing to do, I think, is to let CE handle the alloc/dealloc/jmp stuff. Just go to the auto-assembler, choose the table framework, then choose injection for 0x5049b6, and CE will handle all the allocation/deallocation and detour code automatically.
Cheers,
adude |
Haha thanks, never new CE would handle it by itself. Just touched the basics of ASM a while ago and never understood it much.
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|