//
// SetupKeyframePopup::refreshPreviewArt from 0x6aef4c to 0x6af04a (254 bytes)
//
// 2 xrefs:
// > SetupKeyframePopup::valueDidChange @ 0x6af056
// > SetupKeyframePopup::onCustomButton @ 0x6af0e2
//
// 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:38 +0000
//
void __fastcall SetupKeyframePopup::refreshPreviewArt(SetupKeyframePopup *this, cocos2d::CCObject *a2)
{
cocos2d::CCArray *v3; // r0
cocos2d::CCArray *v4; // r4
_DWORD *v5; // r2
int *v6; // r4
int *v7; // r9
int v8; // r2
int v9; // t1
_DWORD *v10; // r4
int v11; // r0
_DWORD *v12; // r3
_DWORD *v13; // r2
int v14; // r3
int *v15; // r2
int *v16; // r3
int v17; // r1
int v18; // t1
_DWORD *v19; // r3
int v20; // [sp+0h] [bp-18h] BYREF
_DWORD **v21; // [sp+8h] [bp-10h] BYREF
_DWORD *v22[2]; // [sp+Ch] [bp-Ch] BYREF
if ( *((_DWORD *)this + 179) )
{
v3 = *((cocos2d::CCArray **)this + 132);
v22[0] = nullptr;
v22[1] = nullptr;
v21 = v22;
if ( v3 )
v4 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(v3, a2);
else
v4 = *((cocos2d::CCArray **)this + 133);
if ( v4 )
{
if ( cocos2d::CCArray::count(v4) )
{
v5 = *((_DWORD **)v4 + 13);
if ( *v5 )
{
v6 = (int *)v5[3];
v7 = &v6[*v5 - 1];
while ( v6 <= v7 )
{
v9 = *v6++;
v8 = v9;
if ( !v9 )
break;
std::__tree::__emplace_unique_key_args(
(int)&v20,
(int)&v21,
(int *)(v8 + 1656),
(_DWORD *)(v8 + 1656));
}
}
}
}
v10 = v21;
while ( v10 != v22 )
{
v11 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(*((_DWORD *)this + 179) + 11232), v10[4]);
if ( v11 )
{
v13 = *(_DWORD **)(v11 + 52);
if ( *v13 )
{
v14 = *v13 + 0x40000000;
v15 = (int *)v13[3];
v16 = &v15[v14 - 1];
while ( v15 <= v16 )
{
v18 = *v15++;
v17 = v18;
if ( !v18 )
break;
*(_BYTE *)(v17 + 1681) = 1;
}
}
}
v12 = (_DWORD *)v10[1];
if ( v12 )
{
do
{
v10 = v12;
v12 = (_DWORD *)*v12;
}
while ( v12 );
}
else
{
do
{
v19 = v10;
v10 = (_DWORD *)v10[2];
}
while ( v19 != (_DWORD *)*v10 );
}
}
std::__tree::destroy((int)&v21, v22[0]);
}
}