//
// CustomListView::setupList from 0x424b5c to 0x425166 (1546 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:48:03 +0000
//
int __fastcall CustomListView::setupList(CustomListView *this, float a2)
{
float v4; // s16
float v5; // s17
cocos2d::CCArray *v6; // r0
cocos2d::CCArray *v7; // r0
cocos2d::CCArray *v8; // r0
int result; // r0
GameManager *v10; // r0
int v11; // r8
int v12; // r7
_DWORD *v13; // r0
int v14; // r7
int v15; // r5
bool v16; // zf
int v17; // r1
int v18; // r2
int v19; // r3
CCScrollLayerExt *v20; // r0
float v21; // s13
float v22; // s14
float v23; // s16
int v24; // s15
GameManager *v25; // r0
int v26; // r5
int v27; // r8
int v28; // r0
int v29; // r8
int v30; // r7
int v31; // r1
int v32; // r2
int v33; // r3
CCScrollLayerExt *v34; // r0
int v35; // r1
int v36; // r2
int v37; // r3
CCScrollLayerExt *v38; // r0
int v39; // r5
GJUserScore *v40; // r0
int v41; // r8
int v42; // r7
int v43; // r1
int v44; // r2
int v45; // r3
CCScrollLayerExt *v46; // r0
float v47; // s12
float v48; // s15
float v49; // s16
int v50; // r0
int v51; // r1
int v52; // r2
int v53; // r3
CCScrollLayerExt *v54; // r0
float v55; // s16
CCScrollLayerExt *v56; // r5
float *v57; // r0
float v58; // r2
float v59; // r1
int v60; // r8
int v61; // r5
int v62; // r7
int v63; // r1
int v64; // r2
int v65; // r3
CCScrollLayerExt *v66; // r0
float v67; // s12
float v68; // s13
float v69; // s14
float v70; // s16
int v71; // r8
int v72; // r5
float v73; // s15
float *v74; // r0
float v75; // r7
int v76; // r0
_BYTE v77[8]; // [sp+4h] [bp-Ch] BYREF
*((_DWORD *)this + 86) = CustomListView::getCellHeight(*((_DWORD *)this + 83));
if ( (float)((float)(unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) * *((float *)this + 86)) < *((float *)this + 84) )
BoomListView::lockList(this, 1);
switch ( *((_DWORD *)this + 83) )
{
case 3:
case 0xD:
case 0xE:
v4 = 2.0;
v5 = 2.0;
break;
case 4:
case 5:
case 0xC:
case 0x11:
case 0x12:
case 0x15:
case 0x16:
case 0x17:
case 0x18:
case 0x19:
case 0x1A:
case 0x1B:
case 0x1C:
case 0x1D:
case 0x1F:
case 0x21:
case 0x22:
case 0x23:
case 0x26:
case 0x27:
v6 = *((cocos2d::CCArray **)this + 82);
if ( !v6 )
goto LABEL_12;
v5 = vcvts_n_f32_u32(cocos2d::CCArray::count(v6), 1u);
goto LABEL_13;
case 6:
case 7:
case 8:
case 0xF:
case 0x13:
case 0x20:
v7 = *((cocos2d::CCArray **)this + 82);
v5 = 1.0;
if ( v7 )
v5 = vcvts_n_f32_u32(cocos2d::CCArray::count(v7), 1u) - 1.0;
LABEL_13:
v4 = 2.0;
break;
case 0xA:
v4 = 10.0;
v5 = -6.0;
break;
case 0x10:
case 0x24:
case 0x25:
case 0x28:
v8 = *((cocos2d::CCArray **)this + 82);
v4 = 2.0;
if ( !v8 )
goto LABEL_14;
v5 = vcvts_n_f32_u32(cocos2d::CCArray::count(v8), 1u) - 2.0;
break;
default:
LABEL_12:
v4 = 2.0;
LABEL_14:
v5 = 0.0;
break;
}
TableView::reloadData(*((cocos2d::CCObject **)this + 81));
*(float *)(*((_DWORD *)this + 81) + 376) = v5;
*(float *)(*((_DWORD *)this + 81) + 380) = v4;
switch ( *((_DWORD *)this + 83) )
{
case 2:
case 3:
case 6:
case 7:
case 8:
case 0xA:
case 0xB:
case 0xD:
case 0xE:
case 0xF:
case 0x10:
case 0x11:
case 0x13:
case 0x14:
case 0x17:
case 0x18:
case 0x1C:
case 0x1F:
case 0x20:
case 0x25:
case 0x26:
case 0x27:
goto LABEL_48;
case 4:
case 5:
case 0x1A:
case 0x1D:
result = BoomListView::restoreListOffset(this, a2);
if ( result )
return result;
v10 = (GameManager *)GameManager::sharedState(nullptr);
if ( !*((_DWORD *)v10 + 188) )
goto LABEL_48;
v11 = -1;
v12 = *(_DWORD *)(GameManager::sharedState(v10) + 752);
while ( 2 )
{
if ( (unsigned int)(v11 + 1) >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) )
{
v14 = 0;
v15 = 0;
}
else
{
v13 = (_DWORD *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 82), v11 + 1);
if ( v13[67] - v13[68] != v12 && v13[239] != v12 )
{
++v11;
continue;
}
v15 = v11 + 2;
v14 = 1;
}
break;
}
v16 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) == 1;
v20 = *((CCScrollLayerExt **)this + 81);
if ( v16 )
result = CCScrollLayerExt::moveToTopWithOffset(v20, *((float *)this + 86));
else
result = CCScrollLayerExt::moveToTop(v20, v17, v18, v19);
if ( !v14 )
return result;
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82));
if ( result == 1 )
return result;
v21 = 0.5;
v22 = *((float *)this + 86);
v23 = *((float *)this + 84) * 0.5;
if ( (float)((float)v11 * v22) <= v23 )
return result;
v24 = v15;
goto LABEL_73;
case 0xC:
case 0x12:
v39 = -1;
while ( 2 )
{
if ( (unsigned int)(v39 + 1) >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) )
{
v41 = 0;
v42 = 0;
}
else
{
v40 = (GJUserScore *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 82), v39 + 1);
if ( !GJUserScore::isCurrentUser(v40) )
{
++v39;
continue;
}
v42 = v39 + 2;
v41 = 1;
}
break;
}
v16 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) == 1;
v46 = *((CCScrollLayerExt **)this + 81);
if ( v16 )
result = CCScrollLayerExt::moveToTopWithOffset(v46, *((float *)this + 86));
else
result = CCScrollLayerExt::moveToTop(v46, v43, v44, v45);
if ( !v41 )
return result;
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82));
if ( result == 1 )
return result;
v47 = *((float *)this + 86);
v48 = *((float *)this + 84) * 0.5;
if ( (float)((float)v39 * v47) <= v48 )
return result;
v49 = (float)((float)((float)v42 * v47) - v48) - (float)(v47 * 0.5);
goto LABEL_97;
case 0x15:
case 0x16:
v50 = *(_DWORD *)(*((_DWORD *)this + 81) + 464);
if ( !v50 || !(*(int (__fastcall **)(int))(*(_DWORD *)v50 + 28))(v50) )
{
v60 = 0;
v61 = -1;
LABEL_78:
v62 = 0;
goto LABEL_79;
}
v61 = -1;
v71 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*((_DWORD *)this + 81) + 464) + 4))(*(_DWORD *)(*((_DWORD *)this + 81) + 464));
while ( 1 )
{
if ( (unsigned int)(v61 + 1) >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) )
{
v60 = 0;
goto LABEL_78;
}
if ( *(_DWORD *)(cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 82), v61 + 1) + 52) == v71 )
break;
++v61;
}
v62 = v61 + 2;
v60 = 1;
LABEL_79:
v16 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) == 1;
v66 = *((CCScrollLayerExt **)this + 81);
if ( v16 )
result = CCScrollLayerExt::moveToTopWithOffset(v66, *((float *)this + 86));
else
result = CCScrollLayerExt::moveToTop(v66, v63, v64, v65);
if ( v60 )
{
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82));
if ( result != 1 )
{
v67 = 0.5;
v68 = *((float *)this + 86);
v69 = *((float *)this + 84) * 0.5;
if ( (float)((float)v61 * v68) > v69 )
{
v70 = (float)((float)v62 * v68) - v69;
LABEL_96:
v49 = v70 - (float)(v68 * v67);
LABEL_97:
v74 = (float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*((_DWORD *)this + 81) + 364) + 96))(*(_DWORD *)(*((_DWORD *)this + 81) + 364));
v56 = *((CCScrollLayerExt **)this + 81);
v75 = *v74;
v76 = (*(int (__fastcall **)(_DWORD *))(**((_DWORD **)v56 + 91) + 96))(*((_DWORD **)v56 + 91));
v59 = v75;
v58 = v49 + *(float *)(v76 + 4);
LABEL_98:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v59, v58);
return CCScrollLayerExt::setContentOffset(v56, COERCE_FLOAT(v77), nullptr);
}
}
}
return result;
case 0x19:
case 0x1B:
result = BoomListView::restoreListOffset(this, a2);
if ( result )
return result;
v25 = (GameManager *)GameManager::sharedState(nullptr);
if ( !*((_DWORD *)v25 + 189) )
{
LABEL_48:
v16 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) == 1;
v38 = *((CCScrollLayerExt **)this + 81);
if ( v16 )
return CCScrollLayerExt::moveToTopWithOffset(v38, *((float *)this + 86));
else
return CCScrollLayerExt::moveToTop(v38, v35, v36, v37);
}
v26 = -1;
v27 = *(_DWORD *)(GameManager::sharedState(v25) + 756);
while ( 2 )
{
if ( (unsigned int)(v26 + 1) >= cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) )
{
v29 = 0;
v30 = 0;
}
else
{
v28 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 82), v26 + 1);
if ( *(_DWORD *)(v28 + 276) != v27 && *(_DWORD *)(v28 + 412) != v27 )
{
++v26;
continue;
}
v30 = v26 + 2;
v29 = 1;
}
break;
}
v16 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) == 1;
v34 = *((CCScrollLayerExt **)this + 81);
if ( v16 )
result = CCScrollLayerExt::moveToTopWithOffset(v34, *((float *)this + 86));
else
result = CCScrollLayerExt::moveToTop(v34, v31, v32, v33);
if ( !v29 )
return result;
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82));
if ( result == 1 )
return result;
v21 = 0.5;
v22 = *((float *)this + 86);
v23 = *((float *)this + 84) * 0.5;
if ( (float)((float)v26 * v22) <= v23 )
return result;
v24 = v30;
LABEL_73:
v55 = (float)((float)((float)((float)v24 * v22) - v23) - (float)(v22 * v21))
+ *(float *)((*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*((_DWORD *)this + 81) + 364) + 96))(*(_DWORD *)(*((_DWORD *)this + 81) + 364))
+ 4);
if ( v55 > COERCE_FLOAT(CCScrollLayerExt::getMaxY(*((CCScrollLayerExt **)this + 81))) )
v55 = COERCE_FLOAT(CCScrollLayerExt::getMaxY(*((CCScrollLayerExt **)this + 81)));
v56 = *((CCScrollLayerExt **)this + 81);
v57 = (float *)(*(int (__fastcall **)(_DWORD *))(**((_DWORD **)v56 + 91) + 96))(*((_DWORD **)v56 + 91));
v58 = v55;
v59 = *v57;
goto LABEL_98;
case 0x21:
v16 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82)) == 1;
v54 = *((CCScrollLayerExt **)this + 81);
if ( v16 )
CCScrollLayerExt::moveToTopWithOffset(v54, *((float *)this + 86));
else
CCScrollLayerExt::moveToTop(v54, v51, v52, v53);
result = *(_DWORD *)(*((_DWORD *)this + 81) + 464);
if ( !result )
return result;
result = (*(int (__fastcall **)(int))(*(_DWORD *)result + 28))(result);
if ( !result )
return result;
result = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*((_DWORD *)this + 81) + 464) + 4))(*(_DWORD *)(*((_DWORD *)this + 81) + 464));
v72 = result;
if ( result <= 0 )
return result;
result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 82));
if ( (unsigned int)result <= 1 )
return result;
v67 = 0.5;
v68 = *((float *)this + 86);
v73 = *((float *)this + 84) * 0.5;
if ( (float)((float)v72 * v68) <= v73 )
return result;
v70 = (float)((float)(v72 + 1) * v68) - v73;
goto LABEL_96;
case 0x22:
case 0x23:
case 0x24:
case 0x28:
result = BoomListView::restoreListOffset(this, a2);
if ( !result )
goto LABEL_48;
return result;
default:
return BoomListView::setupList(this, a2);
}
}