//
// LevelBrowserLayer::loadPage from 0x1402ca720 to 0x1402cb8ad (4493 bytes)
//
// 15 xrefs:
// > LevelBrowserLayer::init @ 0x1402c9fe8
// > LevelBrowserLayer::onGoToLastPage @ 0x1402cc88b
// > LevelBrowserLayer::setIDPopupClosed @ 0x1402ccaf7
// > LevelBrowserLayer::setIDPopupClosed @ 0x1402ccc32
// > LevelBrowserLayer::onNextPage @ 0x1402ccded
// > LevelBrowserLayer::onPrevPage @ 0x1402cce73
// > LevelBrowserLayer::shareCommentClosed @ 0x1402ce210
// > LevelBrowserLayer::onRefresh @ 0x1402ceb06
// > LevelBrowserLayer::onClearSearch @ 0x1402cec07
// > LevelBrowserLayer::setTextPopupClosed @ 0x1402cef2d
// > LevelBrowserLayer::FLAlert_Clicked @ 0x1402cf868
// > LevelBrowserLayer::onEnter @ 0x1402cfcd4
// > LevelListLayer::init @ 0x14030504a
// > LevelListLayer::loadLevelsFinished @ 0x140306af9
// > ??> @ 0x1406d2c84
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=20
void LevelBrowserLayer::loadPage(LevelBrowserLayer *a1, GJSearchObject *a2)
{
CCMenuItemToggler *m_allObjectsToggler; // rcx
GJSearchObject *m_searchObject; // rcx
GJSearchObject *v6; // rcx
const char *Key; // rax
size_t v8; // r15
size_t v9; // r8
_BOOL8 v10; // rdx
_BOOL8 v11; // rdx
CCMenuItemSpriteExtra *m_refreshBtn; // rcx
CCMenuItemSpriteExtra *m_cancelSearchBtn; // rcx
GJSearchObject *v14; // r13
int m_searchType; // r14d
__int64 v16; // rdi
const char *v17; // rbx
const char *v18; // rax
const char *SearchKey; // rbx
GameLevelManager *v20; // rcx
_BOOL8 v21; // rdx
const char *v22; // rbx
GameLevelManager *v23; // rcx
cocos2d::CCArray *StoredOnlineLevels; // rdi
const char *v25; // rbx
GameLevelManager *v26; // rcx
const char *PageInfo; // rax
size_t v28; // r8
const char *v29; // r8
const char *v30; // r8
GameLevelManager *v31; // rcx
cocos2d::CCLabelBMFont *m_countText; // rcx
__int128 *v33; // rdx
size_t v34; // r8
__int64 v35; // rax
void **v36; // rdx
__int128 *v37; // rdx
__int64 v38; // rax
void **v39; // rdx
_BOOL8 v40; // rdx
GameLevelManager *v41; // rcx
cocos2d::CCArray *SavedLevels; // rax
__int64 v43; // rbx
cocos2d::CCArray *ItemsMatchingSearch; // rdi
GameLevelManager *v45; // rcx
bool v46; // dl
int v47; // ebx
LocalLevelManager *v48; // rax
__int64 v49; // rcx
LocalLevelManager *v50; // r13
cocos2d::CCArray *m_localLists; // rax
cocos2d::ccArray *v52; // rbx
__int64 v53; // rax
struct cocos2d::CCObject **v54; // rbx
struct cocos2d::CCObject **v55; // r13
struct cocos2d::CCObject *v56; // rdx
int m_folder; // ebx
LocalLevelManager *v58; // rax
__int64 v59; // rcx
LocalLevelManager *v60; // r13
cocos2d::CCArray *m_localLevels; // rax
cocos2d::ccArray *data; // rbx
__int64 num; // rax
struct cocos2d::CCObject **arr; // rbx
struct cocos2d::CCObject **v65; // r13
struct cocos2d::CCObject *v66; // rdx
bool v67; // bl
CCMenuItemSpriteExtra *v68; // rcx
_BOOL8 v69; // rdx
cocos2d::CCArray *v70; // r13
GameManager *v71; // rcx
int v72; // ebx
signed int v73; // r12d
int v74; // eax
unsigned int v75; // ebx
struct cocos2d::CCObject *v76; // rax
unsigned int v77; // ebx
_BOOL8 v78; // rdx
cocos2d::CCString *v79; // rax
const char *CString; // rax
size_t v81; // r8
const char *v82; // r8
const char *v83; // r8
_BOOL8 v84; // rdx
cocos2d::CCLabelBMFont *v85; // rcx
cocos2d::CCDirector *v86; // rax
const struct cocos2d::CCPoint *v87; // rax
char *v88; // rdi
float v89; // xmm0_4
__int64 v90; // rbx
const struct cocos2d::CCPoint *v91; // rax
const struct cocos2d::CCPoint *v92; // rax
float v93; // xmm0_4
const struct cocos2d::CCPoint *v94; // rax
__int64 v95; // rax
void *v96; // [rsp+B8h] [rbp-80h]
void *v97; // [rsp+B8h] [rbp-80h]
void *v98; // [rsp+B8h] [rbp-80h]
void *v99; // [rsp+B8h] [rbp-80h]
void *v100; // [rsp+B8h] [rbp-80h]
void *v101; // [rsp+B8h] [rbp-80h]
void *v102; // [rsp+B8h] [rbp-80h]
void *v103; // [rsp+B8h] [rbp-80h]
void *v104; // [rsp+B8h] [rbp-80h]
void *v105; // [rsp+C0h] [rbp-78h]
float v106; // [rsp+C0h] [rbp-78h]
int v107; // [rsp+C8h] [rbp-70h]
int v108; // [rsp+C8h] [rbp-70h]
int v109; // [rsp+C8h] [rbp-70h]
__int128 v110; // [rsp+D0h] [rbp-68h] BYREF
__int64 v111; // [rsp+E0h] [rbp-58h]
__int64 v112; // [rsp+E8h] [rbp-50h]
__int64 v113; // [rsp+F0h] [rbp-48h]
int v114; // [rsp+F8h] [rbp-40h]
void *Src[2]; // [rsp+100h] [rbp-38h] BYREF
size_t Size; // [rsp+110h] [rbp-28h]
unsigned __int64 v117; // [rsp+118h] [rbp-20h]
void *v118[2]; // [rsp+120h] [rbp-18h] BYREF
size_t v119; // [rsp+130h] [rbp-8h]
unsigned __int64 v120; // [rsp+138h] [rbp+0h]
char v121[32]; // [rsp+140h] [rbp+8h] BYREF
__int128 v122; // [rsp+160h] [rbp+28h] BYREF
__int64 v123; // [rsp+170h] [rbp+38h]
__int64 v124; // [rsp+178h] [rbp+40h]
__int128 v125; // [rsp+180h] [rbp+48h] BYREF
__int64 v126; // [rsp+190h] [rbp+58h]
unsigned __int64 v127; // [rsp+198h] [rbp+60h]
m_allObjectsToggler = a1->m_allObjectsToggler;
if ( m_allObjectsToggler )
{
a1->m_allSelected = 0;
CCMenuItemToggler::toggle(m_allObjectsToggler, 0);
}
m_searchObject = a1->m_searchObject;
if ( m_searchObject != a2 )
{
if ( a2 )
cocos2d::CCObject::retain(a2);
v6 = a1->m_searchObject;
if ( v6 )
cocos2d::CCObject::release(v6);
a1->m_searchObject = a2;
m_searchObject = a2;
}
Key = GJSearchObject::getKey(m_searchObject);
v125 = 0;
v126 = 0;
v127 = 0;
v8 = -1;
v9 = -1;
do
++v9;
while ( Key[v9] );
sub_14003A930(&v125, Key, v9);
LOBYTE(v10) = 1;
a1->m_circle->setVisible(a1->m_circle, v10);
m_refreshBtn = a1->m_refreshBtn;
if ( m_refreshBtn )
m_refreshBtn->setVisible(m_refreshBtn, 0);
m_cancelSearchBtn = a1->m_cancelSearchBtn;
if ( m_cancelSearchBtn )
m_cancelSearchBtn->setVisible(m_cancelSearchBtn, 0);
if ( !a1->m_unk2 )
{
if ( a1->m_searchObject->m_page <= 0 )
v11 = 0;
else
LOBYTE(v11) = 1;
a1->m_leftArrow->setVisible(a1->m_leftArrow, v11);
}
v14 = a1->m_searchObject;
m_searchType = v14->m_searchType;
v114 = m_searchType;
switch ( m_searchType )
{
case 'c':
v45 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v103 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v103);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v45 = (GameLevelManager *)qword_1406C2EC0;
}
v46 = 0;
goto LABEL_122;
case 'b':
m_folder = v14->m_folder;
v108 = m_folder;
v58 = LocalLevelManager::sharedState();
v60 = v58;
if ( m_folder > 0 )
{
ItemsMatchingSearch = (cocos2d::CCArray *)cocos2d::CCArray::create(v59);
m_localLevels = v60->m_localLevels;
if ( m_localLevels )
{
data = m_localLevels->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
v65 = &arr[num - 1];
if ( arr <= v65 )
{
do
{
v66 = *arr;
if ( !*arr )
break;
if ( v66[15].m_uIndexInArray == v108 )
cocos2d::CCArray::addObject(ItemsMatchingSearch, v66);
++arr;
}
while ( arr <= v65 );
m_searchType = v114;
}
}
}
}
else
{
ItemsMatchingSearch = v58->m_localLevels;
}
goto LABEL_124;
case 'f':
v47 = v14->m_folder;
v107 = v47;
v48 = LocalLevelManager::sharedState();
v50 = v48;
if ( v47 > 0 )
{
ItemsMatchingSearch = (cocos2d::CCArray *)cocos2d::CCArray::create(v49);
m_localLists = v50->m_localLists;
if ( m_localLists )
{
v52 = m_localLists->data;
v53 = v52->num;
if ( (_DWORD)v53 )
{
v54 = v52->arr;
v55 = &v54[v53 - 1];
if ( v54 <= v55 )
{
do
{
v56 = *v54;
if ( !*v54 )
break;
if ( v56[6].m_uIndexInArray == v107 )
cocos2d::CCArray::addObject(ItemsMatchingSearch, v56);
++v54;
}
while ( v54 <= v55 );
v8 = -1;
}
}
}
}
else
{
ItemsMatchingSearch = v48->m_localLists;
}
goto LABEL_124;
case 'd':
v45 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v102 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v102);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v45 = (GameLevelManager *)qword_1406C2EC0;
}
v46 = 1;
LABEL_122:
SavedLevels = GameLevelManager::getSavedLevels(v45, v46, a2->m_folder);
LABEL_123:
ItemsMatchingSearch = SavedLevels;
goto LABEL_124;
}
if ( m_searchType != 101 )
{
if ( m_searchType != 103 )
{
if ( !a1->m_unk2 )
{
v16 = sub_14003BDB0((__int64)&v122, (__int64)&v14->m_length);
v17 = (const char *)sub_14003BDB0((__int64)&v110, (__int64)&v14->m_difficulty);
v18 = (const char *)sub_14003BDB0((__int64)v121, (__int64)&v14->m_searchQuery);
SearchKey = GJSearchObject::getSearchKey(
v14->m_searchType,
v18,
v17,
v16,
v14->m_page + 1,
v14->m_starFilter,
v14->m_uncompletedFilter,
v14->m_featuredFilter,
v14->m_songID,
v14->m_originalFilter,
v14->m_twoPlayerFilter,
v14->m_customSongFilter,
v14->m_songFilter,
v14->m_noStarFilter,
v14->m_coinsFilter,
v14->m_epicFilter,
v14->m_legendaryFilter,
v14->m_mythicFilter,
v14->m_completedFilter,
v14->m_demonFilter,
v14->m_folder,
v14->m_searchMode);
v20 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v96 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v96);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v20 = (GameLevelManager *)qword_1406C2EC0;
}
if ( GameLevelManager::getStoredOnlineLevels(v20, SearchKey) )
LOBYTE(v21) = 1;
else
v21 = 0;
a1->m_rightArrow->setVisible(a1->m_rightArrow, v21);
}
v22 = (const char *)&v125;
if ( v127 > 0xF )
v22 = (const char *)v125;
v23 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v97 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v97);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v23 = (GameLevelManager *)qword_1406C2EC0;
}
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v23, v22);
if ( StoredOnlineLevels )
{
v25 = (const char *)&v125;
if ( v127 > 0xF )
v25 = (const char *)v125;
v26 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v98 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v98);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v26 = (GameLevelManager *)qword_1406C2EC0;
}
PageInfo = GameLevelManager::getPageInfo(v26, v25);
v122 = 0;
v123 = 0;
v124 = 0;
v28 = -1;
do
++v28;
while ( PageInfo[v28] );
sub_14003A930(&v122, PageInfo, v28);
v29 = (const char *)&v125;
if ( v127 > 0xF )
v29 = (const char *)v125;
a1->setupPageInfo(&a1->LevelManagerDelegate, (std::string *)&v122, v29);
v30 = (const char *)&v125;
if ( v127 > 0xF )
v30 = (const char *)v125;
a1->loadLevelsFinished(&a1->LevelManagerDelegate, StoredOnlineLevels, v30, m_searchType);
}
else
{
if ( !a1->m_cached )
LevelBrowserLayer::setupLevelBrowser(a1, nullptr);
v31 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v99 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v99);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v31 = (GameLevelManager *)qword_1406C2EC0;
}
v31->m_levelManagerDelegate = &a1->LevelManagerDelegate;
if ( m_searchType == 14 )
{
GameLevelManager::getUsers(v31, a2);
}
else if ( m_searchType == 9 )
{
GameLevelManager::getMapPacks(v31, a2);
}
else if ( a1->m_searchObject->m_searchMode == 1 )
{
GameLevelManager::getLevelLists(v31, a2);
}
else
{
GameLevelManager::getOnlineLevels(v31, a2);
}
m_countText = a1->m_countText;
if ( m_countText )
m_countText->setString(&m_countText->cocos2d::CCLabelProtocol, " ");
}
goto LABEL_62;
}
v41 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v100 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v100);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v41 = (GameLevelManager *)qword_1406C2EC0;
}
SavedLevels = GameLevelManager::getSavedLevelLists(v41, a2->m_folder);
goto LABEL_123;
}
v43 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v101 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v101);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v43 = qword_1406C2EC0;
}
ItemsMatchingSearch = (cocos2d::CCArray *)cocos2d::CCArray::create(m_cancelSearchBtn);
cocos2d::CCArray::addObjectsFromArray(ItemsMatchingSearch, *(struct cocos2d::CCArray **)(v43 + 952));
LABEL_124:
sub_14003BDB0((__int64)&v122, (__int64)&a1->m_searchObject->m_searchQuery);
v67 = v123 != 0;
sub_14003A830((__int64)&v122);
if ( v67 )
{
sub_14003BDB0((__int64)&v122, (__int64)&a2->m_searchQuery);
ItemsMatchingSearch = (cocos2d::CCArray *)LevelBrowserLayer::getItemsMatchingSearch(a1, ItemsMatchingSearch, &v122);
v68 = a1->m_cancelSearchBtn;
if ( v68 )
{
LOBYTE(v69) = 1;
v68->setVisible(v68, v69);
}
}
v70 = (cocos2d::CCArray *)cocos2d::CCArray::create(v68);
LODWORD(v113) = a1->m_searchObject->m_page;
v71 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v105 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v105);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v71 = (GameManager *)qword_1406C2ED8;
}
v72 = 10;
if ( GameManager::getGameVariable(v71, "0093") )
v72 = 20;
v109 = v72;
v106 = COERCE_FLOAT(cocos2d::CCArray::count(ItemsMatchingSearch));
v73 = v113 * v72;
v74 = cocos2d::CCArray::count(ItemsMatchingSearch);
a1->m_lastPage = (int)(float)(ceilf((float)v74 / (float)v72) - 1.0);
if ( ItemsMatchingSearch )
{
if ( cocos2d::CCArray::count(ItemsMatchingSearch) )
{
v75 = v73;
if ( v73 < v73 + v109 )
{
do
{
if ( v75 > cocos2d::CCArray::count(ItemsMatchingSearch) - 1 )
break;
v76 = cocos2d::CCArray::objectAtIndex(ItemsMatchingSearch, v75);
cocos2d::CCArray::addObject(v70, v76);
++v75;
}
while ( (int)v75 < v73 + v109 );
m_searchType = v114;
}
}
}
if ( !a1->m_unk2 )
{
v77 = v73 + cocos2d::CCArray::count(v70);
if ( v77 >= cocos2d::CCArray::count(ItemsMatchingSearch) )
v78 = 0;
else
LOBYTE(v78) = 1;
a1->m_rightArrow->setVisible(a1->m_rightArrow, v78);
}
if ( !qword_1406C2EC0 )
{
v104 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v104);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
}
v79 = cocos2d::CCString::createWithFormat("%i%s%i%s%i", v106, ":", v73, ":", v109);
CString = cocos2d::CCString::getCString(v79);
v122 = 0;
v123 = 0;
v124 = 0;
v81 = -1;
do
++v81;
while ( CString[v81] );
sub_14003A930(&v122, CString, v81);
v82 = (const char *)&v125;
if ( v127 > 0xF )
v82 = (const char *)v125;
a1->setupPageInfo(&a1->LevelManagerDelegate, (std::string *)&v122, v82);
v83 = (const char *)&v125;
if ( v127 > 0xF )
v83 = (const char *)v125;
a1->loadLevelsFinished(&a1->LevelManagerDelegate, v70, v83, m_searchType);
v85 = a1->m_countText;
if ( a1->m_itemCount )
{
if ( v85 )
{
LOBYTE(v84) = 1;
v85->setVisible(v85, v84);
}
}
else
{
if ( v85 )
v85->setVisible(v85, 0);
v86 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v85);
cocos2d::CCDirector::getWinSize(v86);
switch ( m_searchType )
{
case 'c':
v122 = 0;
v123 = 1;
v124 = 15;
LOWORD(v122) = (unsigned __int8)asc_140518984[0];
cocos2d::CCPoint::CCPoint(0.0, 0.5);
v88 = TextArea::create((__int64)&v122, &qword_14052A4D8, 1.0, 600.0, v87, 1101004800, 0);
*((_DWORD *)v88 + 164) = 1109393408;
v110 = 0;
*(_QWORD *)&v110 = sub_14003AA10(0x40u);
v111 = 55;
v112 = 63;
strcpy((char *)v110, "You have not downloaded any levels yet!");
v89 = 2.1127642e-19;
TextArea::setString((TextArea *)v88, (__int64)&v110);
v90 = *(_QWORD *)v88;
break;
case 'g':
v122 = 0;
v123 = 1;
v124 = 15;
LOWORD(v122) = (unsigned __int8)asc_140518984[0];
cocos2d::CCPoint::CCPoint(0.0, 0.5);
v88 = TextArea::create((__int64)&v122, &qword_14052A4D8, 1.0, 600.0, v91, 1101004800, 0);
*((_DWORD *)v88 + 164) = 1109393408;
v110 = 0;
*(_QWORD *)&v110 = sub_14003AA10(0x40u);
v111 = 53;
v112 = 63;
strcpy((char *)v110, "You have not favorited\nany lists yet!");
v89 = 0.0097945761;
TextArea::setString((TextArea *)v88, (__int64)&v110);
v90 = *(_QWORD *)v88;
break;
case 'd':
v122 = 0;
v123 = 1;
v124 = 15;
LOWORD(v122) = (unsigned __int8)asc_140518984[0];
cocos2d::CCPoint::CCPoint(0.0, 0.5);
v88 = TextArea::create((__int64)&v122, &qword_14052A4D8, 1.0, 600.0, v92, 1101004800, 0);
*((_DWORD *)v88 + 164) = 1109393408;
v110 = 0;
*(_QWORD *)&v110 = sub_14003AA10(0x40u);
v111 = 52;
v112 = 63;
strcpy((char *)v110, "Levels marked as Favorite will show up here!");
v89 = 1.8672309e25;
TextArea::setString((TextArea *)v88, (__int64)&v110);
v90 = *(_QWORD *)v88;
break;
default:
switch ( m_searchType )
{
case 'b':
v110 = 0;
*(_QWORD *)&v110 = sub_14003AA10(0x30u);
v111 = 42;
v112 = 47;
strcpy((char *)v110, "Tap New to create a level!");
v93 = 7.2723316e22;
break;
case 'f':
v110 = 0;
*(_QWORD *)&v110 = sub_14003AA10(0x30u);
v111 = 41;
v112 = 47;
strcpy((char *)v110, "Tap New to create a list!");
v93 = 7.714028e31;
break;
case 'e':
v110 = 0;
*(_QWORD *)&v110 = sub_14003AA10(0x30u);
v111 = 45;
v112 = 47;
strcpy((char *)v110, "Tap New to create a Template!");
v93 = 2.9388178e29;
break;
default:
goto LABEL_62;
}
cocos2d::CCPoint::CCPoint(v93, 0.5);
v89 = 20.0;
v88 = TextArea::create((__int64)&v110, &qword_14052A4D8, 1.0, 600.0, v94, 1101004800, 0);
v90 = *(_QWORD *)v88;
break;
}
cocos2d::CCPoint::CCPoint(v89, v106 * 0.5);
(*(void (__fastcall **)(char *, __int64))(v90 + 184))(v88, v95);
(*(void (__fastcall **)(char *))(*(_QWORD *)v88 + 160LL))(v88);
a1->addChild_1(a1, (cocos2d::CCNode *)v88);
}
LABEL_62:
if ( !a1->m_isOverlay )
{
v33 = &v125;
if ( v127 > 0xF )
v33 = (__int128 *)v125;
*(_OWORD *)Src = 0;
Size = 0;
v117 = 0;
v34 = -1;
do
++v34;
while ( *((_BYTE *)v33 + v34) );
sub_14003A930(Src, v33, v34);
v35 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v113 = (__int64)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v113);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v35 = qword_1406C2EC0;
}
if ( (void **)(v35 + 640) != Src )
{
v36 = Src;
if ( v117 > 0xF )
v36 = (void **)Src[0];
sub_14003CCE0((void **)(v35 + 640), v36, Size);
}
sub_14003A830((__int64)Src);
}
if ( a1->m_searchObject->m_searchType == (Sends|Downloaded) )
{
v37 = &v125;
if ( v127 > 0xF )
v37 = (__int128 *)v125;
*(_OWORD *)v118 = 0;
v119 = 0;
v120 = 0;
do
++v8;
while ( *((_BYTE *)v37 + v8) );
sub_14003A930(v118, v37, v8);
v38 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v113 = (__int64)operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v113);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v38 = qword_1406C2EC0;
}
if ( (void **)(v38 + 672) != v118 )
{
v39 = v118;
if ( v120 > 0xF )
v39 = (void **)v118[0];
sub_14003CCE0((void **)(v38 + 672), v39, v119);
}
sub_14003A830((__int64)v118);
}
if ( !a1->m_unk2 )
{
if ( a1->m_rightArrow->isVisible(a1->m_rightArrow) || a1->m_leftArrow->isVisible(a1->m_leftArrow) )
LOBYTE(v40) = 1;
else
v40 = 0;
a1->m_pageBtn->setVisible(a1->m_pageBtn, v40);
}
sub_14003A830((__int64)&v125);
}