mardi 25 mars 2014

[Source] Script Engine topic




Here's some relevant info for tonight!

I figured you all are busy copy and pasting the basis of others and don't know what to do when an offset changes... So I did this nice bit of reversing for you to be able to figure it out on your own!

These structures can be used to identify the name and locations of the operator functions for your dis-assembly. So, as most of them are straight forward, it will increase the rate at which you find information or data you need for your cheat.

Special Thanks:
Me again. Seriously guys, I don't use other peoples work... They tend to be all C++ happy and stuff; I'm not.


Code:



/*
FYI: I work exclusively in C, C++ constructs are wrapped in their C equivalence;
 */

typedef void (*PFunc)();

typedef struct {
/*00*/        DWORD Index; // if translated
/*04*/        DWORD Length; // inited to strlen
/*08*/        CHAR Data[0]; // null terminated
} AString, *PString;

// C++: Generic Type holder, technically GameType<Type>
typedef struct {
        PVOID vFTable;
        PVOID pType;
        PVOID pBuffer;
} GameType;

// C++: BinaryOperator
typedef struct {
/*00*/PVOID vFTable;
/*04*/PString Name; // A copy of the name from the GameInstructionOperator
/*08*/PFunc Function; // This is the function which carries out the operation.
/*0C*/GameType Unknown[3];
} BinaryOperator, *PBinaryOperator; // sizeof(BinaryOperator)=0x30; confirmed

// C++: GameInstructionOperator : Assumed similarities to other GameInstruction(Classes)
typedef struct {
/*00*/PVOID vFTable;
/*04*/PString Name;
/*08*/DWORD Four; // Seemingly it's always 4. It maketh no sense?
/*0C*/PVOID Operation; // Pointer to (Nullar/Unary/Binary)Operator (0,1,2 args)
/*10*/PString Type; // Typically void (null)
/*14*/PString Arguments;
/*18*/PString Description;
/*1C*/PString Example;
/*20*/PString Unk04;
/*24*/PString Version;
/*28*/PString Unk05;
/*2C*/PString Unk06;
/*30*/PFunc KeyFrame;
} GameInstruction; // sizeof()=0x34 ? seems so


So, as I'm sure you're going to wonder, "What about NullarOperator and UnaryOperator?" Well, as it turns out: They all share BinaryOperator's structure only GameType array is 1, and 2 respectively... The GameType's are the way the script engine limits the types being passed coerced... NullarOperator, where regex "(<NullarOperator>This, (<BinaryOperator>Arg1, (<UnaryOperator>Arg2)))"

Your welcome.





Aucun commentaire:

Enregistrer un commentaire