Page 1 of 1

FindPattern, ala dom1n1k

PostPosted: Thu Feb 07, 2008 12:11 am
by Shynd
Something like this: http://forum.gamedeception.net/showthread.php?t=5484

Yeah, I suppose I could write a script function to do this using external variables, but it seems to me that a hardcoded function would be faster and easier to use. It'd make it very easy to write script hacks (especially when your trainer maker is complete) that update themselves after each new game patch.

PostPosted: Thu Feb 07, 2008 2:43 am
by mezzo
just out of curiosity, what does the ";" in the first line do?

for(;*szMask;++szMask,++pData,++bMask)

PostPosted: Thu Feb 07, 2008 9:51 am
by L. Spiro
It is an empty statement.


I can add this and one better: a pattern maker.


L. Spiro

PostPosted: Thu Feb 07, 2008 11:05 am
by Shynd
Before the first ; is generally where whatever variable you're using in your for loop is initialized. In that for loop, there's nothing initialized. It's the same as:
Code: Select all
while (*szMask)
{
    //...other stuff here
   
    ++szMask;
    ++pData;
    ++bMask;
}

PostPosted: Thu Feb 07, 2008 4:32 pm
by mezzo
L. Spiro wrote:I can add this and one better: a pattern maker.

L. Spiro


this sounds funky ! Care to elaborate on what and how ? :-)

PostPosted: Thu Feb 07, 2008 6:21 pm
by L. Spiro
MHS uses magic to determine which bytes in a function will always be there and which will change when the game is updated and the function moves (or structure sizes change).


This magic allows it to create a string that represents a pattern that can be used to find the function again later, which is the point of this pattern matching. You would select some part of a function in the Disassembler and have it create the string for you.

My vision is to take the basic functionality there and extend it into an actual language (allowing me to make yet another Flex/Bison parser) specifically built for finding functions.

Then give that functionality to the scripts and add a new search type (Function Search).


L. Spiro

PostPosted: Thu Feb 07, 2008 9:21 pm
by Shynd
While I'm shooting for stuff I want, how about the ability to call script functions from a dropdown menu somewhere instead of a hotkey? =p

I hope that's not harder than I'm imagining; don't want to be asking for too much.

PostPosted: Thu Feb 07, 2008 9:26 pm
by L. Spiro
Do you have any idea how insanely hard that would be?


L. Spiro