Jump to content

A question about Tweak.xm


Go to solution Solved by castix,

5 posts in this topic

Recommended Posts

Posted

Is it possible to hack both a code injection hack and a MSHook hack in a Tweak.xm? Example:

int (*old__ZN3GetMoneyi)();

int $__ZN3GetMoneyi()
{
return 9999;
}

ctor{
MSHookFunction(((int*)MSHookSymbol(NULL, "__ZN3GetMoneyi")),
(int*)$__ZN3GetMoneyi,(int**)&old__ZN3GetMoneyi);

writeData(0x5B766, 0x0120);
}

The writeData would not relate to the getMoney function, it would be something else.

  • Solution
Posted (edited)

Let me clean this code a little bit up

int (*old__ZN3GetMoneyi)();

int __ZN3GetMoneyi() {
return 9999; 
}

%ctor {
MSHookFunction(((int*)MSHookSymbol(NULL, "__ZN3GetMoneyi")),(int*)__ZN3GetMoneyi,(void**)&old__ZN3GetMoneyi);
}

writeData {
(0x5B766, 0x0120);
}

Yes it does work to answer your question. Just check that you don't mix MSHook and Code Injection to one block.

Updated by castix
Posted

Thanks @@castix

By the way, are you going to release the fruit ninja hack we were working on?

No it almost killed me to test what's wotking and what not.. better for my health not to touch it again.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines