Jump to content
  • 0

How to convert this function to for use in GG


richardsonmods

Question

I have this function

void (*orig_SetMoves)(void *instance,int moves); 
 void SetMoves(void *instance,int moves) 
 { 
     if(instance != NULL && hack1)
     { 
         moves = 99; 
  
     } 
     orig_SetMoves(instance,moves);
 }
  
   MSHookFunction((void *) getAbsoluteAddress(targetLibName, string2Offset(OBFUSCATE_KEY("0xFD4B88", '?'))), (void *)  SetMoves, (void **) &orig_SetMoves);

How to converter? 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

On 4/14/2023 at 3:35 AM, richardsonmods said:

I have this function

void (*orig_SetMoves)(void *instance,int moves); 
 void SetMoves(void *instance,int moves) 
 { 
     if(instance != NULL && hack1)
     { 
         moves = 99; 
  
     } 
     orig_SetMoves(instance,moves);
 }
  
   MSHookFunction((void *) getAbsoluteAddress(targetLibName, string2Offset(OBFUSCATE_KEY("0xFD4B88", '?'))), (void *)  SetMoves, (void **) &orig_SetMoves);

How to converter? 

 

Hi @richardsonmods, MSHookFunction is a package for C language. If you want to see it in action, you might want to use it first and debug it using Ghidra. This way, you can see how MSHookFunction doing it's thing ( The Instruction & it's Hex ).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.