//
// GJSmartTemplate::isUnrequired from 0x100427850 to 0x100427983 (307 bytes)
//
// 3 xrefs:
// > GJSmartTemplate::logTemplateStatus @ 0x1004275f3
// > GJSmartTemplate::getTemplateState @ 0x100427c19
// > BrowseSmartTemplateLayer::init @ 0x1004e91f2
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall GJSmartTemplate::isUnrequired(__int64 a1, std::string *a2)
{
bool v2; // r14
bool v3; // r13
bool v4; // r12
std::string::reference v5; // rcx
bool result; // al
std::string::value_type v7; // [rsp+4h] [rbp-2Ch]
std::string::value_type v8; // [rsp+5h] [rbp-2Bh]
std::string::value_type v9; // [rsp+6h] [rbp-2Ah]
std::string::value_type v10; // [rsp+7h] [rbp-29h]
v7 = *std::string::at(a2, 1u);
v9 = *std::string::at(a2, 2u);
v8 = *std::string::at(a2, 3u);
v10 = *std::string::at(a2, 4u);
v2 = *std::string::at(a2, 5u) != 48;
v3 = *std::string::at(a2, 6u) != 48;
v4 = *std::string::at(a2, 7u) != 48;
v5 = std::string::at(a2, 8u);
result = 1;
if ( (v8 != 48 && v7 != 48 || !v2) && (v10 != 48 && v7 != 48 || !v3) && (v8 != 48 && v9 != 48 || !v4) )
{
if ( *v5 == 48 )
return ((unsigned __int8)v10 ^ 0x30
| (unsigned __int8)v8 ^ 0x30
| (unsigned __int8)v9 ^ 0x30
| (unsigned __int8)v7 ^ 0x30) == 0;
else
return v10 == 48 || v9 == 48;
}
return result;
}