//
// EditorSFXActionConfigLayer::refreshRows from 0x77bdf0 to 0x77c550 (1888 bytes)
//
// 3 xrefs:
// > EditorSFXActionConfigLayer::init @ 0x77ca0e
// > EditorSFXActionConfigLayer::refreshRowsAddedDeferred @ 0x77cc9c
// > EditorSFXActionConfigLayer::rebuildContent @ 0x77ccb8
//
// 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:59:24 +0000
//
void __fastcall EditorSFXActionConfigLayer::refreshRows(EditorSFXActionConfigLayer *this)
{
int v2; // r3
cocos2d::CCMenu *v3; // r0
int v4; // r0
EditorSFXManager *v5; // r0
EditorSFXManager *v6; // r0
cocos2d::CCArray *v7; // r0
int v8; // r11
signed int v9; // r5
const char *v10; // r2
float v11; // s21
float v12; // s22
float v13; // s20
int v14; // r6
int v15; // r10
void (__fastcall *v16)(int, char *); // r8
void (__fastcall *v17)(int, char *); // r3
int v18; // r1
float v19; // s19
void (__fastcall *v20)(int, char *); // r9
const char *v21; // r2
int v22; // r9
void (__fastcall *v23)(int, char *); // r10
void (__fastcall *v24)(int, char *); // r3
void (__fastcall *v25)(int, char *); // r10
int v26; // r3
const char *v27; // r2
int v28; // r8
void (__fastcall *v29)(int, char *); // r9
void (__fastcall *v30)(int, char *); // r9
float v31; // s17
float v32; // r0
float v33; // s16
MusicDownloadManager *v34; // r0
cocos2d::CCDictionary *SFXObject; // r0
int v36; // r0
int v37; // r10
int v38; // r9
SFXInfoObject *v39; // r9
int *v40; // r9
int v41; // r1
cocos2d::CCLabelBMFont *v42; // r2
const char *v43; // r1
size_t v44; // r2
bool v45; // zf
int v46; // r3
int v47; // r0
unsigned int v48; // r3
unsigned int v49; // r0
cocos2d::CCLabelBMFont *v50; // r8
int v51; // r6
char *v52; // r0
int v53; // r2
size_t v54; // r2
const char *v55; // r2
cocos2d::CCLabelBMFont *v56; // r0
cocos2d::CCLabelBMFont *v57; // r7
void (__fastcall *v58)(cocos2d::CCLabelBMFont *, char *); // r8
void (__fastcall *v59)(cocos2d::CCLabelBMFont *, char *); // r8
const char *v60; // r1
int v61; // r7
void (__fastcall *v62)(int, _DWORD); // r8
int v63; // r0
int v64; // r7
void (__fastcall *v65)(int, char *); // r8
const char *v66; // r1
int v67; // r7
void (__fastcall *v68)(int, _DWORD); // r8
int v69; // r0
int v70; // r7
void (__fastcall *v71)(int, char *); // r8
const char *v72; // r1
int v73; // r7
void (__fastcall *v74)(int, _DWORD); // r8
int v75; // r0
int v76; // r7
void (__fastcall *v77)(int, char *); // r8
int v78; // r5
void (__fastcall *v79)(int, char *); // r7
float v80; // r1
int v81; // [sp+8h] [bp-A4h]
cocos2d::CCArray *v82; // [sp+Ch] [bp-A0h]
EditorSFXManager *v83; // [sp+10h] [bp-9Ch]
float v84; // [sp+30h] [bp-7Ch] BYREF
float v85; // [sp+34h] [bp-78h]
int (__fastcall *v86)(EditorSFXActionConfigLayer *, cocos2d::CCObject *); // [sp+38h] [bp-74h]
int v87; // [sp+3Ch] [bp-70h]
SetupTriggerPopup *(__fastcall *v88)(EditorSFXActionConfigLayer *, cocos2d::CCObject *); // [sp+40h] [bp-6Ch]
int v89; // [sp+44h] [bp-68h]
int *(__fastcall *v90)(EditorSFXActionConfigLayer *, cocos2d::CCObject *); // [sp+48h] [bp-64h]
int v91; // [sp+4Ch] [bp-60h]
int v92; // [sp+50h] [bp-5Ch] BYREF
unsigned int v93; // [sp+54h] [bp-58h]
cocos2d::CCLabelBMFont *v94; // [sp+58h] [bp-54h]
unsigned __int8 v95[12]; // [sp+5Ch] [bp-50h] BYREF
int v96; // [sp+68h] [bp-44h] BYREF
unsigned int v97; // [sp+6Ch] [bp-40h]
cocos2d::CCLabelBMFont *v98; // [sp+70h] [bp-3Ch]
char v99; // [sp+74h] [bp-38h] BYREF
char v100; // [sp+75h] [bp-37h]
char v101; // [sp+76h] [bp-36h]
_BYTE v102[16]; // [sp+84h] [bp-28h] BYREF
_BYTE v103[16]; // [sp+94h] [bp-18h] BYREF
v2 = *((_DWORD *)this + 182);
if ( !v2 || !*((_DWORD *)this + 183) )
return;
*((_DWORD *)this + 185) = *(_DWORD *)(v2 + 336);
v3 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, int))(**(_DWORD **)(v2 + 320) + 292))(*(_DWORD *)(v2 + 320), 1);
v4 = cocos2d::CCMenu::create(v3);
*((_DWORD *)this + 183) = v4;
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v4 + 148))(v4, &unk_D2E278);
(*(void (__fastcall **)(_DWORD, void *))(**((_DWORD **)this + 183) + 160))(*((_DWORD *)this + 183), &unk_D2E280);
(*(void (__fastcall **)(_DWORD, void *))(**((_DWORD **)this + 183) + 92))(*((_DWORD *)this + 183), &unk_D2E278);
v5 = (EditorSFXManager *)(*(int (__fastcall **)(_DWORD, _DWORD, int))(**(_DWORD **)(*((_DWORD *)this + 182) + 320)
+ 232))(
*(_DWORD *)(*((_DWORD *)this + 182) + 320),
*((_DWORD *)this + 183),
2);
v6 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);
v7 = (cocos2d::CCArray *)EditorSFXManager::soundsForAction(v6, *((_DWORD *)this + 179));
v82 = v7;
if ( v7 )
v81 = cocos2d::CCArray::count(v7);
else
v81 = 0;
v8 = 1000;
v9 = 0;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v84, (const cocos2d::CCSize *)(*((_DWORD *)this + 182) + 324));
v11 = v84;
v12 = v84 * 0.5;
v13 = v84 - 23.0;
while ( v9 < v81 )
{
v14 = cocos2d::CCArray::objectAtIndex(v82, v9);
if ( !v14 )
goto LABEL_52;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v99, 0.0, 0.0, 40.0, 40.0);
v15 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", &v99);
v16 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v15 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v99, v11, 30.0);
v16(v15, &v99);
v17 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v15 + 480);
v99 = 0;
v100 = 0;
v101 = 0;
v17(v15, &v99);
if ( (v9 & 1) != 0 )
v18 = 40;
else
v18 = 70;
v19 = -20.0 - (float)((float)v9 * 32.0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 456))(v15, v18);
v20 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, v12, v19);
v20(v15, &v99);
(*(void (__fastcall **)(_DWORD, int, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 182) + 320) + 232))(
*(_DWORD *)(*((_DWORD *)this + 182) + 320),
v15,
0);
sub_993B88(v102, 16, "%d.", v9 + 1);
v22 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v102, "bigFont.fnt", v21);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v22 + 80))(v22, 1051931443);
v23 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v22 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, 0.0, 0.5);
v23(v22, &v99);
v24 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v22 + 536);
v99 = -86;
v100 = -86;
v101 = -86;
v24(v22, &v99);
v25 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v22 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, 10.0, v19);
v25(v22, &v99);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(*((_DWORD *)this + 182) + 320) + 232))(
*(_DWORD *)(*((_DWORD *)this + 182) + 320),
v22,
1);
v26 = *(_DWORD *)(v14 + 1660);
v92 = 0;
v93 = 0;
v94 = nullptr;
if ( v26 <= 0 )
{
std::string::assign(&v92, "(empty)");
v33 = 30.0;
goto LABEL_48;
}
sub_993B88(v103, 16, "%d", v26);
v28 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v103, "goldFont.fnt", v27);
v29 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v28 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, 0.0, 0.5);
v29(v28, &v99);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v28 + 80))(v28, 1055286886);
v30 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v28 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, 30.0, v19);
v30(v28, &v99);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(*((_DWORD *)this + 182) + 320) + 232))(
*(_DWORD *)(*((_DWORD *)this + 182) + 320),
v28,
1);
v31 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v28 + 164))(v28);
v32 = (*(float (__fastcall **)(int))(*(_DWORD *)v28 + 68))(v28);
v33 = (float)((float)(v31 * v32) + 6.0) + 30.0;
if ( *(int *)(v14 + 1664) > 0 )
{
v83 = (EditorSFXManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)LODWORD(v32));
v36 = EditorSFXManager::sharedState(v83);
v37 = *(_DWORD *)(v14 + 1660);
v38 = *(_DWORD *)(v14 + 1664);
EditorSFXManager::getCustomSFXRawPath((EditorSFXManager *)v95, v36, v37);
v39 = MusicDownloadManager::resolveSFXPlacement(v83, v37, v38, v95);
v32 = COERCE_FLOAT(std::string::~string((int)v95));
if ( v39 )
goto LABEL_18;
}
v34 = (MusicDownloadManager *)MusicDownloadManager::sharedState((MusicDownloadManager *)LODWORD(v32));
SFXObject = MusicDownloadManager::getSFXObject(v34, *(_DWORD *)(v14 + 1660));
v39 = SFXObject;
if ( SFXObject )
{
LABEL_18:
v96 = 0;
v97 = 0;
v98 = nullptr;
if ( (*((_BYTE *)v39 + 76) & 1) == 0 )
{
v40 = (int *)((char *)v39 + 76);
v41 = v40[1];
v42 = (cocos2d::CCLabelBMFont *)v40[2];
v96 = *v40;
v97 = v41;
v98 = v42;
goto LABEL_23;
}
v43 = *((const char **)v39 + 21);
v44 = *((_DWORD *)v39 + 20);
}
else
{
v44 = 9;
v96 = 0;
v43 = "(missing)";
v97 = 0;
v98 = nullptr;
}
std::string::__init(&v96, v43, v44);
LABEL_23:
v46 = v92 & 1;
v45 = v46 == 0;
if ( (v92 & 1) != 0 )
{
v46 = 0;
*(_BYTE *)v94 = 0;
}
else
{
LOBYTE(v92) = v46;
BYTE1(v92) = v46;
}
if ( !v45 )
v93 = v46;
if ( (v92 & 1) != 0 )
{
v47 = v93;
v48 = (v92 & 0xFFFFFFFE) - 1;
if ( v93 <= 0xA )
{
if ( (v92 & 0xFFFFFFFE) != 0xB )
goto LABEL_35;
goto LABEL_46;
}
}
else
{
v47 = (int)(unsigned __int8)v92 >> 1;
if ( v47 <= 10 )
goto LABEL_46;
v48 = 10;
}
v49 = (v47 + 16) & 0xFFFFFFF0;
if ( v49 - 1 != v48 )
{
if ( v49 == 11 )
{
LABEL_35:
v50 = v94;
v51 = 1;
v52 = (char *)&v92 + 1;
}
else
{
v52 = (char *)operator new(v49);
v51 = v92 & 1;
if ( (v92 & 1) != 0 )
v50 = v94;
else
v50 = (cocos2d::CCLabelBMFont *)((char *)&v92 + 1);
}
if ( (v92 & 1) != 0 )
v53 = v93;
else
v53 = (int)(unsigned __int8)v92 >> 1;
v54 = v53 + 1;
if ( v54 )
memcpy(v52, v50, v54);
if ( v51 )
operator delete(v50);
}
LABEL_46:
v92 = v96;
v93 = v97;
v94 = v98;
v96 = 0;
v97 = 0;
v98 = nullptr;
std::string::~string((int)&v96);
LABEL_48:
if ( (v92 & 1) != 0 )
v56 = v94;
else
v56 = (cocos2d::CCLabelBMFont *)((char *)&v92 + 1);
v57 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v56, "bigFont.fnt", v55);
v58 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_DWORD *)v57 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, 0.0, 0.5);
v58(v57, &v99);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v57 + 80))(v57, 1055286886);
cocos2d::CCLabelBMFont::limitLabelWidth(v57, (float)(v13 - v33) - 90.0, 0.45, 0.3);
v59 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_DWORD *)v57 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, v33, v19);
v59(v57, &v99);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**(_DWORD **)(*((_DWORD *)this + 182) + 320) + 232))(
*(_DWORD *)(*((_DWORD *)this + 182) + 320),
v57,
1);
v61 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_deleteBtn_001.png", v60);
v62 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v61 + 80);
v63 = (*(int (__fastcall **)(int))(*(_DWORD *)v61 + 164))(v61);
v62(v61, 24.0 / *(float *)(v63 + 4));
v86 = EditorSFXActionConfigLayer::onDeleteSound;
v87 = 0;
v64 = CCMenuItemSpriteExtra::create(v61, 0, (int)this, (int)EditorSFXActionConfigLayer::onDeleteSound, 0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v64 + 36))(v64, v8 + 2);
v65 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v64 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, v13, v19);
v65(v64, &v99);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 183) + 228))(*((_DWORD *)this + 183), v64);
v67 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_editBtn_001.png", v66);
v68 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v67 + 80);
v69 = (*(int (__fastcall **)(int))(*(_DWORD *)v67 + 164))(v67);
v68(v67, 24.0 / *(float *)(v69 + 4));
v88 = EditorSFXActionConfigLayer::onEditSound;
v89 = 0;
v70 = CCMenuItemSpriteExtra::create(v67, 0, (int)this, (int)EditorSFXActionConfigLayer::onEditSound, 0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v70 + 36))(v70, v8 + 1);
v71 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v70 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, v13 - 28.0, v19);
v71(v70, &v99);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 183) + 228))(*((_DWORD *)this + 183), v70);
v73 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_playBtn2_001.png", v72);
v74 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v73 + 80);
v75 = (*(int (__fastcall **)(int))(*(_DWORD *)v73 + 164))(v73);
v74(v73, 24.0 / *(float *)(v75 + 4));
v90 = EditorSFXActionConfigLayer::onPreviewSound;
v91 = 0;
v76 = CCMenuItemSpriteExtra::create(v73, 0, (int)this, (int)EditorSFXActionConfigLayer::onPreviewSound, 0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v76 + 36))(v76, v8);
v77 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v76 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, (float)(v13 - 28.0) - 28.0, v19);
v77(v76, &v99);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 183) + 228))(*((_DWORD *)this + 183), v76);
std::string::~string((int)&v92);
LABEL_52:
++v9;
v8 += 8;
}
if ( !v81 )
{
v78 = cocos2d::CCLabelBMFont::create(
(cocos2d::CCLabelBMFont *)"No sounds bound. Tap + Add Sound below.",
"bigFont.fnt",
v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v78 + 80))(v78, 1056964608);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v78 + 512))(v78, 140);
v79 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v78 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v99, v12, v85 * 0.5);
v79(v78, &v99);
(*(void (__fastcall **)(_DWORD, int, int))(**(_DWORD **)(*((_DWORD *)this + 182) + 320) + 232))(
*(_DWORD *)(*((_DWORD *)this + 182) + 320),
v78,
1);
}
if ( (float)((float)((float)v81 * 32.0) + 8.0) >= v85 )
v80 = (float)((float)v81 * 32.0) + 8.0;
else
v80 = v85;
ScrollableContentLayer::setContentHeight(*((ScrollableContentLayer **)this + 182), v80);
ScrollableContentLayer::scrollTo(*((ScrollableContentLayer **)this + 182), *((float *)this + 185));
}