//
// FRequestProfilePage::loadPage from 0x1402122f0 to 0x140212774 (1156 bytes)
//
// 11 xrefs:
// > FRequestProfilePage::init @ 0x140210180
// > FRequestProfilePage::onClearSearch @ 0x140210c69
// > FRequestProfilePage::onSelectMode @ 0x140211b1c
// > FRequestProfilePage::textChanged @ 0x1402128ee
// > FRequestProfilePage::textChanged @ 0x140212995
// > FRequestProfilePage::doSearch @ 0x140212a32
// > FRequestProfilePage::forceReloadRequests @ 0x140212d31
// > FRequestProfilePage::onNextPage @ 0x140212f78
// > FRequestProfilePage::onPrevPage @ 0x140212f88
// > ??> @ 0x14091b59c
// > ??> @ 0x14091b5a8
//
// 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:19 +0000
//
// Hidden C++ exception states: #wind=6
void __fastcall FRequestProfilePage::loadPage(__int64 a1, int a2)
{
const char *v4; // rax
int v5; // ecx
const char *v6; // rdx
cocos2d::CCString *v7; // rax
const char *CString; // rax
size_t v9; // rdi
size_t v10; // r8
__int64 v11; // rdx
unsigned __int64 v12; // r15
size_t v13; // rbp
void **v14; // r14
const void *v15; // rdx
void **v16; // rcx
size_t v17; // rsi
size_t v18; // r8
__int64 v19; // rdx
_QWORD *v20; // rsi
void **v21; // rdx
__int64 v22; // rdx
_QWORD *v23; // rbp
__int64 v24; // rcx
__int64 v25; // rdx
__int64 v26; // rcx
__int64 StoredOnlineLevels; // rbp
_QWORD *v28; // rsi
__int64 v29; // rcx
_BYTE *PageInfo; // rax
int v31; // ecx
void **v32; // rax
void *v33; // [rsp+30h] [rbp-88h]
void *v34; // [rsp+30h] [rbp-88h]
void *v35; // [rsp+30h] [rbp-88h]
void *v36; // [rsp+30h] [rbp-88h]
void *v37; // [rsp+30h] [rbp-88h]
__int128 v38; // [rsp+38h] [rbp-80h] BYREF
__int64 v39; // [rsp+48h] [rbp-70h]
__int64 v40; // [rsp+50h] [rbp-68h]
void *Buf1[2]; // [rsp+58h] [rbp-60h] BYREF
size_t Size; // [rsp+68h] [rbp-50h]
unsigned __int64 v43; // [rsp+70h] [rbp-48h]
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v33 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v33);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
}
v4 = (const char *)(a1 + 744);
v5 = *(unsigned __int8 *)(a1 + 704);
v6 = "fReq";
if ( *(_BYTE *)(a1 + 705) )
v6 = "fReqI";
if ( *(_QWORD *)(a1 + 760) )
{
if ( *(_QWORD *)(a1 + 768) > 0xFu )
v4 = *(const char **)v4;
v7 = cocos2d::CCString::createWithFormat("%sS_%i_%i_%s", v6, v5, a2, v4);
}
else
{
v7 = cocos2d::CCString::createWithFormat("%s_%i_%i", v6, v5, a2);
}
CString = cocos2d::CCString::getCString(v7);
*(_OWORD *)Buf1 = 0;
Size = 0;
v43 = 0;
v9 = -1;
v10 = -1;
do
++v10;
while ( CString[v10] );
sub_14003D230(Buf1, CString, v10);
v12 = v43;
v13 = Size;
v14 = (void **)Buf1[0];
if ( *(_QWORD *)(a1 + 728) )
{
v15 = (const void *)(a1 + 712);
if ( *(_QWORD *)(a1 + 736) > 0xFu )
v15 = *(const void **)(a1 + 712);
v16 = Buf1;
if ( v43 > 0xF )
v16 = (void **)Buf1[0];
v17 = *(_QWORD *)(a1 + 728);
v18 = Size;
if ( v17 < Size )
v18 = *(_QWORD *)(a1 + 728);
if ( memcmp(v16, v15, v18) || v13 < v17 || v13 > v17 )
{
FRequestProfilePage::untoggleAll(a1);
FRequestProfilePage::updateSelectUI(a1, v19);
}
}
v20 = (_QWORD *)(a1 + 712);
if ( (void **)(a1 + 712) != Buf1 )
{
v21 = Buf1;
if ( v12 > 0xF )
v21 = v14;
sub_1400405A0((void **)(a1 + 712), v21, v13);
v12 = v43;
v14 = (void **)Buf1[0];
}
LOBYTE(v11) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 808) + 336LL))(*(_QWORD *)(a1 + 808), v11);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 848) + 336LL))(*(_QWORD *)(a1 + 848), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 792) + 336LL))(*(_QWORD *)(a1 + 792), 0);
if ( a2 <= 0 )
v22 = 0;
else
LOBYTE(v22) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 840) + 336LL))(*(_QWORD *)(a1 + 840), v22);
v23 = (_QWORD *)(a1 + 712);
if ( *(_QWORD *)(a1 + 736) > 0xFu )
v23 = (_QWORD *)*v20;
v24 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v34 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v34);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v24 = *(_QWORD *)&qword_14090BFB0;
}
if ( GameLevelManager::getStoredOnlineLevels(v24, v23) )
LOBYTE(v25) = 1;
else
v25 = 0;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 832) + 336LL))(*(_QWORD *)(a1 + 832), v25);
if ( *(_QWORD *)(a1 + 736) > 0xFu )
v20 = (_QWORD *)*v20;
v26 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v35 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v35);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v26 = *(_QWORD *)&qword_14090BFB0;
}
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v26, v20);
if ( StoredOnlineLevels )
{
v28 = (_QWORD *)(a1 + 712);
if ( *(_QWORD *)(a1 + 736) > 0xFu )
v28 = (_QWORD *)*v28;
v29 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v36 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v36);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v29 = *(_QWORD *)&qword_14090BFB0;
}
PageInfo = (_BYTE *)GameLevelManager::getPageInfo(v29, v28);
v38 = 0;
v39 = 0;
v40 = 0;
do
++v9;
while ( PageInfo[v9] );
sub_14003D230(&v38, PageInfo, v9);
(*(void (__fastcall **)(__int64, __int128 *))(*(_QWORD *)(a1 + 688) + 16LL))(a1 + 688, &v38);
(**(void (__fastcall ***)(__int64, __int64))(a1 + 688))(a1 + 688, StoredOnlineLevels);
}
else
{
FRequestProfilePage::setupCommentsBrowser(a1, 0);
v31 = qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v37 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v37);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v31 = qword_14090BFB0;
}
GameLevelManager::getFriendRequests(
v31,
*(unsigned __int8 *)(a1 + 704),
a2,
*(_DWORD *)(a1 + 920),
a1 + 744,
*(_BYTE *)(a1 + 705));
}
*(_DWORD *)(a1 + 932) = a2;
if ( v12 > 0xF )
{
v32 = v14;
if ( v12 + 1 >= 0x1000 )
{
v14 = (void **)*(v14 - 1);
if ( (unsigned __int64)((char *)v32 - (char *)v14 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v14);
}
}