//
// sub_100421D40 from 0x100421d40 to 0x100421df9 (185 bytes)
//
// 4 xrefs:
// > sub_100421D40 @ 0x100421d97
// > GJSmartTemplate::generateRemapDict @ 0x100426f2c
// > GJSmartTemplate::logTemplateStatus @ 0x1004273c1
// > GJSmartTemplate::getTemplateState @ 0x1004279de
//
// 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_100421D40(unsigned int a1, __int64 a2, int a3, __int64 a4, cocos2d::CCObject *a5, double a6)
{
_DWORD *v6; // rbx
unsigned int v7; // r13d
int v8; // eax
size_t v9[3]; // [rsp+0h] [rbp-50h] BYREF
cocos2d::CCObject *v10; // [rsp+18h] [rbp-38h]
__int64 v11; // [rsp+20h] [rbp-30h]
v10 = a5;
v11 = a4;
if ( a3 != a1 )
{
v6 = (_DWORD *)(a2 + 4LL * a3);
v7 = a3 + 1;
do
{
*v6 = 0;
sub_100421D40(a1, a2, v7, v11, v10);
*v6++ = 1;
v8 = v7 - a1 + 1;
++v7;
}
while ( v8 != 1 );
}
sub_100421B20(v9, a2, a1, a6);
cocos2d::CCDictionary::setObject_1(v11, v10, (char *)v9);
if ( (v9[0] & 1) != 0 )
operator delete((void *)v9[2]);
}