//
// cocos2d::CCSpriteFrameCache::spriteFrameByName from 0x180092820 to 0x1800929a9 (393 bytes)
//
// 6 xrefs:
// > cocos2d::CCAnimationCache::parseVersion1 @ 0x18008a9a3
// > cocos2d::CCAnimationCache::parseVersion2 @ 0x18008add5
// > cocos2d::CCSprite::createWithSpriteFrameName @ 0x18008b6d4
// > cocos2d::CCSprite::initWithSpriteFrameName @ 0x18008bc5b
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b63d8
//
// 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=2
struct cocos2d::CCSpriteFrame *__fastcall cocos2d::CCSpriteFrameCache::spriteFrameByName(
cocos2d::CCSpriteFrameCache *this,
char *a2)
{
__int64 v4; // rbx
void *v5; // rcx
cocos2d::CCString *v6; // rdi
void *v7; // rcx
std::string *CString; // rax
void *v9; // rcx
void *Block[2]; // [rsp+20h] [rbp-58h] BYREF
__m128i si128; // [rsp+30h] [rbp-48h]
void *v13[3]; // [rsp+40h] [rbp-38h] BYREF
unsigned __int64 v14; // [rsp+58h] [rbp-20h]
sub_180005910(Block, a2);
v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 7), (unsigned __int8 *)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v5 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v5 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v5);
}
if ( !v4 )
{
sub_180005910(Block, a2);
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 8), (unsigned __int8 *)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v7 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v7 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v7);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);
LOBYTE(Block[0]) = 0;
if ( v6 )
{
CString = cocos2d::CCString::getCString(v6);
sub_180005910(v13, CString);
v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 7), (unsigned __int8 *)v13);
if ( v14 > 0xF )
{
v9 = v13[0];
if ( v14 + 1 >= 0x1000 )
{
v9 = *((void **)v13[0] - 1);
if ( (unsigned __int64)((char *)v13[0] - (char *)v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v9);
}
}
}
return (struct cocos2d::CCSpriteFrame *)v4;
}