Jump to content

Help with hooking an offset


Go to solution Solved by Rook,

6 posts in this topic

Recommended Posts

Posted

I got a problem

 

I found this offset that I think is useful (I don't want to say the game cause I'm afraid it might get patched or someone might steal it)

0xB7588 BL sub_BD928

Instead of hacking it the usual way, I wanted to try an MSHook patch.

Would this be possible?

#include <substrate.h>
#import "writeData.h"

float (*costOld)(void *ptr);
float cost(void *ptr) {
        return 0.0f;
}

%ctor
{
       MSHookFunction((void*)(0xB7588+1),(void*)cost,(void**)&costOld);
}

I included writeData cause the function isn't true MShook so I'm not really sure :/

Just wondering if it was possible.

 

If it isn't, would there be another way of going about this? (I found more functions, but they're BOOL ones)

  • Solution
Posted

The offset I was using doesn't have a symbol, but I'm not hacking that game anymore so I guess this help topic is solved :p

Look through the Generator options. You can MSHook Functions.

Posted

Look through the Generator options. You can MSHook Functions.

Ah I see :)

Well that'll be very useful in the future once I get some hacks rolling. Thanks!

Posted

Ah I see :)

Well that'll be very useful in the future once I get some hacks rolling. Thanks!

(y)

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