Help! How i can hook something like this?

Kurumi0343

Platinian
public SharkType SharkType
{
[Token(Token = "0x6000734")]
[Address(RVA = "0x566AF0", Offset = "0x566AF0", VA = "0x566AF0")]
[Attribute(Name = "CompilerGeneratedAttribute", RVA = "0x237070", Offset = "0x237070")]
get
{
return SharkType.reef;
}
[Token(Token = "0x6000735")]
[Address(RVA = "0x566AF8", Offset = "0x566AF8", VA = "0x566AF8")]
[Attribute(Name = "CompilerGeneratedAttribute", RVA = "0x237080", Offset = "0x237080")]
private set
{
}


Game Hungry Shark
 
getters and setters are just casual functions, use the offsets 0x566AF0 and 0x566AF8 to hook them

C++:
void* (*old_get_Attribute)(void*);

void* get_Attribute(void *instance) {
   void* attr = old_get_Attribute(instance);
   // do sth
   return attr
}


HOOK_LIB("libname.so", "0x566AF0", get_Attribute, old_get_Attribute);
Just ensure that void* is the actual attribute type (SharkType.reef)
 
Back
Top Bottom