//
// InfoLayer::setupPageInfo from 0x53da8c to 0x53dcea (606 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'InfoLayer::setupPageInfo @ 0x53dd04
//
// 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:52:16 +0000
//
unsigned int __fastcall InfoLayer::setupPageInfo(int a1, int a2, char *a3)
{
unsigned int result; // r0
bool v6; // nf
size_t v7; // r0
cocos2d::CCArray *v8; // r0
cocos2d::CCArray *v9; // r9
int v10; // r3
unsigned __int8 *v11; // r2
unsigned __int8 *v12; // r3
unsigned __int8 *v13; // r1
unsigned __int8 *v14; // r4
int v15; // r5
int v16; // r4
int v17; // r7
unsigned int v18; // r5
size_t v19; // r2
unsigned int v20; // r3
std::logic_error *exception; // r4
char *v22; // r1
size_t v23; // r3
char *v24; // r1
char *v25; // r1
size_t v26; // r0
cocos2d::CCObject *v27; // r0
unsigned __int8 *v28; // r2
unsigned int v29; // r3
unsigned __int8 *v30; // r1
unsigned __int8 *v31; // r3
unsigned __int8 *v32; // r4
int v33; // r0
cocos2d::CCString *v34; // r0
cocos2d::CCString *v35; // r0
cocos2d::CCString *v36; // r0
int v37; // r0
int v38; // r1
char *v39; // [sp+4h] [bp-30h]
int v40; // [sp+8h] [bp-2Ch] BYREF
unsigned int v41; // [sp+Ch] [bp-28h]
char *v42; // [sp+10h] [bp-24h]
int v43; // [sp+14h] [bp-20h] BYREF
int v44; // [sp+18h] [bp-1Ch]
char *v45; // [sp+1Ch] [bp-18h]
int v46[3]; // [sp+20h] [bp-14h] BYREF
result = InfoLayer::isCorrect((InfoLayer *)a1, a3);
if ( !result )
return result;
v6 = (*(_BYTE *)a2 & 1) != 0;
if ( (*(_BYTE *)a2 & 1) == 0 )
++a2;
v40 = 0;
if ( v6 )
a2 = *(_DWORD *)(a2 + 8);
v41 = 0;
v42 = nullptr;
v7 = strlen((const char *)a2);
v8 = (cocos2d::CCArray *)std::string::__init(&v40, (const void *)a2, v7);
v9 = (cocos2d::CCArray *)cocos2d::CCArray::create(v8);
if ( (v40 & 1) == 0 )
{
v10 = (int)(unsigned __int8)v40 >> 1;
if ( !v10 )
{
v16 = -1;
goto LABEL_19;
}
v11 = (unsigned __int8 *)&v40 + 1;
LABEL_8:
v12 = &v11[v10];
v13 = v11;
while ( 1 )
{
v14 = v13;
if ( v13 == v12 )
break;
v15 = *v13++;
if ( v15 == 58 )
{
v16 = v14 - v11;
goto LABEL_13;
}
}
v16 = -1;
LABEL_13:
if ( (v40 & 1) != 0 )
goto LABEL_16;
LABEL_19:
v17 = (int)(unsigned __int8)v40 >> 1;
goto LABEL_20;
}
v10 = v41;
v11 = (unsigned __int8 *)v42;
if ( v41 )
goto LABEL_8;
v16 = -1;
LABEL_16:
v17 = v41;
LABEL_20:
v18 = 0;
while ( 1 )
{
v19 = v16 - v18;
v43 = 0;
v44 = 0;
v45 = nullptr;
if ( (v40 & 1) != 0 )
{
v20 = v41;
if ( v18 > v41 )
goto LABEL_25;
v22 = v42;
}
else
{
v20 = (int)(unsigned __int8)v40 >> 1;
if ( v18 > v20 )
{
LABEL_25:
exception = (std::logic_error *)_cxa_allocate_exception(8u);
std::logic_error::logic_error(exception, "basic_string");
*(_DWORD *)exception = &off_D1548C;
_cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::out_of_range,
(void (*)(void *))std::length_error::~length_error);
}
v22 = (char *)&v40 + 1;
}
v23 = v20 - v18;
v24 = &v22[v18];
if ( v19 >= v23 )
v19 = v23;
std::string::__init(&v43, v24, v19);
if ( (v43 & 1) != 0 )
{
if ( v44 || v18 != v17 )
{
v25 = v45;
LABEL_39:
v39 = v25;
memset(v46, 0, sizeof(v46));
v26 = strlen(v25);
std::string::__init(v46, v39, v26);
v27 = (cocos2d::CCObject *)cocos2d::CCString::create(v46);
cocos2d::CCArray::addObject(v9, v27);
std::string::~string((int)v46);
}
}
else if ( (unsigned __int8)v43 >> 1 || v18 != v17 )
{
v25 = (char *)&v43 + 1;
goto LABEL_39;
}
if ( v16 == -1 )
break;
v18 = v16 + 1;
if ( (v40 & 1) != 0 )
{
v28 = (unsigned __int8 *)v42;
v29 = v41;
}
else
{
v29 = (int)(unsigned __int8)v40 >> 1;
v28 = (unsigned __int8 *)&v40 + 1;
}
if ( v18 < v29 )
{
v30 = &v28[v18];
v31 = &v28[v29];
while ( 1 )
{
v32 = v30;
if ( v30 == v31 )
break;
v33 = *v30++;
if ( v33 == 58 )
{
v16 = v32 - v28;
goto LABEL_49;
}
}
}
v16 = -1;
LABEL_49:
std::string::~string((int)&v43);
}
std::string::~string((int)&v43);
std::string::~string((int)&v40);
result = cocos2d::CCArray::count(v9);
if ( result > 2 )
{
v34 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v9, 0);
*(_DWORD *)(a1 + 616) = cocos2d::CCString::intValue(v34);
v35 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v9, 1u);
*(_DWORD *)(a1 + 620) = cocos2d::CCString::intValue(v35);
v36 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v9, 2u);
v37 = cocos2d::CCString::intValue(v36);
v38 = *(_DWORD *)(a1 + 620);
*(_DWORD *)(a1 + 624) = v37;
(*(void (__fastcall **)(_DWORD, bool))(**(_DWORD **)(a1 + 584) + 172))(*(_DWORD *)(a1 + 584), v38 != 0);
(*(void (__fastcall **)(_DWORD, bool))(**(_DWORD **)(a1 + 580) + 172))(
*(_DWORD *)(a1 + 580),
*(_DWORD *)(a1 + 624) + *(_DWORD *)(a1 + 620) < *(_DWORD *)(a1 + 616));
return InfoLayer::updateLevelsLabel((InfoLayer *)a1);
}
return result;
}