//
// GJSmartTemplate::init from 0x10040ec90 to 0x10040ed37 (167 bytes)
//
// 2 xrefs:
// > GJSmartTemplate::create @ 0x10040ec61
// > GJSmartTemplate::createWithCoder @ 0x100414cf4
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:30:08 +0000
//
char __fastcall GJSmartTemplate::init(_QWORD *a1)
{
_QWORD *v2; // rax
_QWORD *v3; // rdi
_QWORD *v4; // r14
_QWORD *v5; // rax
_QWORD *v6; // rax
_QWORD *v7; // rax
_QWORD *v8; // rax
_QWORD *v9; // rax
_QWORD *v10; // rax
v2 = cocos2d::CCDictionary::create();
v3 = (_QWORD *)a1[7];
if ( v3 != v2 )
{
v4 = v2;
if ( v2 )
{
cocos2d::CCObject::retain(v2);
v3 = (_QWORD *)a1[7];
}
if ( v3 )
cocos2d::CCObject::release(v3);
a1[7] = v4;
}
v5 = cocos2d::CCDictionary::create();
a1[8] = v5;
cocos2d::CCObject::retain(v5);
v6 = cocos2d::CCDictionary::create();
a1[9] = v6;
cocos2d::CCObject::retain(v6);
v7 = cocos2d::CCDictionary::create();
a1[10] = v7;
cocos2d::CCObject::retain(v7);
v8 = cocos2d::CCDictionary::create();
a1[11] = v8;
cocos2d::CCObject::retain(v8);
v9 = cocos2d::CCDictionary::create();
a1[12] = v9;
cocos2d::CCObject::retain(v9);
v10 = cocos2d::CCDictionary::create();
a1[13] = v10;
cocos2d::CCObject::retain(v10);
return 1;
}