//
// cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary from 0xb197b8 to 0xb1a718 (3936 bytes)
//
// 3 xrefs:
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0xb1a754
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0xb1bc90
// > ??> @ 0x74208
//
// 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 cocos2d::CCSpriteFrameCache::addSpriteFramesWithDictionary(
cocos2d::CCSpriteFrameCache *a1,
cocos2d::CCDictionary *a2,
cocos2d::CCTexture2D *a3)
{
__int64 v5; // x22
void *v6; // x0
__int64 v7; // x19
void *v8; // x0
cocos2d::CCString *v9; // x0
int v10; // w26
void *v11; // x0
__int64 v12; // x22
__int64 v13; // x28
char *v14; // x1
__int64 v15; // x22
cocos2d::CCSpriteFrame *v16; // x27
const char *v17; // x1
char *v18; // x0
unsigned int *v19; // x1
int v20; // w2
cocos2d::CCObject *v21; // x22
unsigned int *v22; // x1
cocos2d::CCString *v23; // x0
float v24; // s0
void *v25; // x0
float v26; // s11
cocos2d::CCString *v27; // x0
float v28; // s0
void *v29; // x0
float v30; // s10
cocos2d::CCString *v31; // x0
float v32; // s0
void *v33; // x0
float v34; // s13
cocos2d::CCString *v35; // x0
float v36; // s0
void *v37; // x0
float v38; // s12
cocos2d::CCString *v39; // x0
float v40; // s0
void *v41; // x0
float v42; // s9
cocos2d::CCString *v43; // x0
float v44; // s0
void *v45; // x0
float v46; // s8
cocos2d::CCString *v47; // x0
void *v48; // x0
cocos2d::CCString *v49; // x0
void *v50; // x0
__int64 v51; // x0
unsigned int *v52; // x1
int v53; // w2
unsigned int *v54; // x1
int v55; // w2
cocos2d::CCString *v56; // x0
const char *CString; // x0
char *v58; // x0
const char **v59; // x27
cocos2d::CCString *v60; // x0
const char *v61; // x0
const char *v62; // x1
char *v63; // x0
const char **v64; // x27
cocos2d::CCString *v65; // x0
const char *v66; // x0
const char *v67; // x1
char *v68; // x0
__int64 v69; // x0
cocos2d::CCTexture2D *v70; // x1
bool v71; // w3
cocos2d::CCString *v72; // x0
const char *v73; // x0
void *v74; // x0
cocos2d::CCString *v75; // x0
const char *v76; // x0
void *v77; // x0
cocos2d::CCString *v78; // x0
const char *v79; // x0
void *v80; // x0
cocos2d::CCString *v81; // x0
const char *v82; // x0
void *v83; // x0
cocos2d::CCString *v84; // x0
__int64 v85; // x3
void *v86; // x0
void *v87; // x0
__int64 v88; // x3
cocos2d::CCObject *v89; // x22
__int64 v90; // x0
float width; // s0
float height; // s1
float *v93; // x2
float v94; // s2
float v95; // s3
unsigned int *v96; // x1
int v97; // w2
unsigned int *v98; // x1
int v99; // w2
unsigned int *v100; // x1
int v101; // w2
unsigned int *v102; // x1
int v103; // w2
unsigned int *v104; // x1
int v105; // w2
unsigned int *v106; // x1
int v107; // w2
unsigned int *v108; // x1
int v109; // w2
unsigned int *v110; // x1
int v111; // w2
unsigned int *v112; // x1
int v113; // w2
const char **v114; // x27
cocos2d::CCString *v115; // x0
bool v116; // w0
const char *v117; // x1
char *v118; // x0
unsigned int *v119; // x1
int v120; // w2
unsigned int *v121; // x1
int v122; // w2
unsigned int *v123; // x1
int v124; // w2
unsigned int *v125; // x1
int v126; // w2
unsigned int *v127; // x1
int v128; // w2
unsigned int *v129; // x1
int v130; // w2
unsigned int *v131; // x1
int v132; // w2
unsigned int *v133; // x1
int v134; // w2
unsigned int *v135; // x1
int v136; // w2
unsigned int *v137; // x1
int v138; // w2
_QWORD v139[20]; // [xsp+0h] [xbp+0h] BYREF
bool v140[8]; // [xsp+A0h] [xbp+A0h]
cocos2d::CCPoint *v141; // [xsp+A8h] [xbp+A8h]
char *v142; // [xsp+B0h] [xbp+B0h]
char *v143; // [xsp+B8h] [xbp+B8h]
float *v144; // [xsp+C0h] [xbp+C0h]
cocos2d::CCTexture2D *v145; // [xsp+C8h] [xbp+C8h]
unsigned int v146; // [xsp+D4h] [xbp+D4h]
cocos2d::CCSize *v147; // [xsp+D8h] [xbp+D8h]
char v148; // [xsp+F0h] [xbp+F0h] BYREF
const char *v149; // [xsp+F8h] [xbp+F8h] BYREF
char v150; // [xsp+100h] [xbp+100h] BYREF
char v151; // [xsp+108h] [xbp+108h] BYREF
cocos2d::CCPoint v152; // [xsp+110h] [xbp+110h] BYREF
const char *v153[2]; // [xsp+118h] [xbp+118h] BYREF
cocos2d::CCRect v154; // [xsp+128h] [xbp+128h] BYREF
v145 = a3;
sub_D153B8((int)&v154, "metadata");
v5 = cocos2d::CCDictionary::objectForKey((__int64)a2, (const char **)&v154);
v6 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v96 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v97 = __ldaxr(v96);
while ( __stlxr(v97 - 1, v96) );
}
else
{
v97 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v97 - 1;
}
if ( v97 <= 0 )
operator delete(v6);
}
sub_D153B8((int)&v154, "frames");
v7 = cocos2d::CCDictionary::objectForKey((__int64)a2, (const char **)&v154);
v8 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v52 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v53 = __ldaxr(v52);
while ( __stlxr(v53 - 1, v52) );
}
else
{
v53 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v53 - 1;
}
if ( v53 <= 0 )
operator delete(v8);
}
if ( v5 )
{
sub_D153B8((int)&v154, "format");
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, (const char **)&v154);
v10 = cocos2d::CCString::intValue(v9);
v11 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v54 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v55 = __ldaxr(v54);
while ( __stlxr(v55 - 1, v54) );
}
else
{
v55 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v55 - 1;
}
if ( v55 <= 0 )
operator delete(v11);
}
}
else
{
v10 = 0;
}
if ( v7 )
{
v12 = *(_QWORD *)(v7 + 56);
if ( v12 )
{
v146 = v10 - 1;
v13 = *(_QWORD *)(v12 + 288);
v143 = "spriteSize";
v144 = (float *)&v150;
v142 = "spriteOffset";
while ( 1 )
{
v14 = (char *)v12;
v15 = *(_QWORD *)(v12 + 264);
sub_D153B8((unsigned int)v139 + 248, v14);
v16 = (cocos2d::CCSpriteFrame *)cocos2d::CCDictionary::objectForKey((__int64)a1[1].__vftable, &v149);
if ( v16 )
{
v17 = v149;
v18 = (char *)(v149 - 24);
if ( v149 - 24 == (const char *)&qword_124B6B0 )
goto LABEL_10;
if ( !&pthread_create )
goto LABEL_38;
v19 = (unsigned int *)(v149 - 8);
do
v20 = __ldaxr(v19);
while ( __stlxr(v20 - 1, v19) );
}
else
{
if ( v10 )
{
if ( v146 <= 1 )
{
v141 = (cocos2d::CCPoint *)&v151;
v147 = (cocos2d::CCSize *)v153;
sub_D153B8((int)v153, "frame");
v56 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, v153);
CString = cocos2d::CCString::getCString(v56);
cocos2d::CCRectFromString(CString);
v58 = (char *)(v153[0] - 24);
if ( (__int64 *)v153[0] - 3 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v121 = (unsigned int *)(v153[0] - 8);
do
v122 = __ldaxr(v121);
while ( __stlxr(v122 - 1, v121) );
}
else
{
v122 = *((_DWORD *)v153[0] - 2);
*((_DWORD *)v153[0] - 2) = v122 - 1;
}
if ( v122 <= 0 )
operator delete(v58);
}
*(_DWORD *)v140 = 0;
if ( v10 == 2 )
{
v114 = (const char **)v147;
sub_D153B8((int)v147, "rotated");
v115 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, v114);
v116 = cocos2d::CCString::boolValue(v115);
v117 = *v114;
*(_DWORD *)v140 = v116;
v118 = (char *)(v117 - 24);
if ( v117 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v119 = (unsigned int *)(v117 - 8);
do
v120 = __ldaxr(v119);
while ( __stlxr(v120 - 1, v119) );
}
else
{
v120 = *((_DWORD *)v117 - 2);
*((_DWORD *)v117 - 2) = v120 - 1;
}
if ( v120 <= 0 )
operator delete(v118);
}
}
v59 = (const char **)v147;
sub_D153B8((int)v147, "offset");
v60 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, v59);
v61 = cocos2d::CCString::getCString(v60);
cocos2d::CCPointFromString(v61);
v62 = *v59;
v63 = (char *)(*v59 - 24);
if ( v63 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v125 = (unsigned int *)(v62 - 8);
do
v126 = __ldaxr(v125);
while ( __stlxr(v126 - 1, v125) );
}
else
{
v126 = *((_DWORD *)v62 - 2);
*((_DWORD *)v62 - 2) = v126 - 1;
}
if ( v126 <= 0 )
operator delete(v63);
}
v64 = (const char **)v147;
sub_D153B8((int)v147, "sourceSize");
v65 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, v64);
v66 = cocos2d::CCString::getCString(v65);
cocos2d::CCSizeFromString(v66);
v67 = *v64;
v68 = (char *)(*v64 - 24);
if ( v68 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v123 = (unsigned int *)(v67 - 8);
do
v124 = __ldaxr(v123);
while ( __stlxr(v124 - 1, v123) );
}
else
{
v124 = *((_DWORD *)v67 - 2);
*((_DWORD *)v67 - 2) = v124 - 1;
}
if ( v124 <= 0 )
operator delete(v68);
}
v69 = operator new(0x98u);
*(_QWORD *)(v69 + 144) = 0;
*(_QWORD *)v69 = 0;
*(_QWORD *)(v69 + 8) = 0;
*(_QWORD *)(v69 + 16) = 0;
*(_QWORD *)(v69 + 24) = 0;
*(_QWORD *)(v69 + 32) = 0;
*(_QWORD *)(v69 + 40) = 0;
*(_QWORD *)(v69 + 48) = 0;
*(_QWORD *)(v69 + 56) = 0;
*(_QWORD *)(v69 + 64) = 0;
*(_QWORD *)(v69 + 72) = 0;
*(_QWORD *)(v69 + 80) = 0;
*(_QWORD *)(v69 + 88) = 0;
*(_QWORD *)(v69 + 96) = 0;
*(_QWORD *)(v69 + 104) = 0;
*(_QWORD *)(v69 + 112) = 0;
*(_QWORD *)(v69 + 120) = 0;
*(_QWORD *)(v69 + 128) = 0;
*(_QWORD *)(v69 + 136) = 0;
v16 = (cocos2d::CCSpriteFrame *)v69;
v21 = (cocos2d::CCObject *)v69;
cocos2d::CCObject::CCObject((cocos2d::CCObject *)v69);
v16->__vftable = (cocos2d::CCSpriteFrame_vtbl *)&off_1218EE0;
cocos2d::CCPoint::CCPoint(&v16->m_obOffset);
cocos2d::CCSize::CCSize(&v16->m_obOriginalSize);
cocos2d::CCRect::CCRect(&v16->m_obRectInPixels);
cocos2d::CCRect::CCRect(&v16->m_obRect);
cocos2d::CCPoint::CCPoint(&v16->m_obOffsetInPixels);
cocos2d::CCSize::CCSize(&v16->m_obOriginalSizeInPixels);
v70 = v145;
v71 = v140[0];
v16->m_strTextureFilename.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
v16->m_strFrameName.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
cocos2d::CCSpriteFrame::initWithTexture(v16, v70, &v154, v71, v141, (cocos2d::CCSize *)&v152);
}
else if ( v10 == 3 )
{
sub_D153B8((int)&v154, v143);
v72 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v73 = cocos2d::CCString::getCString(v72);
cocos2d::CCSizeFromString(v73);
v74 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) == &qword_124B6B0 )
goto LABEL_55;
if ( &pthread_create )
{
v131 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v132 = __ldaxr(v131);
while ( __stlxr(v132 - 1, v131) );
}
else
{
v132 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v132 - 1;
}
if ( v132 > 0 )
{
LABEL_55:
v147 = (cocos2d::CCSize *)v153;
}
else
{
v147 = (cocos2d::CCSize *)v153;
operator delete(v74);
}
v141 = (cocos2d::CCPoint *)&v151;
sub_D153B8((int)&v154, v142);
v75 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v76 = cocos2d::CCString::getCString(v75);
cocos2d::CCPointFromString(v76);
v77 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v129 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v130 = __ldaxr(v129);
while ( __stlxr(v130 - 1, v129) );
}
else
{
v130 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v130 - 1;
}
if ( v130 <= 0 )
operator delete(v77);
}
v139[19] = &v148;
sub_D153B8((int)&v154, "spriteSourceSize");
v78 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v79 = cocos2d::CCString::getCString(v78);
cocos2d::CCSizeFromString(v79);
v80 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v127 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v128 = __ldaxr(v127);
while ( __stlxr(v128 - 1, v127) );
}
else
{
v128 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v128 - 1;
}
if ( v128 <= 0 )
operator delete(v80);
}
sub_D153B8((int)&v154, "textureRect");
v81 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v82 = cocos2d::CCString::getCString(v81);
cocos2d::CCRectFromString(v82);
v83 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v137 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v138 = __ldaxr(v137);
while ( __stlxr(v138 - 1, v137) );
}
else
{
v138 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v138 - 1;
}
if ( v138 <= 0 )
operator delete(v83);
}
sub_D153B8((int)&v154, "textureRotated");
v84 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v85 = cocos2d::CCString::boolValue(v84);
v86 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v133 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v134 = __ldaxr(v133);
while ( __stlxr(v134 - 1, v133) );
}
else
{
v134 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v134 - 1;
}
if ( v134 <= 0 )
{
*(_QWORD *)v140 = v85;
operator delete(v86);
v85 = *(_QWORD *)v140;
}
}
*(_QWORD *)v140 = v85;
sub_D153B8((int)&v154, "aliases");
cocos2d::CCDictionary::objectForKey(v15, (const char **)&v154);
v87 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v88 = *(_QWORD *)v140;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v135 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v136 = __ldaxr(v135);
while ( __stlxr(v136 - 1, v135) );
}
else
{
v136 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v136 - 1;
}
if ( v136 <= 0 )
{
*(_QWORD *)v140 = v88;
operator delete(v87);
v88 = *(_QWORD *)v140;
}
}
*(_QWORD *)v140 = v88;
v89 = (cocos2d::CCObject *)operator new(0x40u);
cocos2d::CCString::CCString(v89);
cocos2d::CCObject::release(v89);
v90 = operator new(0x98u);
*(_QWORD *)(v90 + 144) = 0;
*(_QWORD *)v90 = 0;
*(_QWORD *)(v90 + 8) = 0;
*(_QWORD *)(v90 + 16) = 0;
*(_QWORD *)(v90 + 24) = 0;
*(_QWORD *)(v90 + 32) = 0;
*(_QWORD *)(v90 + 40) = 0;
*(_QWORD *)(v90 + 48) = 0;
*(_QWORD *)(v90 + 56) = 0;
*(_QWORD *)(v90 + 64) = 0;
*(_QWORD *)(v90 + 72) = 0;
*(_QWORD *)(v90 + 80) = 0;
*(_QWORD *)(v90 + 88) = 0;
*(_QWORD *)(v90 + 96) = 0;
*(_QWORD *)(v90 + 104) = 0;
*(_QWORD *)(v90 + 112) = 0;
*(_QWORD *)(v90 + 120) = 0;
*(_QWORD *)(v90 + 128) = 0;
*(_QWORD *)(v90 + 136) = 0;
v16 = (cocos2d::CCSpriteFrame *)v90;
v21 = (cocos2d::CCObject *)v90;
cocos2d::CCObject::CCObject((cocos2d::CCObject *)v90);
v16->__vftable = (cocos2d::CCSpriteFrame_vtbl *)&off_1218EE0;
cocos2d::CCPoint::CCPoint(&v16->m_obOffset);
cocos2d::CCSize::CCSize(&v16->m_obOriginalSize);
cocos2d::CCRect::CCRect(&v16->m_obRectInPixels);
cocos2d::CCRect::CCRect(&v16->m_obRect);
cocos2d::CCPoint::CCPoint(&v16->m_obOffsetInPixels);
cocos2d::CCSize::CCSize(&v16->m_obOriginalSizeInPixels);
width = v147->width;
height = v147->height;
v93 = v144;
v94 = *v144;
v16->m_strTextureFilename.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
v95 = v93[1];
v16->m_strFrameName.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
cocos2d::CCRect::CCRect(&v154, width, height, v94, v95);
cocos2d::CCSpriteFrame::initWithTexture(v16, v145, &v154, v140[0], v141, (cocos2d::CCSize *)&v152);
}
else
{
v21 = nullptr;
}
}
else
{
sub_D153B8((int)&v154, "x");
v23 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v24 = cocos2d::CCString::floatValue(v23);
v25 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v26 = v24;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) == &qword_124B6B0 )
goto LABEL_28;
if ( &pthread_create )
{
v112 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v113 = __ldaxr(v112);
while ( __stlxr(v113 - 1, v112) );
}
else
{
v113 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v113 - 1;
}
if ( v113 > 0 )
{
LABEL_28:
v147 = (cocos2d::CCSize *)v153;
}
else
{
v147 = (cocos2d::CCSize *)v153;
operator delete(v25);
}
sub_D153B8((int)&v154, "y");
v27 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v28 = cocos2d::CCString::floatValue(v27);
v29 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v30 = v28;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v102 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v103 = __ldaxr(v102);
while ( __stlxr(v103 - 1, v102) );
}
else
{
v103 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v103 - 1;
}
if ( v103 <= 0 )
operator delete(v29);
}
sub_D153B8((int)&v154, "width");
v31 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v32 = cocos2d::CCString::floatValue(v31);
v33 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v34 = v32;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v106 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v107 = __ldaxr(v106);
while ( __stlxr(v107 - 1, v106) );
}
else
{
v107 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v107 - 1;
}
if ( v107 <= 0 )
operator delete(v33);
}
sub_D153B8((int)&v154, "height");
v35 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v36 = cocos2d::CCString::floatValue(v35);
v37 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v38 = v36;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v110 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v111 = __ldaxr(v110);
while ( __stlxr(v111 - 1, v110) );
}
else
{
v111 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v111 - 1;
}
if ( v111 <= 0 )
operator delete(v37);
}
sub_D153B8((int)&v154, "offsetX");
v39 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v40 = cocos2d::CCString::floatValue(v39);
v41 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v42 = v40;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v108 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v109 = __ldaxr(v108);
while ( __stlxr(v109 - 1, v108) );
}
else
{
v109 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v109 - 1;
}
if ( v109 <= 0 )
operator delete(v41);
}
sub_D153B8((int)&v154, "offsetY");
v43 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
v44 = cocos2d::CCString::floatValue(v43);
v45 = (void *)(*(_QWORD *)&v154.origin - 24LL);
v46 = v44;
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v100 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v101 = __ldaxr(v100);
while ( __stlxr(v101 - 1, v100) );
}
else
{
v101 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v101 - 1;
}
if ( v101 <= 0 )
operator delete(v45);
}
sub_D153B8((int)&v154, "originalWidth");
v47 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
LODWORD(v141) = cocos2d::CCString::intValue(v47);
v48 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v104 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v105 = __ldaxr(v104);
while ( __stlxr(v105 - 1, v104) );
}
else
{
v105 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v105 - 1;
}
if ( v105 <= 0 )
operator delete(v48);
}
sub_D153B8((int)&v154, "originalHeight");
v49 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v15, (const char **)&v154);
*(_DWORD *)v140 = cocos2d::CCString::intValue(v49);
v50 = (void *)(*(_QWORD *)&v154.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v154.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v98 = (unsigned int *)(*(_QWORD *)&v154.origin - 8LL);
do
v99 = __ldaxr(v98);
while ( __stlxr(v99 - 1, v98) );
}
else
{
v99 = *(_DWORD *)(*(_QWORD *)&v154.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v154.origin - 8LL) = v99 - 1;
}
if ( v99 <= 0 )
operator delete(v50);
}
v51 = operator new(0x98u);
*(_QWORD *)(v51 + 144) = 0;
*(_QWORD *)v51 = 0;
*(_QWORD *)(v51 + 8) = 0;
*(_QWORD *)(v51 + 16) = 0;
*(_QWORD *)(v51 + 24) = 0;
*(_QWORD *)(v51 + 32) = 0;
*(_QWORD *)(v51 + 40) = 0;
*(_QWORD *)(v51 + 48) = 0;
*(_QWORD *)(v51 + 56) = 0;
*(_QWORD *)(v51 + 64) = 0;
*(_QWORD *)(v51 + 72) = 0;
*(_QWORD *)(v51 + 80) = 0;
*(_QWORD *)(v51 + 88) = 0;
*(_QWORD *)(v51 + 96) = 0;
*(_QWORD *)(v51 + 104) = 0;
*(_QWORD *)(v51 + 112) = 0;
*(_QWORD *)(v51 + 120) = 0;
*(_QWORD *)(v51 + 128) = 0;
*(_QWORD *)(v51 + 136) = 0;
v16 = (cocos2d::CCSpriteFrame *)v51;
v21 = (cocos2d::CCObject *)v51;
cocos2d::CCObject::CCObject((cocos2d::CCObject *)v51);
v16->__vftable = (cocos2d::CCSpriteFrame_vtbl *)&off_1218EE0;
cocos2d::CCPoint::CCPoint(&v16->m_obOffset);
cocos2d::CCSize::CCSize(&v16->m_obOriginalSize);
cocos2d::CCRect::CCRect(&v16->m_obRectInPixels);
cocos2d::CCRect::CCRect(&v16->m_obRect);
cocos2d::CCPoint::CCPoint(&v16->m_obOffsetInPixels);
cocos2d::CCSize::CCSize(&v16->m_obOriginalSizeInPixels);
v16->m_strTextureFilename.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
v16->m_strFrameName.m_data.m_data = (stl::StringData::Internal *)&byte_124B6C8;
cocos2d::CCRect::CCRect(&v154, v26, v30, v34, v38);
cocos2d::CCPoint::CCPoint(&v152, v42, v46);
cocos2d::CCSize::CCSize(v147, (float)(int)abs32((int)v141), (float)(int)abs32(*(int *)v140));
cocos2d::CCSpriteFrame::initWithTexture(v16, v145, &v154, 0, &v152, v147);
}
cocos2d::CCDictionary::setObject((__int64)a1[1].__vftable, v16, &v149);
cocos2d::CCObject::release(v21);
v17 = v149;
v18 = (char *)(v149 - 24);
if ( v149 - 24 == (const char *)&qword_124B6B0 )
{
LABEL_10:
if ( !v13 )
return;
goto LABEL_11;
}
if ( !&pthread_create )
{
LABEL_38:
v20 = *((_DWORD *)v17 - 2);
*((_DWORD *)v17 - 2) = v20 - 1;
goto LABEL_15;
}
v22 = (unsigned int *)(v149 - 8);
do
v20 = __ldaxr(v22);
while ( __stlxr(v20 - 1, v22) );
}
LABEL_15:
if ( v20 > 0 )
goto LABEL_10;
operator delete(v18);
if ( !v13 )
return;
LABEL_11:
v12 = v13;
v13 = *(_QWORD *)(v13 + 288);
}
}
}
}