//
// DS_Dictionary::getRectArrayForKey from 0x5fe804 to 0x5fe902 (254 bytes)
//
// 0 xrefs:
//
// 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
//
std::vector *DS_Dictionary::getRectArrayForKey(
std::vector *__return_ptr retstr,
DS_Dictionary *a2,
const char *a3)
{
unsigned int v4; // r6
cocos2d::CCRect *m_finish; // r0
signed int v7; // r0
int v8; // r5
bool v9; // cf
unsigned int v10; // r5
cocos2d::CCRect *v11; // r7
cocos2d::CCRect *v12; // r0
cocos2d::CCRect *m_start; // r3
cocos2d::CCRect *v14; // r0
cocos2d::CCRect *v15; // r2
cocos2d::CCRect *v16; // r11
cocos2d::CCRect *v18; // [sp+8h] [bp-2Ch]
cocos2d::CCRect *v19; // [sp+Ch] [bp-28h]
std::vector v20; // [sp+10h] [bp-24h] BYREF
cocos2d::CCRect v21; // [sp+1Ch] [bp-18h] BYREF
v4 = 0;
DS_Dictionary::getStringArrayForKey(&v20, a2, a3);
retstr->m_start = nullptr;
retstr->m_finish = nullptr;
retstr->m_reserveEnd = nullptr;
while ( v4 < v20.m_finish - v20.m_start )
{
cocos2d::CCRect::CCRect(&v21);
m_finish = retstr->m_finish;
if ( m_finish != retstr->m_reserveEnd )
{
if ( m_finish )
cocos2d::CCRect::CCRect(m_finish, &v21);
++retstr->m_finish;
goto LABEL_24;
}
v7 = m_finish - retstr->m_start;
if ( v7 )
v8 = v7;
else
v8 = 1;
v9 = __CFADD__(v8, v7);
v10 = v8 + v7;
if ( v9 || v10 >= 0x10000000 )
{
v10 = 0xFFFFFFF;
}
else if ( !v10 )
{
v11 = nullptr;
goto LABEL_14;
}
v11 = (cocos2d::CCRect *)operator new(16 * v10);
LABEL_14:
v12 = (cocos2d::CCRect *)((char *)v11 + (char *)retstr->m_finish - (char *)retstr->m_start);
if ( v12 )
cocos2d::CCRect::CCRect(v12, &v21);
m_start = retstr->m_start;
v14 = v11;
v15 = retstr->m_finish;
while ( 1 )
{
v16 = v14 + 1;
if ( m_start == v15 )
break;
if ( v14 )
{
v19 = v15;
v18 = m_start;
cocos2d::CCRect::CCRect(v14, m_start);
v15 = v19;
m_start = v18;
}
++m_start;
v14 = v16;
}
if ( retstr->m_start )
operator delete(retstr->m_start);
retstr->m_start = v11;
retstr->m_finish = v16;
retstr->m_reserveEnd = &v11[v10];
LABEL_24:
if ( !DS_Dictionary::rectFromString(a2, (int)&v20.m_start[v4], retstr->m_finish - 1) )
{
retstr->m_finish = retstr->m_start;
break;
}
++v4;
}
std::vector::~vector((void **)&v20.m_start);
return retstr;
}