//
// GJSmartTemplate::getPrefabWithID from 0x1004262f0 to 0x100426360 (112 bytes)
//
// 4 xrefs:
// > EditorUI::createPrefab @ 0x100043c67
// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebb9a
// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebc4a
// > BrowseSmartKeyLayer::updateChanceValues @ 0x1004ebee9
//
// 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
//
__int64 __fastcall GJSmartTemplate::getPrefabWithID(__int64 a1, char *a2, int a3)
{
__int64 v4; // rax
__int64 v5; // r14
int v6; // ecx
__int64 result; // rax
unsigned int v8; // r15d
if ( a3 <= 0 )
return 0;
v4 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 56), a2);
if ( !v4 )
return 0;
v5 = v4;
if ( !(unsigned int)sub_100720070(v4) )
return 0;
v6 = sub_100720070(v5);
result = 0;
if ( v6 )
{
v8 = 0;
while ( 1 )
{
result = sub_1007200C0(v5, v8);
if ( *(_DWORD *)(result + 104) == a3 )
break;
if ( ++v8 >= (unsigned int)sub_100720070(v5) )
return 0;
}
}
return result;
}