//
// cocos2d::CCTextureCache::snapshotTextures from 0x1006bfbb0 to 0x1006bfcf8 (328 bytes)
//
// 0 xrefs:
//
// 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 12:35:31 +0000
//
void *__fastcall cocos2d::CCTextureCache::snapshotTextures(__int64 a1)
{
void *v1; // r15
__int64 v2; // rax
__int64 v3; // r14
__int64 v4; // rbx
size_t v5; // rax
size_t v6; // r13
__int64 v7; // r12
char *v8; // rbx
size_t v9; // r15
void *v11; // [rsp+0h] [rbp-50h]
__int64 v12; // [rsp+8h] [rbp-48h]
_QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
v1 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v1);
v2 = *(_QWORD *)(a1 + 56);
if ( v2 )
{
v3 = *(_QWORD *)(v2 + 56);
if ( v3 )
{
v12 = *(_QWORD *)(v3 + 264);
v4 = *(_QWORD *)(v3 + 288);
v5 = strlen((const char *)v3);
if ( v5 > 0xFFFFFFFFFFFFFFF7LL )
LABEL_16:
sub_100003630();
v6 = v5;
v11 = v1;
while ( 1 )
{
v7 = v4;
if ( v6 >= 0x17 )
break;
LOBYTE(__dst[0]) = 2 * v6;
v8 = (char *)__dst + 1;
if ( v6 )
goto LABEL_11;
LABEL_12:
v8[v6] = 0;
cocos2d::CCDictionary::setObject((__int64)v1, v12, (char *)__dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
if ( !v7 )
goto LABEL_17;
v12 = *(_QWORD *)(v7 + 264);
v4 = *(_QWORD *)(v7 + 288);
v6 = strlen((const char *)v7);
v3 = v7;
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
goto LABEL_16;
}
v9 = (v6 | 7) + 1;
if ( (v6 | 7) == 0x17 )
v9 = 26;
v8 = (char *)operator new(v9);
__p = v8;
__dst[0] = v9 + 1;
v1 = v11;
__dst[1] = v6;
LABEL_11:
memmove(v8, (const void *)v3, v6);
goto LABEL_12;
}
}
LABEL_17:
cocos2d::CCObject::autorelease((__int64)v1);
return v1;
}