//
// CCPartAnimSprite::setDisplayFrame from 0x10035e300 to 0x10035e437 (311 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b25e20
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:28:55 +0000
//
void __fastcall CCPartAnimSprite::setDisplayFrame(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int64 v4; // r15
__int64 CString; // rax
__int64 v6; // rax
__int64 v7; // rcx
unsigned int *v8; // rdx
__int64 v9; // rsi
unsigned __int64 v10; // rdx
unsigned __int64 v11; // rsi
int *v12; // r14
__int64 v13; // r15
__int64 i; // r12
unsigned int *v15; // rax
_BYTE **v16; // r14
unsigned __int64 v17; // r15
_BYTE *v18; // rdi
if ( a2 )
{
v3 = *(_QWORD *)(a1 + 608);
if ( v3 != a2 )
{
if ( v3 )
cocos2d::CCObject::release(v3);
*(_QWORD *)(a1 + 608) = a2;
cocos2d::CCObject::retain(a2);
v4 = CCAnimateFrameCache::sharedSpriteFrameCache();
CString = cocos2d::CCString::getCString(a2);
v6 = CCAnimateFrameCache::spriteFrameByName(v4, CString);
if ( v6 )
{
v7 = *(_QWORD *)(a1 + 632);
if ( v7 )
{
v8 = *(unsigned int **)(v7 + 56);
v9 = *v8;
if ( *v8 )
{
v10 = *((_QWORD *)v8 + 2);
v11 = v10 + 8 * v9 - 8;
do
{
if ( !*(_QWORD *)v10 )
break;
*(_BYTE *)(*(_QWORD *)v10 + 619LL) = 0;
v10 += 8LL;
}
while ( v10 <= v11 );
}
}
v12 = *(int **)(v6 + 56);
v13 = *v12;
if ( v13 > 0 )
{
for ( i = 0; i != v13; ++i )
CCPartAnimSprite::transformSprite((_QWORD *)a1, *(_QWORD *)(*((_QWORD *)v12 + 2) + 8 * i));
v7 = *(_QWORD *)(a1 + 632);
}
if ( v7 )
{
v15 = *(unsigned int **)(v7 + 56);
if ( *v15 )
{
v16 = *((_BYTE ***)v15 + 2);
v17 = (unsigned __int64)&v16[*v15 - 1];
do
{
v18 = *v16;
if ( !*v16 )
break;
if ( !v18[619] )
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)v18 + 344LL))(v18, 0);
++v16;
}
while ( (unsigned __int64)v16 <= v17 );
}
}
}
*(_BYTE *)(a1 + 616) = 1;
}
}
}