//
// cocos2d::CCRectFromString from 0x5c12a8 to 0x5c1442 (410 bytes)
//
// 2 xrefs:
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x5e92fa
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary @ 0x5e9444
//
// 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::CCRect *cocos2d::CCRectFromString(cocos2d::CCRect *__return_ptr retstr, const char *a2)
{
int v4; // r9
int v5; // r5
int v6; // r2
int v7; // r0
int v8; // r2
int v9; // r0
int v10; // r5
double v11; // d10
double v12; // d9
double v13; // d8
float v14; // s15
float v15; // s15
float v16; // r1
float v17; // s15
float v18; // r2
float v19; // s15
float v21; // [sp+0h] [bp-44h]
int v22; // [sp+8h] [bp-3Ch] BYREF
char *v23; // [sp+Ch] [bp-38h] BYREF
char *v24; // [sp+10h] [bp-34h] BYREF
void *v25[3]; // [sp+14h] [bp-30h] BYREF
void *v26[3]; // [sp+20h] [bp-24h] BYREF
cocos2d::CCRect v27; // [sp+2Ch] [bp-18h] BYREF
cocos2d::CCRect::CCRect(retstr, &stru_AC8930);
if ( a2 )
{
v4 = 2;
sub_776584((int)&v22, (char *)a2);
v5 = sub_774910(&v22, 123, 0);
v6 = sub_774910(&v22, 125, 0);
while ( v6 != -1 )
{
v7 = sub_774910(&v22, 125, v6 + 1);
v6 = v7;
if ( v4 == 1 )
{
if ( v5 != -1 && v7 != -1 )
{
sub_776158(&v27, &v22, v5 + 1, v7 - v5 - 1);
sub_774794(&v22, &v27);
sub_774008(&v27);
v8 = sub_774910(&v22, 125, 0);
if ( v8 != -1 )
{
v9 = sub_774910(&v22, 44, v8);
v10 = v9;
if ( v9 != -1 )
{
sub_776158(&v23, &v22, 0, v9);
sub_776158(&v24, &v22, v10 + 1, *(_DWORD *)(v22 - 12) - v10);
memset(v25, 0, sizeof(v25));
if ( sub_5C0FE8(v23, v25) )
{
memset(v26, 0, sizeof(v26));
if ( sub_5C0FE8(v24, v26) )
{
v11 = atof((const char *)*(_DWORD *)v25[0]);
v12 = atof((const char *)*(_DWORD *)((char *)v25[0] + (unsigned int)byte_4));
v13 = atof((const char *)*(_DWORD *)v26[0]);
v14 = atof((const char *)*((_DWORD *)v26[0] + 1));
v21 = v14;
v15 = v11;
v16 = v15;
v17 = v12;
v18 = v17;
v19 = v13;
cocos2d::CCRect::CCRect(&v27, v16, v18, v19, v21);
cocos2d::CCRect::operator=(retstr, &v27.origin.x);
}
std::vector::~vector(v26);
}
std::vector::~vector(v25);
sub_774008(&v24);
sub_774008(&v23);
}
}
}
break;
}
v4 = 1;
}
sub_774008(&v22);
}
return retstr;
}