//
// CCPartAnimSprite::changeTextureOfID from 0x6937d4 to 0x693954 (384 bytes)
//
// 1 xrefs:
// > ??> @ 0x8b780
//
// This function is hookable on this platform (idp: arm, 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:50:36 +0000
//
__int64 __fastcall CCPartAnimSprite::changeTextureOfID(CCPartAnimSprite *this, const char *a2, char *a3)
{
__int64 v4; // x24
size_t v5; // x0
size_t v6; // x19
const char *v7; // x1
unsigned __int64 v8; // x0
__int64 v9; // x23
char *v10; // x0
char *v11; // x3
cocos2d::CCSpriteFrameCache **v12; // x19
size_t v13; // x0
__int64 v16; // [xsp+50h] [xbp+50h] BYREF
size_t v17; // [xsp+58h] [xbp+58h]
void *v18; // [xsp+60h] [xbp+60h]
v4 = *((_QWORD *)this + 75);
v16 = 0;
v17 = 0;
v18 = nullptr;
v5 = strlen(a2);
v6 = v5;
v7 = a2;
if ( v5 > 0xFFFFFFFFFFFFFFEFLL )
sub_62B300();
if ( v5 > 0x16 )
{
v8 = (v5 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v9 = v8 | 1;
v10 = (char *)operator new(v8);
v16 = v9;
v7 = a2;
v11 = v10;
v18 = v10;
v17 = v6;
LABEL_4:
v11 = (char *)memcpy(v11, v7, v6);
goto LABEL_5;
}
LOBYTE(v16) = 2 * v5;
v11 = (char *)&v16 + 1;
if ( v5 )
goto LABEL_4;
LABEL_5:
v11[v6] = 0;
v12 = (cocos2d::CCSpriteFrameCache **)cocos2d::CCDictionary::objectForKey(v4, &v16);
if ( (v16 & 1) != 0 )
operator delete(v18);
if ( v12 )
{
if ( a3 )
{
v16 = 0;
v17 = 0;
v18 = nullptr;
v13 = strlen(a3);
std::string::__init(&v16, a3, v13);
CCSpritePart::updateDisplayFrame(v12, (char *)&v16);
if ( (v16 & 1) != 0 )
operator delete(v18);
}
else
{
CCSpritePart::resetTextureRect((CCSpritePart *)v12);
}
}
return _stack_chk_guard;
}