//
// sub_1000041EC from 0x1000041ec to 0x10000423c (80 bytes)
//
// 2 xrefs:
// > GJSmartTemplate::logTemplateStatus @ 0x100007c90
// > GJSmartTemplate::getTemplateState @ 0x100008094
//
// 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
//
std::string *__usercall sub_1000041EC@(__int64 a1@, std::string *a2@)
{
int v4; // w9
const std::string::value_type *v5; // x1
std::string::size_type v6; // x2
sub_100009900((int)a2, "1");
v4 = *(char *)(a1 + 23);
if ( v4 >= 0 )
v5 = (const std::string::value_type *)a1;
else
v5 = *(const std::string::value_type **)a1;
if ( v4 >= 0 )
v6 = *(unsigned __int8 *)(a1 + 23);
else
v6 = *(_QWORD *)(a1 + 8);
return std::string::append(a2, v5, v6);
}