This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! I can make a Class or Method NOP with

AmateurHacker

Platinian
Hello, I use Libtool. I can easily nop methods or classes. But how can I do this on modmenu? I don't want to use hexpatch.
 

Attachments

  • Ekran görüntüsü 2025-07-23 131023.png
    21.6 KB · Views: 22
Solution
Not sure what you mean as your question is badly formulated. But if your goal is to make sure that the argument in the return is always false then the code below will do just that:

C++:
void (*o_UpdateMeshShadow)(void* _this, bool bShow);
void UpdateMeshShadow(void* _this, bool bShow) {
    if (_this) {
        bShow = false;
        LOGI("Called UpdateMeshShadow");
        return o_UpdateMeshShadow( _this , bShow);
    }
}

If your goal is to just skip Updating mesh shadows for each entity then just return nothing.
C++:
void  (*o_SetParent)(void* _this, void* parent);

void SetParent(void* _this, void* parent) {
    if (_this != nullptr) {
        return;
    }
}



Or if you don't want to hook it then hex patch it with NOP operation
public System.Void SetFoldScreen(System.Int32 width, System.Int32 hight);
I'm trying to do something like this.
bool TransparentGameplay;
void (*FoldScreen)(void *instance,int Uzunluk ,int Genislik);

void (*old_ScreenAdapt)(void* instance);
void new_ScreenAdapt(void* instance) {
if (TransparentGameplay) {
FoldScreen(instance,1900,1440);
TransparentGameplay = false;

}
old_ScreenAdapt(instance);
}


but it doesn't work. Everything on the screen is erased in the game, but it doesn't turn into the size I want.
I'm trying to transfer this to the mod menu. But the game crashes.









 
Not detailed enough.

Are both methods in the same class? Is ScreenAdapt method even called at any point ? Did you try logging? Is TransparentGameplay a toggle? If not then the condition is never met. If your goal is to play with the screen resolution then your best bet is SetResolution which is a static method in UnityEngine.Screen
 
My problem is solved. I solved it. How can I change my post to solved?
 
 
Not sure what you mean as your question is badly formulated. But if your goal is to make sure that the argument in the return is always false then the code below will do just that:

C++:
void (*o_UpdateMeshShadow)(void* _this, bool bShow);
void UpdateMeshShadow(void* _this, bool bShow) {
    if (_this) {
        bShow = false;
        LOGI("Called UpdateMeshShadow");
        return o_UpdateMeshShadow( _this , bShow);
    }
}

If your goal is to just skip Updating mesh shadows for each entity then just return nothing.
 
Solution
My friend. I want the current example argument, 120, to return false. As the game progresses, more arguments are added, and the number reaches 300. Even if it reaches 300, they should also return false. I'll try your code. ALL ARGUMENTS FALSE
 
t
Thank you very much. I hope all your wishes come true.