Jump to content

Theos - MSHookFunction not hook an Unity func


GeTRoZ

2 posts in this topic

Recommended Posts

Posted

Hi, I am working in a project. An Unity game. I have the dump.cs file from Il2CppDumper. I can see all function definitions and offsets.

After, I find the function into IDA PRO and found the RVA offset.
 

dump.cs:
public class ProgressData : BaseData // TypeDefIndex: 5323 {
  public int get_Coins(); // RVA: 0x1010AF3E4 Offset: 0x10AF3E4
}

Tweak.xm:
int (*old_get_Coins)(void *self);
int get_Coins(void *self) {
  return 1000;
}

%ctor {
	MSHookFunction((void*)(_dyld_get_image_vmaddr_slide(0) + 0x1010AF3E4),(void*)get_Coins,(void**)&old_get_Coins);
}

IDA PRO capture

Compile and install right but nothing change in the game.

My code is correct or I have any error ?

Thanks.

Archived

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

×
  • 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