//
// AnimatedGameObject::displayFrameChanged from 0x4f620c to 0x4f63e2 (470 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'AnimatedGameObject::displayFrameChanged @ 0x4f63f8
//
// 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:51:17 +0000
//
int __fastcall AnimatedGameObject::displayFrameChanged(int a1, cocos2d::CCArray **this, int a3)
{
int Follower; // r0
char v5; // r3
int v6; // r6
size_t v7; // r0
size_t i; // r3
char *v9; // r5
unsigned int v10; // r1
unsigned __int8 *v11; // r4
int v12; // r0
unsigned __int8 *v13; // lr
char *v14; // r1
int v15; // r8
unsigned __int8 *v16; // r0
unsigned __int8 *v17; // r8
char *v18; // r3
int v19; // r9
unsigned __int8 *v20; // r12
char *v21; // r9
int v22; // t1
size_t v23; // r8
unsigned int v24; // r2
char *v25; // r3
size_t v26; // r1
int v27; // r3
const char *v28; // r5
size_t v29; // r0
cocos2d::CCSpriteFrameCache *v30; // r0
void (__fastcall *v31)(int, int); // r5
cocos2d::CCSpriteFrameCache *v32; // r0
char *v33; // r1
int v34; // r0
char v36[4]; // [sp+10h] [bp-2Ch] BYREF
unsigned int v37; // [sp+14h] [bp-28h]
char *v38; // [sp+18h] [bp-24h]
int v39; // [sp+1Ch] [bp-20h] BYREF
int v40; // [sp+20h] [bp-1Ch]
unsigned __int8 *v41; // [sp+24h] [bp-18h]
int v42; // [sp+28h] [bp-14h] BYREF
size_t v43; // [sp+2Ch] [bp-10h]
char *v44; // [sp+30h] [bp-Ch]
Follower = CCSpritePlus::getFollower(this);
v5 = *(_BYTE *)a3;
*(_DWORD *)v36 = 0;
if ( (v5 & 1) == 0 )
++a3;
v37 = 0;
if ( (v5 & 1) != 0 )
a3 = *(_DWORD *)(a3 + 8);
v38 = nullptr;
v6 = Follower;
v7 = strlen((const char *)a3);
std::string::__init((int *)v36, (const void *)a3, v7);
v39 = 0;
v40 = 0;
v41 = nullptr;
std::string::__init(&v39, "_001.png", 8u);
v42 = 0;
v43 = 0;
v44 = nullptr;
std::string::__init(&v42, "_glow_001.png", 0xDu);
for ( i = 0; ; i = v27 + v23 )
{
if ( (v36[0] & 1) != 0 )
{
v9 = v38;
v10 = v37;
}
else
{
v10 = (int)(unsigned __int8)v36[0] >> 1;
v9 = &v36[1];
}
if ( (v39 & 1) != 0 )
{
v11 = v41;
v12 = v40;
}
else
{
v12 = (int)(unsigned __int8)v39 >> 1;
v11 = (unsigned __int8 *)&v39 + 1;
}
if ( i > v10 || v10 - i < v12 )
break;
if ( v12 )
{
v13 = (unsigned __int8 *)&v9[i];
v14 = &v9[v10];
if ( v14 - &v9[i] >= v12 )
{
v15 = 1 - v12;
v16 = &v11[v12];
v17 = (unsigned __int8 *)&v14[v15];
LABEL_15:
while ( 1 )
{
v18 = (char *)v13;
if ( v13 == v17 )
break;
v19 = *v13++;
if ( v19 == *v11 )
{
v20 = v11;
v21 = v18;
while ( ++v20 != v16 )
{
v22 = (unsigned __int8)*++v21;
if ( v22 != *v20 )
goto LABEL_15;
}
goto LABEL_22;
}
}
}
v18 = v14;
LABEL_22:
if ( v18 == v14 )
break;
v23 = v18 - v9;
}
else
{
v23 = i;
}
if ( v23 == -1 )
break;
if ( (v39 & 1) != 0 )
v24 = v40;
else
v24 = (int)(unsigned __int8)v39 >> 1;
if ( (v42 & 1) != 0 )
{
v25 = v44;
v26 = v43;
}
else
{
v26 = (int)(unsigned __int8)v42 >> 1;
v25 = (char *)&v42 + 1;
}
std::string::replace(v36, v23, v24, v25, v26);
if ( (v42 & 1) != 0 )
v27 = v43;
else
v27 = (int)(unsigned __int8)v42 >> 1;
}
std::string::~string((int)&v42);
std::string::~string((int)&v39);
if ( (v36[0] & 1) != 0 )
v28 = v38;
else
v28 = &v36[1];
v42 = 0;
v43 = 0;
v44 = nullptr;
v29 = strlen(v28);
std::string::__init(&v42, v28, v29);
v30 = (cocos2d::CCSpriteFrameCache *)std::string::~string((int)v36);
v31 = *(void (__fastcall **)(int, int))(*(_DWORD *)v6 + 580);
v32 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v30);
if ( (v42 & 1) != 0 )
v33 = v44;
else
v33 = (char *)&v42 + 1;
v34 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v32, v33);
v31(v6, v34);
return std::string::~string((int)&v42);
}