//
// sub_100004114 from 0x100004114 to 0x1000041d0 (188 bytes)
//
// 3 xrefs:
// > sub_100004114 @ 0x100004170
// > GJSmartTemplate::logTemplateStatus @ 0x100007c14
// > GJSmartTemplate::getTemplateState @ 0x100008020
//
// 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
//
void __fastcall sub_100004114(__int64 a1, __int64 a2, int a3, __int64 a4, __int64 a5)
{
__int64 v9; // x23
__int64 v10; // x24
void *__p[2]; // [xsp+8h] [xbp-58h] BYREF
char v12; // [xsp+1Fh] [xbp-41h]
if ( a3 != (_DWORD)a1 )
{
LODWORD(v9) = a3;
v10 = 4LL * a3;
do
{
*(_DWORD *)(a2 + v10) = 0;
v9 = (unsigned int)(v9 + 1);
sub_100004114(a1, a2, v9, a4, a5);
*(_DWORD *)(a2 + v10) = 1;
v10 += 4;
}
while ( (_DWORD)a1 != (_DWORD)v9 );
}
sub_100004000(a2, a1, (int)__p);
cocos2d::CCDictionary::setObject_1(a4, a5, __p);
if ( v12 < 0 )
operator delete(__p[0]);
}