//
// GJSmartTemplate::getPrefabWithID from 0x66e958 to 0x66e990 (56 bytes)
//
// 3 xrefs:
// > EditorUI::createPrefab @ 0x4871c0
// > BrowseSmartKeyLayer::updateChanceValues @ 0x673e66
// > BrowseSmartKeyLayer::addChanceToSelected @ 0x673fd4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:55:49 +0000
//
int __fastcall GJSmartTemplate::getPrefabWithID(int a1, int a2, int a3)
{
cocos2d::CCArray *v4; // r0
cocos2d::CCArray *v5; // r5
unsigned int i; // r4
int result; // r0
if ( a3 > 0 )
{
v4 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(*(_DWORD *)(a1 + 52), a2);
v5 = v4;
if ( v4 )
{
if ( cocos2d::CCArray::count(v4) )
{
for ( i = 0; i < cocos2d::CCArray::count(v5); ++i )
{
result = cocos2d::CCArray::objectAtIndex(v5, i);
if ( *(_DWORD *)(result + 76) == a3 )
return result;
}
}
}
}
return 0;
}