//
// InfoLayer::setupPageInfo from 0x1403d1ff0 to 0x1403d21f6 (518 bytes)
//
// 2 xrefs:
// > ??> @ 0x140785950
// > ??> @ 0x14092474c
//
// 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 11:31:35 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall InfoLayer::setupPageInfo(__int64 a1, _QWORD *a2, _BYTE *a3)
{
_BYTE *v5; // rdx
size_t v6; // r8
cocos2d::CCArray *v7; // rsi
void *v8; // r8
cocos2d::CCString *v9; // rax
cocos2d::CCString *v10; // rax
cocos2d::CCString *v11; // rax
__int64 v12; // rdx
__int64 v13; // rdx
int v14; // r9d
int v15; // edx
int v16; // r8d
cocos2d::CCString *v17; // rax
const char *CString; // rax
void *Block[2]; // [rsp+38h] [rbp-40h] BYREF
__m128i si128; // [rsp+48h] [rbp-30h]
if ( InfoLayer::isCorrect((_QWORD *)(a1 - 664), a3) )
{
v5 = a2;
if ( a2[3] > 0xFu )
v5 = (_BYTE *)*a2;
*(_OWORD *)Block = 0;
si128 = 0;
v6 = -1;
do
++v6;
while ( v5[v6] );
sub_14003D230(Block, v5, v6);
v7 = sub_14020EFC0((__int64 *)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v8 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
if ( cocos2d::CCArray::count(v7) >= 3 )
{
v9 = cocos2d::CCArray::objectAtIndex(v7, 0);
*(_DWORD *)(a1 + 200) = cocos2d::CCString::intValue(v9);
v10 = cocos2d::CCArray::objectAtIndex(v7, 1u);
*(_DWORD *)(a1 + 204) = cocos2d::CCString::intValue(v10);
v11 = cocos2d::CCArray::objectAtIndex(v7, 2u);
*(_DWORD *)(a1 + 208) = cocos2d::CCString::intValue(v11);
if ( *(_DWORD *)(a1 + 204) )
LOBYTE(v12) = 1;
else
v12 = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 136) + 336LL))(*(_QWORD *)(a1 + 136), v12);
if ( *(_DWORD *)(a1 + 204) + *(_DWORD *)(a1 + 208) < *(_DWORD *)(a1 + 200) )
LOBYTE(v13) = 1;
else
v13 = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 128) + 336LL))(*(_QWORD *)(a1 + 128), v13);
v14 = *(_DWORD *)(a1 + 200);
v15 = *(_DWORD *)(a1 + 204);
v16 = v15 + *(_DWORD *)(a1 + 208);
if ( v16 >= v14 )
v16 = *(_DWORD *)(a1 + 200);
v17 = cocos2d::CCString::createWithFormat("%i to %i of %i", v15 + 1, v16, v14);
CString = cocos2d::CCString::getCString(v17);
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 104) + 360LL))(
*(_QWORD *)(a1 + 104) + 360LL,
CString);
}
}
sub_14003D310((__int64)a2);
}