Adding console commands to your hack
struct & function pointer
Code:
struct cCommand;
struct cCommand
{
cCommand *prevCommand; //0-4
char *pCommandText; //4-8
char unknown002[8]; //8-16
void *funcptr; //16-20
char unknown003[4]; //20-24
}; //size is 24
cCommand *(__stdcall *pAddCommand)(char *pCommandText, unsigned long *CommandFunction, cCommand *retval);
initializing the function pointer:
Code:
pAddCommand = (cCommand *(__stdcall *)(char *,unsigned long *,cCommand *))0x608A00;
Adding command example:
Code:
cCommand myToggleAimCmd;
void toggleaimbot(void)
{
bAimbot = !bAimbot;
}
pAddCommand("toggleaimbot", &toggleaimbot, &myToggleAimCmd);
And here is the sig:
Code:
56 8B 74 24 08 56 E8 ?? ?? ?? ?? 83 C4 04 85 C0 74 19
\x56\x8B\x74\x24\x08\x56\xE8\x00\x00\x00\x00\x83\xC4\x04\x85\xC0\x74\x19
xxxxxxx????xxxxxxx
Have fun,
Hell
Edit: Found out the first unknown, which is prevCommand!
0x03EE64D4 holds a pointer to the last command that was added! you can use a loop to go all the way back to the first command added(which will have 0 as prevCommand)