Insert your little code that you think should be seen by others. I noticed that there are similar threads and decided to do something similar.
For example:
PHP Code:
// C++
int RGetAppID() // Get AppID from steam_appid.txt
{
std::ifstream f("steam_appid.txt");
std::string str((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
str.erase(std::remove(str.begin(), str.end(), char(0x0A)), str.end());
str.erase(std::remove(str.begin(), str.end(), char(0x00)), str.end());
return std::stoi(str);
}
// C++
size_t RSizeOfFunction(void* func) // Get size of function (opcodes - bytes). For example: RSizeOfFunction(AllocConsole);
{
if (func) {
size_t size = 0;
BYTE* bytes = static_cast<BYTE*>(func);
while (bytes[size] != 0xC3 && bytes[size + 1] != 0xCC)
{
if (size >= 0x100000) { // 1 mByte = 0x100000
return size_t(0);
}
size++;
}
return size + 1;
}
else {
return size_t(0);
}
}