//
// SFXBrowser::updateSelectionUI from 0x6c5890 to 0x6c5b6a (730 bytes)
//
// 4 xrefs:
// > SFXBrowser::onBatchDelete @ 0x6c5bfe
// > SFXBrowser::setupList @ 0x6c60c2
// > SFXBrowser::onSelectAll @ 0x6c8adc
// > SFXBrowser::cellPerformedAction @ 0x6c9360
//
// 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:56:54 +0000
//
GameManager *__fastcall SFXBrowser::updateSelectionUI(GameManager *this)
{
GameManager *v1; // r4
int v2; // r3
int v3; // r3
_BOOL4 v4; // r5
int v5; // r1
GameManager *updated; // r0
int v7; // r1
int v8; // r2
int v9; // r3
float v10; // s16
float v11; // s18
int v12; // r9
float v13; // s17
float v14; // s20
float v15; // s21
_DWORD *v16; // r2
GameManager **v17; // r7
GameManager **v18; // r6
GameManager *v19; // t1
const cocos2d::CCPoint *v20; // r11
void (__fastcall *v21)(int, _BYTE *); // r8
int v22; // r8
_DWORD *v23; // r11
int v24; // s15
int v25; // r3
int v26; // r7
void (__fastcall *v27)(int, _BYTE *); // r8
int v28; // r1
int v29; // r5
void (__fastcall *v30)(int, int); // r6
cocos2d::CCString *v31; // r0
int CString; // r0
int v33; // [sp+4h] [bp-38h]
void (__fastcall *v34)(_DWORD *, _BYTE *); // [sp+4h] [bp-38h]
int v35; // [sp+8h] [bp-34h]
cocos2d::CCPoint *v36; // [sp+Ch] [bp-30h]
float v37; // [sp+10h] [bp-2Ch] BYREF
float v38; // [sp+14h] [bp-28h]
_BYTE v39[8]; // [sp+18h] [bp-24h] BYREF
_BYTE v40[8]; // [sp+20h] [bp-1Ch] BYREF
_DWORD v41[3]; // [sp+28h] [bp-14h]
v1 = this;
v2 = *((_DWORD *)this + 136);
if ( v2 )
{
this = *((GameManager **)this + 161);
if ( this )
{
v3 = *(_DWORD *)(v2 + 104) - 4;
v4 = v3 == 0;
if ( v3 )
v5 = 0;
else
v5 = *((unsigned __int8 *)v1 + 624) ^ 1;
v35 = *((_DWORD *)v1 + 174);
(*(void (__fastcall **)(GameManager *, int))(*(_DWORD *)this + 172))(this, v5);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)v1 + 166) + 172))(*((_DWORD *)v1 + 166), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)v1 + 167) + 172))(*((_DWORD *)v1 + 167), 0);
updated = *((GameManager **)v1 + 164);
if ( updated )
{
(*(void (__fastcall **)(GameManager *, _BOOL4))(*(_DWORD *)updated + 172))(updated, v4);
updated = SFXBrowser::updateShareItem(v1, v7, v8);
}
v9 = *((_DWORD *)v1 + 155);
if ( v9 )
{
v16 = *(_DWORD **)(v9 + 52);
if ( *v16 )
{
v17 = (GameManager **)v16[3];
v18 = &v17[*v16] + 0x3FFFFFFF;
while ( v17 <= v18 )
{
v19 = *v17++;
updated = v19;
if ( !v19 )
break;
if ( updated != *((GameManager **)v1 + 154) )
updated = (GameManager *)(*(int (__fastcall **)(GameManager *))(*(_DWORD *)updated + 172))(updated);
}
}
}
cocos2d::CCDirector::sharedDirector(updated);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v37);
v10 = (float)((float)(v38 * 0.5) + 110.0) + 6.0;
v11 = (float)((float)(v37 * 0.5) - 170.0) + 2.0;
if ( *((_BYTE *)v1 + 624) )
{
v15 = v10 - 2.0;
v12 = 1060320051;
v13 = 21.6;
v14 = 265.0;
}
else
{
v12 = 1065353216;
v13 = 32.0;
v14 = 48.0;
v15 = (float)((float)(v38 * 0.5) + 110.0) + 6.0;
}
v20 = *((const cocos2d::CCPoint **)v1 + 111);
v33 = *((_DWORD *)v1 + 141);
v21 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v33 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, v11 + 328.0, v10 - 2.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v40, v20);
v21(v33, v40);
v22 = 0;
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)v1 + 141) + 172))(
*((_DWORD *)v1 + 141),
*((unsigned __int8 *)v1 + 624));
v41[0] = *((_DWORD *)v1 + 168);
v41[1] = *((_DWORD *)v1 + 169);
v41[2] = *((_DWORD *)v1 + 170);
do
{
v23 = (_DWORD *)v41[v22];
(*(void (__fastcall **)(_DWORD *, int))(*v23 + 80))(v23, v12);
v24 = v22;
v25 = *v23;
v23[79] = v12;
++v22;
v34 = *(void (__fastcall **)(_DWORD *, _BYTE *))(v25 + 92);
v36 = *((cocos2d::CCPoint **)v1 + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, (float)(v11 + v14) + (float)(v13 * (float)v24), v15);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v40, v36);
v34(v23, v40);
}
while ( v22 != 3 );
v26 = *((_DWORD *)v1 + 171);
v27 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v26 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40, (float)((float)(v11 + v14) + (float)(v13 + v13)) + 18.0, v10);
v27(v26, v40);
(*(void (__fastcall **)(_DWORD, _BOOL4))(**((_DWORD **)v1 + 168) + 172))(*((_DWORD *)v1 + 168), v4);
if ( v4 )
{
v4 = v35;
if ( v35 )
v4 = 1;
}
(*(void (__fastcall **)(_DWORD, _BOOL4))(**((_DWORD **)v1 + 169) + 172))(*((_DWORD *)v1 + 169), v4);
(*(void (__fastcall **)(_DWORD, _BOOL4))(**((_DWORD **)v1 + 170) + 172))(*((_DWORD *)v1 + 170), v4);
if ( v4 )
v28 = *((unsigned __int8 *)v1 + 624) ^ 1;
else
v28 = 0;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)v1 + 171) + 172))(*((_DWORD *)v1 + 171), v28);
if ( (*(int (__fastcall **)(_DWORD))(**((_DWORD **)v1 + 171) + 176))(*((_DWORD *)v1 + 171)) )
{
v29 = *((_DWORD *)v1 + 171);
v30 = *(void (__fastcall **)(int, int))(*(_DWORD *)v29 + 464);
v31 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"(%i)",
*((const char **)v1 + 174));
CString = cocos2d::CCString::getCString(v31);
v30(v29, CString);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)v1 + 171), 40.0, 0.4, 0.0);
}
return (GameManager *)SFXBrowser::fitFolderPath(v1);
}
}
return this;
}