//
// InfoLayer::setupPageInfo from 0x100896280 to 0x100896754 (1236 bytes)
//
// 2 xrefs:
// > sub_100896830 @ 0x10089683c
// > ??> @ 0x100ba8160
//
// 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:37:07 +0000
//
char __fastcall InfoLayer::setupPageInfo(__int64 a1, __int64 a2, const char *a3)
{
unsigned int v3; // eax
const char *v4; // r14
size_t v5; // rax
size_t v6; // r15
char *v7; // rbx
size_t v8; // r12
char *v9; // rax
unsigned __int64 v10; // r15
__int64 v11; // r14
unsigned __int64 v12; // rsi
char *v13; // rdx
unsigned __int64 v14; // rcx
bool v15; // zf
unsigned __int64 v16; // r12
char *v17; // r13
size_t v18; // r12
char *v19; // rbx
char v20; // al
const char *v21; // r12
size_t v22; // r15
size_t v23; // rax
size_t v24; // r13
char *v25; // rbx
size_t v26; // r15
_QWORD *v27; // rax
__int64 v28; // rbx
char *v29; // rax
unsigned __int64 v30; // rsi
__int64 v31; // r8
char *v32; // rdx
unsigned __int64 v33; // rdi
__int64 v34; // rax
__int64 v35; // rbx
__int64 v36; // rax
__int64 v37; // rax
int v38; // ecx
int v39; // esi
int v40; // edx
char *v41; // rax
__int64 CString; // rax
unsigned __int64 v45; // [rsp+8h] [rbp-88h]
void *v46; // [rsp+10h] [rbp-80h]
_QWORD v47[2]; // [rsp+18h] [rbp-78h] BYREF
void *__p; // [rsp+28h] [rbp-68h]
char __s[8]; // [rsp+30h] [rbp-60h] BYREF
size_t v50; // [rsp+38h] [rbp-58h]
void *v51; // [rsp+40h] [rbp-50h]
__int64 v52; // [rsp+48h] [rbp-48h]
size_t __dst; // [rsp+50h] [rbp-40h] BYREF
unsigned __int64 v54; // [rsp+58h] [rbp-38h]
void *v55; // [rsp+60h] [rbp-30h]
LOBYTE(v3) = sub_100895E80(a1, a3);
if ( !(_BYTE)v3 )
return v3;
if ( (*(_BYTE *)a2 & 1) != 0 )
v4 = *(const char **)(a2 + 16);
else
v4 = (const char *)(a2 + 1);
v5 = strlen(v4);
if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v6 = v5;
if ( v5 >= 0x17 )
{
v8 = 26;
if ( (v5 | 7) != 0x17 )
v8 = (v5 | 7) + 1;
v7 = (char *)operator new(v8);
v55 = v7;
__dst = v8 + 1;
v54 = v6;
goto LABEL_12;
}
LOBYTE(__dst) = 2 * v5;
v7 = (char *)&__dst + 1;
if ( v5 )
LABEL_12:
memmove(v7, v4, v6);
v7[v6] = 0;
v46 = sub_1007FE900();
if ( (__dst & 1) != 0 )
{
v9 = (char *)v55;
v10 = v54;
v11 = -1;
if ( !v54 )
goto LABEL_23;
LABEL_17:
v12 = v10;
v13 = v9;
while ( *v13 != 58 )
{
++v13;
if ( !--v12 )
{
v13 = &v9[v10];
break;
}
}
v11 = -1;
if ( v13 != &v9[v10] )
v11 = v13 - v9;
goto LABEL_23;
}
v10 = (unsigned __int8)__dst >> 1;
v9 = (char *)&__dst + 1;
v11 = -1;
if ( (unsigned __int8)__dst >> 1 )
goto LABEL_17;
LABEL_23:
v14 = 0;
v45 = v10;
do
{
if ( (__dst & 1) != 0 )
{
v16 = v54;
if ( v54 < v14 )
LABEL_77:
sub_100056810();
v17 = (char *)v55;
}
else
{
v16 = (unsigned __int8)__dst >> 1;
v17 = (char *)&__dst + 1;
if ( v14 > v16 )
goto LABEL_77;
}
v18 = v16 - v14;
if ( v18 >= v11 - v14 )
v18 = v11 - v14;
if ( v18 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v52 = v14;
if ( v18 >= 0x17 )
{
v22 = (v18 | 7) + 1;
if ( (v18 | 7) == 0x17 )
v22 = 26;
v19 = (char *)operator new(v22);
v51 = v19;
*(_QWORD *)__s = v22 | 1;
v50 = v18;
v10 = v45;
}
else
{
__s[0] = 2 * v18;
v19 = &__s[1];
if ( !v18 )
{
__s[1] = 0;
v20 = __s[0];
if ( (__s[0] & 1) == 0 )
goto LABEL_36;
goto LABEL_43;
}
}
memmove(v19, &v17[v52], v18);
v19[v18] = 0;
v20 = __s[0];
if ( (__s[0] & 1) == 0 )
{
LABEL_36:
if ( !v20 && v52 == v10 )
goto LABEL_56;
v21 = &__s[1];
goto LABEL_46;
}
LABEL_43:
if ( !v50 && v52 == v10 )
goto LABEL_56;
v21 = (const char *)v51;
LABEL_46:
v23 = strlen(v21);
if ( v23 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v24 = v23;
if ( v23 >= 0x17 )
{
v26 = (v23 | 7) + 1;
if ( (v23 | 7) == 0x17 )
v26 = 26;
v25 = (char *)operator new(v26);
__p = v25;
v47[0] = v26 | 1;
v47[1] = v24;
v10 = v45;
LABEL_53:
memmove(v25, v21, v24);
goto LABEL_54;
}
LOBYTE(v47[0]) = 2 * v23;
v25 = (char *)v47 + 1;
if ( v23 )
goto LABEL_53;
LABEL_54:
v25[v24] = 0;
v27 = sub_10088E600((__int64)v47);
sub_1007FEBF0((__int64)v46, (__int64)v27);
if ( (v47[0] & 1) != 0 )
operator delete(__p);
LABEL_56:
v28 = -1;
if ( v11 == -1 )
goto LABEL_57;
if ( (__dst & 1) != 0 )
{
v29 = (char *)v55;
v30 = v54;
v31 = v11 + 1;
v52 = v11 + 1;
if ( v54 <= v11 + 1 )
goto LABEL_57;
}
else
{
v30 = (unsigned __int8)__dst >> 1;
v29 = (char *)&__dst + 1;
v31 = v11 + 1;
v52 = v11 + 1;
if ( v30 <= v11 + 1 )
goto LABEL_57;
}
v32 = &v29[v31];
v33 = v30 + ~v11;
while ( *v32 != 58 )
{
++v32;
if ( !--v33 )
{
v32 = &v29[v30];
break;
}
}
v28 = v32 - v29;
if ( v32 == &v29[v30] )
v28 = -1;
LABEL_57:
if ( (__s[0] & 1) != 0 )
operator delete(v51);
v15 = v11 == -1;
v11 = v28;
v14 = v52;
}
while ( !v15 );
if ( (__dst & 1) != 0 )
operator delete(v55);
v3 = sub_1007FEF90((__int64)v46);
if ( v3 >= 3 )
{
v34 = sub_1007FEFE0((__int64)v46, 0);
v35 = a1;
*(_DWORD *)(a1 + 856) = cocos2d::CCString::intValue(v34);
v36 = sub_1007FEFE0((__int64)v46, 1u);
*(_DWORD *)(a1 + 860) = cocos2d::CCString::intValue(v36);
v37 = sub_1007FEFE0((__int64)v46, 2u);
*(_DWORD *)(a1 + 864) = cocos2d::CCString::intValue(v37);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(v35 + 792) + 344LL))(
*(_QWORD *)(v35 + 792),
*(_DWORD *)(v35 + 860) != 0);
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(v35 + 784) + 344LL))(
*(_QWORD *)(v35 + 784),
*(_DWORD *)(v35 + 860) + *(_DWORD *)(v35 + 864) < *(_DWORD *)(v35 + 856));
v38 = *(_DWORD *)(a1 + 856);
v39 = *(_DWORD *)(a1 + 860);
v40 = v39 + *(_DWORD *)(a1 + 864);
if ( v40 >= v38 )
v40 = *(_DWORD *)(a1 + 856);
v41 = sub_10088E820("%i to %i of %i", v39 + 1, v40, v38);
CString = cocos2d::CCString::getCString((__int64)v41);
LOBYTE(v3) = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 760) + 928LL))(
*(_QWORD *)(a1 + 760),
CString);
}
return v3;
}