//
// SetupKeyframePopup::refreshPreviewArt from 0x5747b0 to 0x57489e (238 bytes)
//
// 2 xrefs:
// > SetupKeyframePopup::valueDidChange @ 0x5748aa
// > SetupKeyframePopup::onCustomButton @ 0x57496a
//
// 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
//
void SetupKeyframePopup::refreshPreviewArt(SetupKeyframePopup *a1)
{
cocos2d::CCObject *v1; // r1
EffectGameObject *m_gameObject; // r0
cocos2d::CCArray *m_gameObjects; // r7
cocos2d::ccArray *data; // r2
cocos2d::CCObject **arr; // r7
cocos2d::CCObject **v7; // r9
int v8; // r2
int v9; // t1
_DWORD *i; // r7
cocos2d::CCObject *v11; // r0
cocos2d::CCObject_vtbl *v12; // r2
cocos2d::CCObject *(__fastcall *copyWithZone)(cocos2d::CCCopying *__hidden, cocos2d::CCZone *); // r3
bool (__fastcall *isEqual)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // r2
bool (__fastcall *v15)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *); // r3
int v16; // r1
int v17; // t1
char v18[8]; // [sp+4h] [bp-24h] BYREF
char v19[4]; // [sp+Ch] [bp-1Ch] BYREF
_DWORD *v20[5]; // [sp+10h] [bp-18h] BYREF
if ( a1->m_editorLayer )
{
memset(v20, 0, sizeof(v20));
m_gameObject = a1->m_gameObject;
v20[2] = v20;
v20[3] = v20;
if ( m_gameObject )
m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject((cocos2d::CCArray *)m_gameObject, v1);
else
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects )
{
if ( cocos2d::CCArray::count(m_gameObjects) )
{
data = m_gameObjects->data;
if ( data->num )
{
arr = data->arr;
v7 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v7 )
{
v9 = (int)*arr++;
v8 = v9;
if ( !v9 )
break;
std::_Rb_tree,std::less,std::allocator>::_M_insert_unique(
(int)v18,
(int)v19,
(_DWORD *)(v8 + 1644));
}
}
}
}
for ( i = v20[2]; i != v20; i = (_DWORD *)sub_761FE0(i) )
{
v11 = cocos2d::CCDictionary::objectForKey(a1->m_editorLayer->m_keyframeGroups, i[4]);
if ( v11 )
{
v12 = v11[1].__vftable;
copyWithZone = v12->copyWithZone;
if ( v12->copyWithZone )
{
isEqual = v12->isEqual;
v15 = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual
+ 4
* ((_DWORD)copyWithZone
+ 0x3FFFFFFF));
while ( (unsigned int)isEqual <= (unsigned int)v15 )
{
v17 = *(_DWORD *)isEqual;
isEqual = (bool (__fastcall *)(cocos2d::CCObject *__hidden, const cocos2d::CCObject *))((char *)isEqual + 4);
v16 = v17;
if ( !v17 )
break;
*(_BYTE *)(v16 + 1669) = 1;
}
}
}
}
std::_Rb_tree,std::less,std::allocator>::_M_erase((int)v19, v20[1]);
}
}