How to Hook This:
I found the Reference but this time it is Field Offset
Here is struct
Here is my Hook but It wont work
C#:
public Boards[] boards; // 0x54
I found the Reference but this time it is Field Offset
Here is struct
C++:
template <typename T>
struct monoArray
{
void* klass;
void* monitor;
void* bounds;
int max_length;
void* vector [1];
int getLength()
{
return max_length;
}
T getPointer()
{
return (T)vector;
}
};
Here is my Hook but It wont work
C++:
void (*_casMenuUpdate)(void *ins);
void casMenuUpdate(void *ins) {
if (ins != NULL) {
monoArray<void> *boards = *(monoArray<void>**)((uint64_t) ins + 0x54);
if (boards != NULL) {
for (int i = 0; i < boards->getLength(); i++) {
auto board = (*void) boards->getPointer();
board[i] = 0;
}
}
}
}