Last active
August 28, 2022 22:46
-
-
Save vesim987/115f7a46c3f851673d7cb2db7b0abb39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<class... Y, class X> | |
void (*y(X z, unsigned int b)) (Y...) { | |
for(char* a = reinterpret_cast<char*>(z); a < reinterpret_cast<char*>(z) + 256; a++) if((*reinterpret_cast<unsigned int*>(a) & 4294967295) == b) return reinterpret_cast<void(*)(Y...)>(a); | |
return {}; | |
} | |
int main() { | |
y<int, const char*, int, void(*)()>(&main, 84922879)(1, "Hello World!\n", 13, y<>(&main, 3287845192)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment