//
// CCSpritePart::createWithSpriteFrameName from 0x692cfc to 0x692e88 (396 bytes)
//
// 2 xrefs:
// > CCPartAnimSprite::initWithAnimDesc @ 0x693c30
// > ??> @ 0x505d8
//
// 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 CCSpritePart::createWithSpriteFrameName(CCSpritePart *this, const char *a2)
{
__int64 v3; // x19
size_t v4; // x0
size_t v5; // x2
char *v6; // x1
__int64 v8; // [xsp+40h] [xbp+40h] BYREF
size_t v9; // [xsp+48h] [xbp+48h]
void *v10; // [xsp+50h] [xbp+50h]
v3 = operator new(0x290u);
cocos2d::CCSprite::CCSprite((cocos2d::CCSprite *)v3);
*(_QWORD *)(v3 + 600) = 0;
*(_QWORD *)(v3 + 608) = 0;
*(_BYTE *)(v3 + 616) = 0;
*(_BYTE *)(v3 + 617) = 0;
*(_BYTE *)(v3 + 618) = 0;
*(_BYTE *)(v3 + 619) = 0;
*(_QWORD *)(v3 + 624) = 0;
*(_QWORD *)v3 = &off_1417760;
*(_QWORD *)(v3 + 320) = &off_1417C58;
*(_QWORD *)(v3 + 344) = &off_1417CD8;
*(_QWORD *)(v3 + 632) = 0;
*(_QWORD *)(v3 + 640) = 0;
*(_QWORD *)(v3 + 648) = 0;
if ( (unsigned __int8)CCSpritePlus::initWithSpriteFrameName((CCSpritePlus *)v3, (const char *)this) )
{
v8 = 0;
v9 = 0;
v10 = nullptr;
v4 = strlen((const char *)this);
std::string::__init(&v8, this, v4);
if ( (__int64 *)(v3 + 624) != &v8 )
{
if ( (v8 & 1) != 0 )
{
v6 = (char *)v10;
v5 = v9;
}
else
{
v5 = (unsigned __int8)v8 >> 1;
v6 = (char *)&v8 + 1;
}
std::string::assign((__int64 *)(v3 + 624), v6, v5);
}
if ( (v8 & 1) != 0 )
operator delete(v10);
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v3);
return v3;
}
else
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 16LL))(v3);
return 0;
}
}