diff --git a/cpp/LunaHook/LunaHook/engine32/littlecheese.cpp b/cpp/LunaHook/LunaHook/engine32/littlecheese.cpp index 4a68ce76..4b69119b 100644 --- a/cpp/LunaHook/LunaHook/engine32/littlecheese.cpp +++ b/cpp/LunaHook/LunaHook/engine32/littlecheese.cpp @@ -14,21 +14,22 @@ bool littlecheese::attach_function() addr = reverseFindBytes(align, sizeof(align), addr - 0x100, addr); if (addr == 0) return false; + HookParam hp; + hp.offset = regoffset(ecx); + hp.filter_fun = [](TextBuffer *buffer, HookParam *) + { + StringFilter(buffer, "\x81\x40", 2); + }; if (*(DWORD *)(addr - 4) == 0x55575653) { - HookParam hp; hp.address = addr - 4; - hp.offset = regoffset(ecx); hp.type = USING_CHAR | CODEC_ANSI_BE; - return NewHook(hp, "littlecheese"); } else { - HookParam hp; hp.address = addr; - hp.offset = regoffset(ecx); hp.split = regoffset(edx); hp.type = USING_CHAR | CODEC_ANSI_BE | NO_CONTEXT | USING_SPLIT; - return NewHook(hp, "littlecheese"); } + return NewHook(hp, "littlecheese"); } \ No newline at end of file