| View previous topic :: View next topic |
| Author |
Message |
abystus Expert Cheater
Reputation: 1
Joined: 09 Dec 2010 Posts: 140
|
Posted: Sun Jan 03, 2016 2:10 am Post subject: ReadMem Issue |
|
|
Anyone know why this script wont activate when readmem(originalInstruction, 5) is used within newmem (enable) or xorKeyAddressHook (disable)? If I replace the lines with the commented section it enables/disables just fine. I have verified that the first 5 bytes of xorKeyAddressHook are being properly allocated into originalInstruction, but when I go to retrieve the bytes for use it seems to cause an issue. Any help is appreciated.
| Code: | [ENABLE]
alloc(newmem,2048)
alloc(originalInstruction, 5)
label(returnhere)
label(xorKeyAddress)
aobscan(xorKeyAddressHook, BF ?? ?? ?? ?? 85 ED 7E 2D 8A 07 84 C0 75 0A A0 ?? ?? ?? ?? BF ?? ?? ?? ?? 8A 16)
registersymbol(xorKeyAddressHook)
registersymbol(xorKeyAddress)
registersymbol(originalInstruction)
originalInstruction:
readmem(xorKeyAddressHook, 5) //BF 29 8E 5A 00
newmem:
readmem(originalInstruction, 5) //mov edi,005A8E29
mov [xorKeyAddress], edi
jmp returnhere
xorKeyAddress:
xorKeyAddressHook:
jmp newmem
returnhere:
[DISABLE]
xorKeyAddressHook:
readmem(originalInstruction, 5) //mov edi,005A8E29
dealloc(newmem)
dealloc(originalInstruction)
unregistersymbol(xorKeyAddressHook)
unregistersymbol(xorKeyAddress)
unregistersymbol(originalInstruction)
|
_________________
Hitler are you bored? Watch some of my hacks here. Want 2 gb of online storage space for free? Get Dropbox for computer, phone, etc... |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25812 Location: The netherlands
|
Posted: Sun Jan 03, 2016 3:27 am Post subject: |
|
|
what is the error you get when you just run it in the auto assembler? Or does it execute just fine then? (the first time, the second time will fail due to the aob not found)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
abystus Expert Cheater
Reputation: 1
Joined: 09 Dec 2010 Posts: 140
|
Posted: Sun Jan 03, 2016 3:35 am Post subject: |
|
|
No error on compile. When it is checked it acts as it would when the aob isn't found (just doesn't check). When changing out the lines as stated above it works flawlessly. Is there a way to view the reason a script doesn't activate (is the error logged somewhere?).
Edit:
When pasting this script into a new auto assemble window and pressing execute I get the following error:
| Code: | | Error in line 18 (readmem(originalInstruction, 5)) :Invalid address for ReadMem |
This would be in reference to the first line under newmem. Any clue why it isn't a valid address even though it has been allocated and registered above?
_________________
Hitler are you bored? Watch some of my hacks here. Want 2 gb of online storage space for free? Get Dropbox for computer, phone, etc... |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25812 Location: The netherlands
|
Posted: Sun Jan 03, 2016 3:43 am Post subject: |
|
|
oh i see.
replace
| Code: |
newmem:
readmem(originalInstruction, 5)
mov [xorKeyAddress], edi
|
with
| Code: |
newmem:
readmem(xorKeyAddressHook, 5)
mov [xorKeyAddress], edi
|
when readmem is handled originalInstruction hasn't been allocated or filled yet (readmem is parsed before the rest)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
abystus Expert Cheater
Reputation: 1
Joined: 09 Dec 2010 Posts: 140
|
Posted: Sun Jan 03, 2016 3:48 am Post subject: |
|
|
You are the man Dark Byte! I wasn't thinking about it that way. Works like a charm now. Thanks so much.
_________________
Hitler are you bored? Watch some of my hacks here. Want 2 gb of online storage space for free? Get Dropbox for computer, phone, etc... |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Jan 03, 2016 7:41 am Post subject: |
|
|
Also, you don't need other alloc for originalInstruction.
| Code: | [ENABLE]
alloc(newmem,2048)
label(originalInstruction)
label(returnhere)
label(xorKeyAddress)
aobscan(xorKeyAddressHook, BF ?? ?? ?? ?? 85 ED 7E 2D 8A 07 84 C0 75 0A A0 ?? ?? ?? ?? BF ?? ?? ?? ?? 8A 16)
registersymbol(xorKeyAddressHook)
registersymbol(xorKeyAddress)
registersymbol(originalInstruction)
newmem:
originalInstruction:
readmem(xorKeyAddressHook, 5) //BF 29 8E 5A 00
mov [xorKeyAddress], edi
jmp returnhere
xorKeyAddress:
xorKeyAddressHook:
jmp newmem
returnhere:
[DISABLE]
xorKeyAddressHook:
readmem(originalInstruction, 5) //mov edi,005A8E29
unregistersymbol(xorKeyAddressHook)
unregistersymbol(xorKeyAddress)
unregistersymbol(originalInstruction)
dealloc(newmem)
dealloc(originalInstruction) |
_________________
|
|
| Back to top |
|
 |
abystus Expert Cheater
Reputation: 1
Joined: 09 Dec 2010 Posts: 140
|
Posted: Mon Jan 04, 2016 2:27 am Post subject: |
|
|
| mgr.inz.Player wrote: | | Also, you don't need other alloc for originalInstruction. |
Thanks for the tip!
_________________
Hitler are you bored? Watch some of my hacks here. Want 2 gb of online storage space for free? Get Dropbox for computer, phone, etc... |
|
| Back to top |
|
 |
|