//
// cocos2d::CCDictionary::removeObjectsForKeys from 0x10030fb20 to 0x10030fc43 (291 bytes)
//
// 3 xrefs:
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromDictionary @ 0x10031db21
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromTexture @ 0x10031ddf1
// > cocos2d::CCTextureCache::removeTexture @ 0x1005eee57
//
// 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
//
void __fastcall cocos2d::CCDictionary::removeObjectsForKeys(cocos2d::CCDictionary *a1, cocos2d::CCArray *a2)
{
double v2; // xmm0_8
cocos2d::ccArray *data; // rax
cocos2d::CCDictionary *v4; // r14
cocos2d::CCString **arr; // rbx
const char *CString; // r12
size_t v7; // rax
size_t v8; // r15
char *v9; // r13
__int64 v10; // rax
size_t v11; // r14
unsigned __int64 v12; // [rsp+0h] [rbp-50h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
if ( a2 )
{
data = a2->data;
if ( data->num )
{
v4 = a1;
arr = (cocos2d::CCString **)data->arr;
v12 = (unsigned __int64)&arr[data->num - 1];
do
{
if ( !*arr )
return;
CString = cocos2d::CCString::getCString(*arr);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v8 = v7;
if ( v7 >= 0x17 )
{
v10 = v7 | 7;
v11 = 26;
if ( (v8 | 7) != 0x17 )
v11 = v10 + 1;
v9 = (char *)operator new(v11);
__p = v9;
__dst[0] = v11 + 1;
__dst[1] = v8;
v4 = a1;
}
else
{
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( !v7 )
goto LABEL_14;
}
memmove(v9, CString, v8);
LABEL_14:
v9[v8] = 0;
cocos2d::CCDictionary::removeObjectForKey_1((__int64)v4, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
++arr;
}
while ( (unsigned __int64)arr <= v12 );
}
}
}