//
// FRequestProfilePage::setupPageInfo from 0x5f1cf0 to 0x5f1f24 (564 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'FRequestProfilePage::setupPageInfo @ 0x5f1f3c
//
// 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:28 +0000
//
unsigned int __fastcall FRequestProfilePage::setupPageInfo(unsigned int result, int a2, char *a3)
{
FRequestProfilePage *v4; // r7
const char *v5; // r5
size_t v6; // r0
cocos2d::CCArray *v7; // r0
cocos2d::CCArray *v8; // r9
int v9; // r3
unsigned __int8 *v10; // r2
unsigned __int8 *v11; // r3
unsigned __int8 *v12; // r1
unsigned __int8 *v13; // r4
int v14; // r5
int v15; // r4
int v16; // r6
unsigned int v17; // r5
size_t v18; // r2
unsigned int v19; // r3
std::logic_error *exception; // r4
char *v21; // r1
size_t v22; // r3
char *v23; // r1
char *v24; // r1
size_t v25; // r0
cocos2d::CCObject *v26; // r0
unsigned __int8 *v27; // r2
unsigned int v28; // r3
unsigned __int8 *v29; // r1
unsigned __int8 *v30; // r3
unsigned __int8 *v31; // r4
int v32; // r0
cocos2d::CCString *v33; // r0
cocos2d::CCString *v34; // r0
cocos2d::CCString *v35; // r0
char *v36; // [sp+4h] [bp-30h]
int v37; // [sp+8h] [bp-2Ch] BYREF
unsigned int v38; // [sp+Ch] [bp-28h]
char *v39; // [sp+10h] [bp-24h]
int v40; // [sp+14h] [bp-20h] BYREF
int v41; // [sp+18h] [bp-1Ch]
char *v42; // [sp+1Ch] [bp-18h]
int v43[3]; // [sp+20h] [bp-14h] BYREF
v4 = (FRequestProfilePage *)result;
if ( *(_BYTE *)(result + 628) )
return result;
result = FRequestProfilePage::isCorrect((FRequestProfilePage *)result, a3);
if ( !result )
return result;
if ( (*(_BYTE *)a2 & 1) != 0 )
v5 = *(const char **)(a2 + 8);
else
v5 = (const char *)(a2 + 1);
v37 = 0;
v38 = 0;
v39 = nullptr;
v6 = strlen(v5);
v7 = (cocos2d::CCArray *)std::string::__init(&v37, v5, v6);
v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);
if ( (v37 & 1) == 0 )
{
v9 = (int)(unsigned __int8)v37 >> 1;
if ( !v9 )
{
v15 = -1;
goto LABEL_19;
}
v10 = (unsigned __int8 *)&v37 + 1;
LABEL_8:
v11 = &v10[v9];
v12 = v10;
while ( 1 )
{
v13 = v12;
if ( v12 == v11 )
break;
v14 = *v12++;
if ( v14 == 58 )
{
v15 = v13 - v10;
goto LABEL_13;
}
}
v15 = -1;
LABEL_13:
if ( (v37 & 1) != 0 )
goto LABEL_16;
LABEL_19:
v16 = (int)(unsigned __int8)v37 >> 1;
goto LABEL_20;
}
v9 = v38;
v10 = (unsigned __int8 *)v39;
if ( v38 )
goto LABEL_8;
v15 = -1;
LABEL_16:
v16 = v38;
LABEL_20:
v17 = 0;
while ( 1 )
{
v18 = v15 - v17;
v40 = 0;
v41 = 0;
v42 = nullptr;
if ( (v37 & 1) != 0 )
{
v19 = v38;
if ( v17 > v38 )
goto LABEL_25;
v21 = v39;
}
else
{
v19 = (int)(unsigned __int8)v37 >> 1;
if ( v17 > v19 )
{
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);
}
v21 = (char *)&v37 + 1;
}
v22 = v19 - v17;
v23 = &v21[v17];
if ( v18 >= v22 )
v18 = v22;
std::string::__init(&v40, v23, v18);
if ( (v40 & 1) != 0 )
{
if ( v41 || v17 != v16 )
{
v24 = v42;
LABEL_39:
v36 = v24;
memset(v43, 0, sizeof(v43));
v25 = strlen(v24);
std::string::__init(v43, v36, v25);
v26 = (cocos2d::CCObject *)cocos2d::CCString::create(v43);
cocos2d::CCArray::addObject(v8, v26);
std::string::~string((int)v43);
}
}
else if ( (unsigned __int8)v40 >> 1 || v17 != v16 )
{
v24 = (char *)&v40 + 1;
goto LABEL_39;
}
if ( v15 == -1 )
break;
v17 = v15 + 1;
if ( (v37 & 1) != 0 )
{
v27 = (unsigned __int8 *)v39;
v28 = v38;
}
else
{
v28 = (int)(unsigned __int8)v37 >> 1;
v27 = (unsigned __int8 *)&v37 + 1;
}
if ( v17 < v28 )
{
v29 = &v27[v17];
v30 = &v27[v28];
while ( 1 )
{
v31 = v29;
if ( v29 == v30 )
break;
v32 = *v29++;
if ( v32 == 58 )
{
v15 = v31 - v27;
goto LABEL_49;
}
}
}
v15 = -1;
LABEL_49:
std::string::~string((int)&v40);
}
std::string::~string((int)&v40);
std::string::~string((int)&v37);
result = cocos2d::CCArray::count(v8);
if ( result > 2 )
{
v33 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 0);
*((_DWORD *)v4 + 160) = cocos2d::CCString::intValue(v33);
v34 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 1u);
*((_DWORD *)v4 + 161) = cocos2d::CCString::intValue(v34);
v35 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v8, 2u);
*((_DWORD *)v4 + 162) = cocos2d::CCString::intValue(v35);
FRequestProfilePage::updateLevelsLabel(v4);
return FRequestProfilePage::updatePageArrows(v4);
}
return result;
}