Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Custom Scan: Value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
NightEternal
Advanced Cheater
Reputation: 0

Joined: 27 Nov 2007
Posts: 56

PostPosted: Mon Mar 10, 2008 4:57 pm    Post subject: Custom Scan: Value Reply with quote

Hello,

I'm wondering if there is a way to get the Value of a Custom Scan in the results list (right now, it's showing only the address)

I'm using a script I found verbatim in another post:

Code:

[enable]
{do not change the allocnames of the following code, you are free to add new allocs though
of course then don't forget to dealloc them at [disable] as well}
alloc(checkroutine,2048)
alloc(prologue,2048)
alloc(epilogue,2048)
alloc(fastscanstepsize,4)
alloc(variablesize,4)
alloc(firstscan,4)
alloc(scantext,4) //will get the pointer to the given string
alloc(scanvalue,8) //will get the value of the input string converted to an 8-byte value
alloc(singlescanvalue,4) //will get the float type of the input
alloc(doublescanvalue,8) //will get the double type of the input

variablesize:
dd 4 //defines how many bytes get saved for each found result

fastscanstepsize:
dd 1 //defines the stepsize when using fastscan (1=no difference)

firstscan:
dd 0 //set to 1 if you want the old value to be that of the first scan

/* routines:
Hint: You can write these routines in any language you like and export them as dll's.
Then use loadlibrary and call exportfunction to use them*/

checkroutine:
/*
edx=pointer to new value
ecx=pointer to old value
*/

//example of 4-byte "exact value" scan for the value 100:
mov eax,[edx]  //eax gets the new value
cmp eax,[scanvalue]  //compare eax with the value at scanvalue
setz al //sets al to 1 if match, 0 if false (upper bits of eax are ignored)
ret

prologue:
mov eax,[scanvalue]
shl eax,3 //multiply by 8
mov [scanvalue],eax
//You can put some code here that gets executed BEFORE the scan starts
ret

epilogue:
//You can put some code here that gets executed AFTER the scan finishes
ret

[disable]
dealloc(checkroutine)
dealloc(prologue,2048)
dealloc(epilogue,2048)
dealloc(fastscanstepsize)
dealloc(variablesize)
dealloc(scantext)
dealloc(scanvalue)
dealloc(singlescanvalue)
dealloc(doublescanvalue)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 473

Joined: 09 May 2003
Posts: 25899
Location: The netherlands

PostPosted: Mon Mar 10, 2008 5:23 pm    Post subject: Reply with quote

Currently not possible. Perhaps I could add in a function you can put in your script to convert the bytes to a integer notation that fits better

Also, for an exact value scan as this script, you know what the value is right after the scan

_________________
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
View user's profile Send private message MSN Messenger
NightEternal
Advanced Cheater
Reputation: 0

Joined: 27 Nov 2007
Posts: 56

PostPosted: Tue Mar 11, 2008 11:32 am    Post subject: Reply with quote

Ok, thanks. Being able to show values would be a great help.

I was going to modify this script in a variety of ways. Just wanted to see how this one worked before I started playing around with it.

Obviously it's for flash, so what I'm attempting to do is have an "unknown value" scan, but only return results that are divisible by 8. In that case, you wouldn't know what the value was going into it. If this sort of scan could be added to the generic 4-byte scans, that would work too.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites