//
// sub_45313C from 0x45313c to 0x4531f0 (180 bytes)
//
// 3 xrefs:
// > GJRateLevelLayer::setupRateInfo @ 0x453ed4
// > GJRateLevelLayer::setupRateInfo @ 0x453ef6
// > GJRateLevelLayer::setupRateInfo @ 0x4541c6
//
// 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
//
cocos2d::CCArray *__fastcall sub_45313C(cocos2d::CCArray *a1, char *a2)
{
int v4; // r5
cocos2d::CCArray *v5; // r10
int v6; // r0
int v7; // r6
const std::string *v8; // r1
cocos2d::CCObject *v9; // r0
bool (__fastcall *canEncode)(cocos2d::CCObject *__hidden); // [sp+4h] [bp-18h]
char *v12; // [sp+Ch] [bp-10h] BYREF
char v13; // [sp+10h] [bp-Ch] BYREF
v4 = 0;
v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v6 = sub_774A78((int)a1, a2);
canEncode = a1->__vftable[-1].canEncode;
v7 = v6;
while ( 1 )
{
sub_776158(&v12, a1, v4, v7 - v4);
if ( *((_DWORD *)v12 - 3) || (bool (__fastcall *)(cocos2d::CCObject *__hidden))v4 != canEncode )
{
sub_776584((int)&v13, v12);
v9 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v13, v8);
cocos2d::CCArray::addObject(v5, v9);
sub_774008(&v13);
}
if ( v7 == -1 )
break;
v4 = v7 + 1;
v7 = sub_774A78((int)a1, a2);
sub_774008(&v12);
}
sub_774008(&v12);
return v5;
}