//
// GJEffectManager::setupFromString from 0x5ceae0 to 0x5cecfc (540 bytes)
//
// 1 xrefs:
// > LevelSettingsObject::objectFromDict @ 0x4750d8
//
// 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:54:03 +0000
//
unsigned int __fastcall GJEffectManager::setupFromString(cocos2d::CCDictionary **a1, char *a2)
{
char v2; // r2
const char *v3; // r4
size_t v4; // r0
cocos2d::CCArray *v5; // r0
cocos2d::CCArray *v6; // r0
int v7; // r5
cocos2d::CCArray *v8; // r10
int v9; // r3
unsigned __int8 *v10; // r4
unsigned __int8 *v11; // r5
unsigned __int8 *first_of; // r0
bool v13; // zf
int v14; // r4
int v15; // r5
unsigned int v16; // r7
char *v17; // r1
size_t v18; // r0
cocos2d::CCObject *v19; // r0
unsigned __int8 *v20; // r12
unsigned int v21; // r4
unsigned __int8 *v22; // r4
unsigned __int8 *v23; // r0
unsigned int v24; // r4
cocos2d::CCString *v25; // r0
const char *CString; // r0
const char *v27; // r8
size_t v28; // r0
ColorAction *v29; // r0
ColorAction *v30; // r8
int v31; // r2
int v32; // r3
int v33; // r2
unsigned int result; // r0
char *v36; // [sp+14h] [bp-30h]
int v37; // [sp+18h] [bp-2Ch] BYREF
unsigned int v38; // [sp+1Ch] [bp-28h]
unsigned __int8 *v39; // [sp+20h] [bp-24h]
int v40; // [sp+24h] [bp-20h] BYREF
int v41; // [sp+28h] [bp-1Ch]
char *v42; // [sp+2Ch] [bp-18h]
int v43[3]; // [sp+30h] [bp-14h] BYREF
v37 = 0;
v2 = *a2;
v38 = 0;
v39 = nullptr;
if ( (v2 & 1) != 0 )
v3 = *((const char **)a2 + 2);
else
v3 = a2 + 1;
v4 = strlen(v3);
v5 = (cocos2d::CCArray *)std::string::__init(&v37, v3, v4);
v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5);
v7 = (unsigned __int8)v37;
v8 = v6;
if ( (v37 & 1) == 0 )
{
v9 = (int)(unsigned __int8)v37 >> 1;
if ( !v9 )
{
v14 = -1;
goto LABEL_15;
}
v10 = (unsigned __int8 *)&v37 + 1;
LABEL_6:
v11 = &v10[v9];
first_of = std::__find_first_of_ce(
v10,
&v10[v9],
(int)"|",
(int)"",
(int (__fastcall *)(_DWORD, int))std::char_traits::eq);
v13 = first_of == v11;
v7 = (unsigned __int8)v37;
if ( v13 )
v14 = -1;
else
v14 = first_of - v10;
if ( (v37 & 1) != 0 )
goto LABEL_12;
LABEL_15:
v15 = v7 >> 1;
goto LABEL_16;
}
v9 = v38;
v10 = v39;
if ( v38 )
goto LABEL_6;
v14 = -1;
LABEL_12:
v15 = v38;
LABEL_16:
v16 = 0;
while ( 1 )
{
std::string::basic_string(&v40, (unsigned __int8 *)&v37, v16, v14 - v16);
if ( (v40 & 1) != 0 )
{
if ( v41 || v16 != v15 )
{
v17 = v42;
LABEL_26:
v36 = v17;
memset(v43, 0, sizeof(v43));
v18 = strlen(v17);
std::string::__init(v43, v36, v18);
v19 = (cocos2d::CCObject *)cocos2d::CCString::create(v43);
cocos2d::CCArray::addObject(v8, v19);
std::string::~string((int)v43);
}
}
else if ( (unsigned __int8)v40 >> 1 || v16 != v15 )
{
v17 = (char *)&v40 + 1;
goto LABEL_26;
}
if ( v14 == -1 )
break;
v16 = v14 + 1;
if ( (v37 & 1) != 0 )
{
v20 = v39;
v21 = v38;
}
else
{
v21 = (int)(unsigned __int8)v37 >> 1;
v20 = (unsigned __int8 *)&v37 + 1;
}
if ( v16 >= v21
|| (v22 = &v20[v21],
v36 = (char *)v20,
v23 = std::__find_first_of_ce(
&v20[v16],
v22,
(int)"|",
(int)"",
(int (__fastcall *)(_DWORD, int))std::char_traits::eq),
v23 == v22) )
{
v14 = -1;
}
else
{
v14 = v23 - (unsigned __int8 *)v36;
}
std::string::~string((int)&v40);
}
v24 = 0;
std::string::~string((int)&v40);
std::string::~string((int)&v37);
while ( 1 )
{
result = cocos2d::CCArray::count(v8);
if ( v24 >= result )
break;
v25 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v8, v24);
CString = (const char *)cocos2d::CCString::getCString(v25);
v40 = 0;
v41 = 0;
v42 = nullptr;
v27 = CString;
v28 = strlen(CString);
v29 = (ColorAction *)std::string::__init(&v40, v27, v28);
v30 = (ColorAction *)ColorAction::create(v29);
std::string::basic_string(v43, (int)&v40);
ColorAction::setupFromString((int)v30, (unsigned __int8 *)v43, v31, v32);
std::string::~string((int)v43);
v33 = *((_DWORD *)v30 + 22);
if ( v33 <= 1101 )
GJEffectManager::setColorAction(a1, v30, v33);
++v24;
std::string::~string((int)&v40);
}
return result;
}