//
// FRequestProfilePage::setupPageInfo from 0x140212d40 to 0x140212f65 (549 bytes)
//
// 2 xrefs:
// > ??> @ 0x140756468
// > ??> @ 0x14091b5e4
//
// 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:28:20 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall FRequestProfilePage::setupPageInfo(__int64 a1, _QWORD *a2, _BYTE *a3)
{
__int64 v5; // rsi
_BYTE *v6; // rdx
size_t v7; // r8
cocos2d::CCArray *v8; // rbp
void *v9; // r8
cocos2d::CCString *v10; // rax
cocos2d::CCString *v11; // rax
cocos2d::CCString *v12; // rax
int v13; // eax
int v14; // r9d
int v15; // edx
int v16; // r8d
cocos2d::CCString *v17; // rax
const char *CString; // rax
__int64 v19; // rdx
__int64 v20; // rdx
__int64 v21; // rdx
void *Block[2]; // [rsp+38h] [rbp-40h] BYREF
__m128i si128; // [rsp+48h] [rbp-30h]
v5 = a1 - 688;
if ( !*(_BYTE *)(a1 - 688 + 896) && FRequestProfilePage::isCorrect((_QWORD *)(a1 - 688), a3) )
{
v6 = a2;
if ( a2[3] > 0xFu )
v6 = (_BYTE *)*a2;
*(_OWORD *)Block = 0;
si128 = 0;
v7 = -1;
do
++v7;
while ( v6[v7] );
sub_14003D230(Block, v6, v7);
v8 = sub_14020EFC0((__int64 *)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v9 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
if ( cocos2d::CCArray::count(v8) >= 3 )
{
v10 = cocos2d::CCArray::objectAtIndex(v8, 0);
*(_DWORD *)(a1 + 232) = cocos2d::CCString::intValue(v10);
v11 = cocos2d::CCArray::objectAtIndex(v8, 1u);
*(_DWORD *)(a1 + 236) = cocos2d::CCString::intValue(v11);
v12 = cocos2d::CCArray::objectAtIndex(v8, 2u);
v13 = cocos2d::CCString::intValue(v12);
*(_DWORD *)(a1 + 240) = v13;
v14 = *(_DWORD *)(v5 + 920);
v15 = *(_DWORD *)(v5 + 924);
v16 = v15 + v13;
if ( v15 + v13 >= v14 )
v16 = *(_DWORD *)(v5 + 920);
v17 = cocos2d::CCString::createWithFormat("%i to %i of %i", v15 + 1, v16, v14);
CString = cocos2d::CCString::getCString(v17);
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(v5 + 776) + 360LL))(
*(_QWORD *)(v5 + 776) + 360LL,
CString);
FRequestProfilePage::updateSelectUI(v5, v19);
if ( *(_DWORD *)(a1 + 236) )
LOBYTE(v20) = 1;
else
v20 = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 152) + 336LL))(*(_QWORD *)(a1 + 152), v20);
if ( *(_DWORD *)(a1 + 236) + *(_DWORD *)(a1 + 240) < *(_DWORD *)(a1 + 232) )
LOBYTE(v21) = 1;
else
v21 = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 144) + 336LL))(*(_QWORD *)(a1 + 144), v21);
}
}
sub_14003D310((__int64)a2);
}