//
// cocos2d::CCSpriteFrameCache::removeSpriteFrameByName from 0x180094f40 to 0x1800951b0 (624 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c060c
//
// 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 11:22:09 +0000
//
// Hidden C++ exception states: #wind=2
void __fastcall cocos2d::CCSpriteFrameCache::removeSpriteFrameByName(cocos2d::CCSpriteFrameCache *this, char *a2)
{
cocos2d::CCString *v4; // rsi
void *v5; // r8
char *CString; // rax
void *v7; // rcx
char *v8; // rax
void *v9; // rcx
_QWORD *v10; // rdi
_QWORD *v11; // rbx
void *v12[3]; // [rsp+30h] [rbp-58h] BYREF
unsigned __int64 v13; // [rsp+48h] [rbp-40h]
void *Block[2]; // [rsp+50h] [rbp-38h] BYREF
__m128i si128; // [rsp+60h] [rbp-28h]
if ( a2 )
{
sub_180005A10(Block, a2);
v4 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 8), (__int64)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 )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v5);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);
LOBYTE(Block[0]) = 0;
if ( v4 )
{
CString = (char *)cocos2d::CCString::getCString(v4);
sub_180005A10(v12, CString);
cocos2d::CCDictionary::removeObjectForKey(*((cocos2d::CCDictionary **)this + 7), (char *)v12);
if ( v13 > 0xF )
{
v7 = v12[0];
if ( v13 + 1 >= 0x1000 )
{
v7 = *((void **)v12[0] - 1);
if ( (unsigned __int64)((char *)v12[0] - (char *)v7 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v7);
}
v8 = (char *)cocos2d::CCString::getCString(v4);
sub_180005A10(v12, v8);
cocos2d::CCDictionary::removeObjectForKey(*((cocos2d::CCDictionary **)this + 8), (char *)v12);
if ( v13 <= 0xF )
goto LABEL_22;
v9 = v12[0];
if ( v13 + 1 >= 0x1000 )
{
v9 = *((void **)v12[0] - 1);
if ( (unsigned __int64)((char *)v12[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
}
else
{
sub_180005A10(v12, a2);
cocos2d::CCDictionary::removeObjectForKey(*((cocos2d::CCDictionary **)this + 7), (char *)v12);
if ( v13 <= 0xF )
{
LABEL_22:
v10 = *((_QWORD **)this + 9);
v11 = (_QWORD *)*v10;
sub_180093690((__int64)v10, (__int64)v10, *(_QWORD *)(*v10 + 8LL));
v11[1] = v11;
*v11 = v11;
v11[2] = v11;
v10[1] = 0;
return;
}
v9 = v12[0];
if ( v13 + 1 >= 0x1000 )
{
v9 = *((void **)v12[0] - 1);
if ( (unsigned __int64)((char *)v12[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
}
j_j_free_0(v9);
goto LABEL_22;
}
}