//
// FRequestProfilePage::setupPageInfo from 0x1008723c0 to 0x1008728ba (1274 bytes)
//
// 2 xrefs:
// > sub_1008729F0 @ 0x1008729fc
// > ??> @ 0x100b9fe90
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:36:51 +0000
//
void __fastcall FRequestProfilePage::setupPageInfo(__int64 a1, __int64 a2, const char *a3)
{
const char *v3; // r14
size_t v4; // rax
size_t v5; // r15
char *v6; // r12
size_t v7; // rbx
char *v8; // rax
__int64 v9; // r14
unsigned __int64 v10; // rsi
char *v11; // rdx
unsigned __int64 v12; // rbx
bool v13; // zf
unsigned __int64 v14; // r12
char *v15; // r13
size_t v16; // r12
char *v17; // r15
char v18; // al
const char *v19; // r12
unsigned __int64 v20; // r14
size_t v21; // rbx
size_t v22; // rax
size_t v23; // r13
char *v24; // r15
__int64 v25; // r12
unsigned __int64 v26; // r14
size_t v27; // rbx
__int64 v28; // rax
__int64 v29; // r15
__int64 v30; // rbx
char *v31; // rax
unsigned __int64 v32; // rsi
char *v33; // rdx
unsigned __int64 v34; // rdi
__int64 v35; // rax
__int64 v36; // rax
__int64 v37; // rax
__int64 v38; // rax
__int64 CString; // rax
void *v40; // [rsp+0h] [rbp-90h]
_QWORD v42[2]; // [rsp+10h] [rbp-80h] BYREF
void *__p; // [rsp+20h] [rbp-70h]
const char *v44; // [rsp+28h] [rbp-68h]
unsigned __int64 v45; // [rsp+30h] [rbp-60h]
char __s[8]; // [rsp+38h] [rbp-58h] BYREF
size_t v47; // [rsp+40h] [rbp-50h]
void *v48; // [rsp+48h] [rbp-48h]
size_t __dst; // [rsp+50h] [rbp-40h] BYREF
unsigned __int64 v50; // [rsp+58h] [rbp-38h]
void *v51; // [rsp+60h] [rbp-30h]
if ( *(_BYTE *)(a1 + 880) || !sub_100871D20(a1, a3) )
return;
if ( (*(_BYTE *)a2 & 1) != 0 )
v3 = *(const char **)(a2 + 16);
else
v3 = (const char *)(a2 + 1);
v4 = strlen(v3);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v5 = v4;
if ( v4 >= 0x17 )
{
v7 = 26;
if ( (v4 | 7) != 0x17 )
v7 = (v4 | 7) + 1;
v6 = (char *)operator new(v7);
v51 = v6;
__dst = v7 + 1;
v50 = v5;
goto LABEL_13;
}
LOBYTE(__dst) = 2 * v4;
v6 = (char *)&__dst + 1;
if ( v4 )
LABEL_13:
memmove(v6, v3, v5);
v6[v5] = 0;
v40 = sub_1007FE900();
if ( (__dst & 1) != 0 )
{
v8 = (char *)v51;
v9 = -1;
v45 = v50;
if ( !v50 )
goto LABEL_24;
LABEL_18:
v10 = v45;
v11 = v8;
while ( *v11 != 58 )
{
++v11;
if ( !--v10 )
{
v11 = &v8[v45];
break;
}
}
v9 = -1;
if ( v11 != &v8[v45] )
v9 = v11 - v8;
goto LABEL_24;
}
v8 = (char *)&__dst + 1;
v9 = -1;
v45 = (unsigned __int8)__dst >> 1;
if ( (unsigned __int8)__dst >> 1 )
goto LABEL_18;
LABEL_24:
v12 = 0;
do
{
if ( (__dst & 1) != 0 )
{
v14 = v50;
if ( v50 < v12 )
LABEL_76:
sub_100056810();
v15 = (char *)v51;
}
else
{
v14 = (unsigned __int8)__dst >> 1;
v15 = (char *)&__dst + 1;
if ( v12 > v14 )
goto LABEL_76;
}
v16 = v14 - v12;
if ( v16 >= v9 - v12 )
v16 = v9 - v12;
if ( v16 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
if ( v16 >= 0x17 )
{
v44 = (const char *)v9;
v20 = v12;
v21 = (v16 | 7) + 1;
if ( (v16 | 7) == 0x17 )
v21 = 26;
v17 = (char *)operator new(v21);
v48 = v17;
*(_QWORD *)__s = v21 | 1;
v47 = v16;
v12 = v20;
v9 = (__int64)v44;
}
else
{
__s[0] = 2 * v16;
v17 = &__s[1];
if ( !v16 )
{
__s[1] = 0;
v18 = __s[0];
if ( (__s[0] & 1) == 0 )
goto LABEL_37;
goto LABEL_44;
}
}
memmove(v17, &v15[v12], v16);
v17[v16] = 0;
v18 = __s[0];
if ( (__s[0] & 1) == 0 )
{
LABEL_37:
if ( !v18 && v12 == v45 )
goto LABEL_57;
v19 = &__s[1];
goto LABEL_47;
}
LABEL_44:
if ( !v47 && v12 == v45 )
goto LABEL_57;
v19 = (const char *)v48;
LABEL_47:
v22 = strlen(v19);
if ( v22 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v23 = v22;
if ( v22 >= 0x17 )
{
v44 = v19;
v25 = v9;
v26 = v12;
v27 = (v22 | 7) + 1;
if ( (v22 | 7) == 0x17 )
v27 = 26;
v24 = (char *)operator new(v27);
__p = v24;
v42[0] = v27 | 1;
v42[1] = v23;
v12 = v26;
v9 = v25;
v19 = v44;
LABEL_54:
memmove(v24, v19, v23);
goto LABEL_55;
}
LOBYTE(v42[0]) = 2 * v22;
v24 = (char *)v42 + 1;
if ( v22 )
goto LABEL_54;
LABEL_55:
v24[v23] = 0;
v28 = sub_10088E600(v42);
sub_1007FEBF0((__int64)v40, v28);
if ( (v42[0] & 1) != 0 )
operator delete(__p);
LABEL_57:
v29 = v12;
v30 = -1;
if ( v9 == -1 )
goto LABEL_58;
if ( (__dst & 1) != 0 )
{
v31 = (char *)v51;
v32 = v50;
v29 = v9 + 1;
if ( v50 <= v9 + 1 )
goto LABEL_58;
}
else
{
v32 = (unsigned __int8)__dst >> 1;
v31 = (char *)&__dst + 1;
v29 = v9 + 1;
if ( v32 <= v9 + 1 )
goto LABEL_58;
}
v33 = &v31[v29];
v34 = v32 + ~v9;
while ( *v33 != 58 )
{
++v33;
if ( !--v34 )
{
v33 = &v31[v32];
break;
}
}
v30 = v33 - v31;
if ( v33 == &v31[v32] )
v30 = -1;
LABEL_58:
if ( (__s[0] & 1) != 0 )
operator delete(v48);
v13 = v9 == -1;
v9 = v30;
v12 = v29;
}
while ( !v13 );
if ( (__dst & 1) != 0 )
operator delete(v51);
if ( (unsigned int)sub_1007FEF90((__int64)v40) >= 3 )
{
v35 = sub_1007FEFE0((__int64)v40, 0);
*(_DWORD *)(a1 + 904) = cocos2d::CCString::intValue(v35);
v36 = sub_1007FEFE0((__int64)v40, 1u);
*(_DWORD *)(a1 + 908) = cocos2d::CCString::intValue(v36);
v37 = sub_1007FEFE0((__int64)v40, 2u);
*(_DWORD *)(a1 + 912) = cocos2d::CCString::intValue(v37);
v38 = sub_10088E820("%i to %i of %i", (char)v40);
CString = cocos2d::CCString::getCString(v38);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 760) + 928LL))(*(_QWORD *)(a1 + 760), CString);
sub_100870A20(a1);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 824) + 344LL))(
*(_QWORD *)(a1 + 824),
*(_DWORD *)(a1 + 908) != 0);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 816) + 344LL))(
*(_QWORD *)(a1 + 816),
*(_DWORD *)(a1 + 908) + *(_DWORD *)(a1 + 912) < *(_DWORD *)(a1 + 904));
}
}