FindPattern, ala dom1n1k

Need More API Functions? Request Language Additions Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

FindPattern, ala dom1n1k

Postby Shynd » Thu Feb 07, 2008 12:11 am

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.
User avatar
Shynd
Acker
 
Posts: 68
Joined: Fri Jan 05, 2007 2:11 am

Postby mezzo » Thu Feb 07, 2008 2:43 am

just out of curiosity, what does the ";" in the first line do?

for(;*szMask;++szMask,++pData,++bMask)
- No thanks, I already have a penguin -
User avatar
mezzo
El Mariachi
 
Posts: 739
Joined: Mon Apr 30, 2007 10:27 pm
Location: Antwerp

Postby L. Spiro » Thu Feb 07, 2008 9:51 am

It is an empty statement.


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


L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby Shynd » Thu Feb 07, 2008 11:05 am

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;
}
User avatar
Shynd
Acker
 
Posts: 68
Joined: Fri Jan 05, 2007 2:11 am

Postby mezzo » Thu Feb 07, 2008 4:32 pm

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 ? :-)
- No thanks, I already have a penguin -
User avatar
mezzo
El Mariachi
 
Posts: 739
Joined: Mon Apr 30, 2007 10:27 pm
Location: Antwerp

Postby L. Spiro » Thu Feb 07, 2008 6:21 pm

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
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby Shynd » Thu Feb 07, 2008 9:21 pm

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.
User avatar
Shynd
Acker
 
Posts: 68
Joined: Fri Jan 05, 2007 2:11 am

Postby L. Spiro » Thu Feb 07, 2008 9:26 pm

Do you have any idea how insanely hard that would be?


L. Spiro
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 2 guests

cron