//
// CCAnimateFrameCache::spriteFrameByName from 0x140041cb0 to 0x140041d5d (173 bytes)
//
// 3 xrefs:
// > CCPartAnimSprite::setDisplayFrame @ 0x140046187
// > CCPartAnimSprite::tweenToFrame @ 0x140046486
// > ??> @ 0x1406c4320
//
// 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
//
// Hidden C++ exception states: #wind=1
cocos2d::CCArray *CCAnimateFrameCache::spriteFrameByName(CCAnimateFrameCache *a1, const char *a2)
{
size_t v3; // r8
cocos2d::CCArray *v4; // rbx
void *v5; // rcx
void *Block[2]; // [rsp+20h] [rbp-38h] BYREF
__int128 v8; // [rsp+30h] [rbp-28h]
*(_OWORD *)Block = 0;
v8 = 0;
v3 = -1;
do
++v3;
while ( a2[v3] );
sub_14003A930(Block, a2, v3);
v4 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_animateFrames, Block);
if ( *((_QWORD *)&v8 + 1) > 0xFu )
{
v5 = Block[0];
if ( (unsigned __int64)(*((_QWORD *)&v8 + 1) + 1LL) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v5);
}
return v4;
}