//
// WorldLevelPage::init from 0x961980 to 0x962928 (4008 bytes)
//
// 2 xrefs:
// > WorldLevelPage::create @ 0x962a40
// > ??> @ 0x9d5a8
//
// 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
//
bool WorldLevelPage::init(WorldLevelPage *a1, GJGameLevel *a2, GJWorldNode *a3)
{
cocos2d::CCDirector *v5; // x0
cocos2d::CCNode *v6; // x24
void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x26
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
cocos2d::CCLabelBMFont *v9; // x24
void *v10; // x0
void (__fastcall *v11)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x26
cocos2d::CCLabelBMFont *v12; // x26
void *v13; // x0
int v14; // w19
void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // x25
cocos2d::CCLabelBMFont *v16; // x0
const cocos2d::CCPoint *(__fastcall *getPosition)(cocos2d::CCNode *__hidden); // x1
void (__fastcall *v18)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x24
__int64 v19; // x25
cocos2d::CCSprite *v20; // x26
void (__fastcall *v21)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25
void (__fastcall *v22)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x19
const char *v23; // x1
cocos2d::CCNode *v24; // x25
void (__fastcall *v25)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
const char *v26; // x1
__int64 v27; // x0
__int64 v28; // x20
cocos2d::CCNode *v29; // x26
float v30; // s8
void (__fastcall *setAnchorPoint)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
void (__fastcall *v32)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
__int64 v33; // x0
const char *v34; // x1
cocos2d::CCNode *v35; // x28
void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19
__int64 v37; // x20
const char *v38; // x1
float *v39; // x19
void (__fastcall *v40)(float *, cocos2d::CCRect *); // x6
void (__fastcall *v41)(float *, cocos2d::CCRect *); // x20
void (__fastcall *v42)(float *, __int64); // x20
__int64 v43; // x0
cocos2d::CCLabelBMFont *v44; // x24
__int64 v45; // x0
cocos2d::CCLabelBMFont *v46; // x20
__int64 v47; // x0
cocos2d::CCLabelBMFont *v48; // x25
int NormalPercent; // w0
float v50; // s2
float (__fastcall *getPositionY)(cocos2d::CCNode *__hidden); // x25
float v52; // s2
void (__fastcall *v53)(float *, cocos2d::CCRect *); // x25
unsigned int v54; // w0
cocos2d::CCString *v55; // x0
const char *CString; // x0
cocos2d::CCString *v57; // x0
const char *v58; // x0
cocos2d::CCArray *v59; // x0
cocos2d::CCArray *v60; // x24
_BOOL4 v61; // w25
char *v62; // x1
int v63; // w20
cocos2d::CCSprite *v64; // x19
cocos2d::CCSprite *v65; // x0
CCMenuItemSpriteExtra *v66; // x19
cocos2d::CCMenu *v67; // x19
float v68; // s1
void (__fastcall *v69)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
cocos2d::CCSprite *v70; // x19
CCMenuItemSpriteExtra *v71; // x19
cocos2d::CCMenu *m_buttonMenu; // x21
void (__fastcall *v73)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
cocos2d::CCSprite *v74; // x19
CCMenuItemSpriteExtra *v75; // x20
cocos2d::CCMenu *v76; // x21
void (__fastcall *v77)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x19
cocos2d::CCSprite *v78; // x0
CCMenuItemSpriteExtra *v79; // x19
cocos2d::CCMenu *v80; // x21
void (__fastcall *v81)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x20
char *v82; // x20
float v84; // s0
void (__fastcall *v85)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // x25
unsigned int *v86; // x19
int v87; // w0
unsigned int *v88; // x1
int v89; // w2
unsigned int *v90; // x1
int v91; // w2
cocos2d::CCLabelBMFont *v92; // [xsp+A0h] [xbp+A0h]
void (__fastcall *v93)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+A8h] [xbp+A8h]
void (__fastcall *v94)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B0h] [xbp+B0h]
void (__fastcall *v95)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B0h] [xbp+B0h]
cocos2d::CCLabelBMFont *v96; // [xsp+B0h] [xbp+B0h]
__int64 v97; // [xsp+B0h] [xbp+B0h]
void (__fastcall *v98)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [xsp+B0h] [xbp+B0h]
__int64 v99; // [xsp+B8h] [xbp+B8h]
char v100; // [xsp+C7h] [xbp+C7h]
char *v102; // [xsp+C8h] [xbp+C8h]
_BYTE v103[8]; // [xsp+D8h] [xbp+D8h] BYREF
float v104; // [xsp+E0h] [xbp+E0h]
float v105; // [xsp+E4h] [xbp+E4h]
const char *v106; // [xsp+E8h] [xbp+E8h] BYREF
cocos2d::CCPoint v107; // [xsp+F0h] [xbp+F0h] BYREF
cocos2d::CCRect v108; // [xsp+F8h] [xbp+F8h] BYREF
cocos2d::CCPoint v109; // 0:kr08_8.8
cocos2d::CCPoint v110; // 0:kr10_8.8
cocos2d::CCPoint v111; // 0:kr18_8.8
cocos2d::SEL_MenuHandler v112; // 0:x2.16
cocos2d::SEL_MenuHandler v113; // 0:x2.16
cocos2d::SEL_MenuHandler v114; // 0:x2.16
cocos2d::SEL_MenuHandler v115; // 0:x2.16
cocos2d::CCPoint v116; // 0:s1.4,4:s2.4
cocos2d::CCRect v117; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4
FLAlertLayer::incrementForcePrio(a1);
v100 = FLAlertLayer::init(a1, 0x7Du);
if ( !v100 )
return v100;
a1->m_worldNode = a3;
if ( a2 )
{
a1->m_level = a2;
cocos2d::CCObject::retain(a2);
}
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v5);
cocos2d::CCRect::CCRect(&v108, 0.0, 0.0, 80.0, 80.0);
v6 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create(
(cocos2d::extension::CCScale9Sprite *)"GJ_square01.png",
(const char *)&v108,
v117);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v6->__vftable[1].~CCNode_0)(v6, 0xFFFFFFFFLL);
setContentSize = v6->setContentSize;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v108, 320.0, 260.0);
setContentSize(v6, (const cocos2d::CCSize *)&v108);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v6, -1);
setPosition = v6->setPosition;
cocos2d::CCPoint::CCPoint(&v108.origin, v104 * 0.5, v105 * 0.5);
setPosition(v6, &v108.origin);
sub_D18D28(&v108);
v9 = cocos2d::CCLabelBMFont::create();
v10 = (void *)(*(_QWORD *)&v108.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v108.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v90 = (unsigned int *)(*(_QWORD *)&v108.origin - 8LL);
do
v91 = __ldaxr(v90);
while ( __stlxr(v91 - 1, v90) );
}
else
{
v91 = *(_DWORD *)(*(_QWORD *)&v108.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v108.origin - 8LL) = v91 - 1;
}
if ( v91 <= 0 )
operator delete(v10);
}
cocos2d::CCLabelBMFont::limitLabelWidth(v9, 220.0, 0.0, 0.0);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v9, 1);
v11 = v9->setPosition;
cocos2d::CCPoint::CCPoint(&v108.origin, v104 * 0.5, (float)((float)(v105 * 0.5) + 130.0) - 25.0);
v11(v9, &v108.origin);
sub_D18D28(&v108);
v12 = cocos2d::CCLabelBMFont::create();
v13 = (void *)(*(_QWORD *)&v108.origin - 24LL);
if ( (__int64 *)(*(_QWORD *)&v108.origin - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v88 = (unsigned int *)(*(_QWORD *)&v108.origin - 8LL);
do
v89 = __ldaxr(v88);
while ( __stlxr(v89 - 1, v88) );
}
else
{
v89 = *(_DWORD *)(*(_QWORD *)&v108.origin - 8LL);
*(_DWORD *)(*(_QWORD *)&v108.origin - 8LL) = v89 - 1;
}
if ( v89 <= 0 )
operator delete(v13);
}
v14 = 1;
setScale = v12->setScale;
v9->getScale(v9);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))setScale)(v12);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v12, 0);
v16 = v9;
getPosition = v9->getPosition;
v18 = v12->setPosition;
v19 = (__int64)getPosition(v16);
cocos2d::CCPoint::CCPoint(&v107, 0.0, -2.0);
cocos2d::CCPoint::operator+(&v108, v19, &v107);
v18(v12, &v108.origin);
v12->setColor(v12, (const cocos2d::ccColor3B *)&unk_EFA748);
v12->setOpacity(v12, 50);
while ( 1 )
{
while ( 1 )
{
v20 = cocos2d::CCSprite::createWithSpriteFrameName("dailyLevelCorner_001.png");
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v20, 8);
if ( v14 != 3 )
break;
cocos2d::CCSprite::setFlipX(v20, 1);
cocos2d::CCSprite::setFlipY(v20, 1);
v84 = 135.0;
LABEL_28:
++v14;
v85 = v20->setPosition;
cocos2d::CCPoint::CCPoint(&v108.origin, v84 + (float)(v104 * 0.5), (float)(v105 * 0.5) + 105.0);
v85(v20, &v108.origin);
}
if ( v14 == 4 )
break;
if ( v14 == 2 )
{
cocos2d::CCSprite::setFlipY(v20, 1);
v84 = -135.0;
goto LABEL_28;
}
v21 = v20->setPosition;
cocos2d::CCPoint::CCPoint(&v108.origin, (float)(v104 * 0.5) + -135.0, (float)(v105 * 0.5) + -105.0);
v21(v20, &v108.origin);
++v14;
}
cocos2d::CCSprite::setFlipX(v20, 1);
v22 = v20->setPosition;
cocos2d::CCPoint::CCPoint(&v108.origin, (float)(v104 * 0.5) + 135.0, (float)(v105 * 0.5) + -105.0);
v22(v20, &v108.origin);
v103[0] = 0;
v103[1] = 0;
v103[2] = 0;
v24 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v23);
((void (__fastcall *)(cocos2d::CCNode *, _BYTE *))v24->__vftable[1].getTag)(v24, v103);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v24->__vftable[1].~CCNode_0)(v24, 125);
v24->setScale(v24, 0.8);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v24, 3);
v25 = v24->setPosition;
cocos2d::CCPoint::CCPoint(&v108.origin, v104 * 0.5, (float)(v105 * 0.5) + -48.0);
v25(v24, &v108.origin);
v27 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v26);
v28 = v27 + 424;
v99 = v27 + 424;
v29 = (cocos2d::CCNode *)v27;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v27 + 128LL))(v27, 0.992);
v29->setScaleY(v29, 0.86);
((void (__fastcall *)(cocos2d::CCNode *, void *))v29->__vftable[1].getTag)(v29, &unk_EFA750);
v30 = *(float *)(v28 + 8);
v24->addChild_0(v24, v29, 1);
setAnchorPoint = v29->setAnchorPoint;
cocos2d::CCPoint::CCPoint(&v108.origin, 0.0, 0.5);
setAnchorPoint(v29, &v108.origin);
v32 = v29->setPosition;
v33 = (__int64)v24->getContentSize(v24);
cocos2d::CCPoint::CCPoint(&v108.origin, (float)(v30 - (float)(v30 * 0.992)) * 0.5, *(float *)(v33 + 4) * 0.5);
v32(v29, &v108.origin);
v35 = (cocos2d::CCNode *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v34);
((void (__fastcall *)(cocos2d::CCNode *, _BYTE *))v35->__vftable[1].getTag)(v35, v103);
((void (__fastcall *)(cocos2d::CCNode *, __int64))v35->__vftable[1].~CCNode_0)(v35, 125);
v35->setScale(v35, 0.8);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v35, 3);
v36 = v35->setPosition;
v37 = (__int64)v24->getPosition(v24);
cocos2d::CCPoint::CCPoint(&v107, 0.0, -45.0);
cocos2d::CCPoint::operator+(&v108, v37, &v107);
v36(v35, &v108.origin);
v39 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v38);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v39 + 128LL))(v39, 0.992);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v39 + 144LL))(v39, 0.86);
v40 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v39 + 944LL);
BYTE2(v108.origin.x) = -1;
LOWORD(v108.origin.x) = -256;
v40(v39, &v108);
v35->addChild_0(v35, (cocos2d::CCNode *)v39, 1);
v41 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v39 + 280LL);
cocos2d::CCPoint::CCPoint(&v108.origin, 0.0, 0.5);
v41(v39, &v108);
v42 = *(void (__fastcall **)(float *, __int64))(*(_QWORD *)v39 + 184LL);
v43 = (__int64)v29->getPosition(v29);
v42(v39, v43);
v44 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v44, 4);
v94 = v44->setPosition;
v45 = (__int64)v24->getPosition(v24);
v94(v44, (const cocos2d::CCPoint *)v45);
v44->setScale(v44, 0.4);
v46 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v46, 4);
v95 = v46->setPosition;
v47 = (__int64)v35->getPosition(v35);
v95(v46, (const cocos2d::CCPoint *)v47);
v46->setScale(v46, 0.4);
v96 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v96, 4);
v92 = v96;
v93 = v96->setPosition;
v97 = (__int64)v24->getPosition(v24);
cocos2d::CCPoint::CCPoint(&v107, 0.0, 20.0);
cocos2d::CCPoint::operator+(&v108, v97, &v107);
v93(v92, &v108.origin);
v92->setScale(v92, 0.4);
v48 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v48, 4);
v98 = v48->setPosition;
v102 = (char *)v35->getPosition(v35);
cocos2d::CCPoint::CCPoint(&v107, 0.0, 20.0);
cocos2d::CCPoint::operator+(&v108, v102, &v107);
v98(v48, &v108.origin);
v48->setScale(v48, 0.4);
NormalPercent = GJGameLevel::getNormalPercent(a2);
v50 = v30;
if ( v30 > (float)((float)((float)NormalPercent / 100.0) * v30) )
v50 = (float)((float)GJGameLevel::getNormalPercent(a2) / 100.0) * v30;
getPositionY = v29->__vftable[1].getPositionY;
cocos2d::CCRect::CCRect(&v108, 0.0, 0.0, v50, *(float *)(v99 + 12));
((void (__fastcall *)(cocos2d::CCNode *, cocos2d::CCRect *))getPositionY)(v29, &v108);
v52 = (float)((float)a2->m_practicePercent / 100.0) * v30;
if ( v30 <= v52 )
v52 = v30;
v53 = *(void (__fastcall **)(float *, cocos2d::CCRect *))(*(_QWORD *)v39 + 1120LL);
cocos2d::CCRect::CCRect(&v108, 0.0, 0.0, v52, v39[109]);
v53(v39, &v108);
v54 = GJGameLevel::getNormalPercent(a2);
v55 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", (const char *)v54);
CString = cocos2d::CCString::getCString(v55);
v44->setString(v44, (const unsigned __int8 *)CString);
v57 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
(const char *)(unsigned int)a2->m_practicePercent);
v58 = cocos2d::CCString::getCString(v57);
v59 = (cocos2d::CCArray *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))v46->setString)(v46, v58);
v60 = (cocos2d::CCArray *)cocos2d::CCArray::create(v59);
v61 = GJGameLevel::getNormalPercent(a1->m_level) > 99;
if ( v61 )
v62 = "GJ_starsIcon_001.png";
else
v62 = "GJ_starsIcon_gray_001.png";
v63 = 0;
sub_D153B8((int)&v106, v62);
if ( a2->m_stars.random - a2->m_stars.seed > 0 )
{
do
{
while ( 1 )
{
v64 = cocos2d::CCSprite::createWithSpriteFrameName(v106);
a1->m_mainLayer->addChild(a1->m_mainLayer, v64);
v64->setScale(v64, 0.6);
cocos2d::CCArray::addObject(v60, v64);
if ( !v61 )
break;
if ( ++v63 >= a2->m_stars.random - a2->m_stars.seed )
goto LABEL_24;
}
v64->setOpacity(v64, 4294967240LL);
++v63;
}
while ( v63 < a2->m_stars.random - a2->m_stars.seed );
}
LABEL_24:
cocos2d::CCPoint::CCPoint(&v108.origin, v104 * 0.5, (float)((float)(v105 * 0.5) + -130.0) + 16.0);
GameToolbox::alignItemsHorisontally(v60, 15.0, v116, (bool)&v108);
a1->m_joystickConnected = -1;
v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v112.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v112.adj = (size_t)WorldLevelPage::onClose;
v66 = CCMenuItemSpriteExtra::create(v65, nullptr, v112);
CCMenuItemSpriteExtra::setSizeMult(v66, 1.6);
v67 = (cocos2d::CCMenu *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v66, nullptr);
v68 = v104;
a1->m_buttonMenu = v67;
v69 = v67->setPosition;
cocos2d::CCPoint::CCPoint(
&v108.origin,
(float)((float)(v68 * 0.5) + -160.0) + 10.0,
(float)((float)(v105 * 0.5) + 130.0) - 10.0);
v69(v67, &v108.origin);
a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_buttonMenu, 10);
v70 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playBtn2_001.png");
v70->setScale(v70, 1.0);
v113.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v113.adj = (size_t)WorldLevelPage::onPlay;
v71 = CCMenuItemSpriteExtra::create(v70, nullptr, v113);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v71);
m_buttonMenu = a1->m_buttonMenu;
v73 = v71->setPosition;
cocos2d::CCPoint::CCPoint(&v107, v104 * 0.5, (float)(v105 * 0.5) + 32.0);
v109 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v107);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v73)(v71, &v108, v109.x, v109.y);
v74 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_playMusicBtn_001.png");
v74->setScale(v74, 0.8);
v114.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v114.adj = (size_t)WorldLevelPage::onSong;
v75 = CCMenuItemSpriteExtra::create(v74, nullptr, v114);
CCMenuItemSpriteExtra::setSizeMult(v75, 2.0);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v75);
v76 = a1->m_buttonMenu;
v77 = v75->setPosition;
cocos2d::CCPoint::CCPoint(
&v107,
(float)((float)(v104 * 0.5) + 160.0) - 5.0,
(float)((float)(v105 * 0.5) + -130.0) + 5.0);
v110 = cocos2d::CCNode::convertToNodeSpace(v76, &v107);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v77)(v75, &v108, v110.x, v110.y);
v78 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png");
v115.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1;
v115.adj = (size_t)WorldLevelPage::onInfo;
v79 = CCMenuItemSpriteExtra::create(v78, nullptr, v115);
CCMenuItemSpriteExtra::setSizeMult(v79, 2.0);
a1->m_buttonMenu->addChild(a1->m_buttonMenu, v79);
v80 = a1->m_buttonMenu;
v81 = v79->setPosition;
cocos2d::CCPoint::CCPoint(
&v107,
(float)((float)(v104 * 0.5) + 160.0) - 5.0,
(float)((float)(v105 * 0.5) + 130.0) - 5.0);
v111 = cocos2d::CCNode::convertToNodeSpace(v80, &v107);
((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v81)(v79, &v108, v111.x, v111.y);
v82 = (char *)(v106 - 24);
if ( v106 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v86 = (unsigned int *)(v106 - 8);
do
v87 = __ldaxr(v86);
while ( __stlxr(v87 - 1, v86) );
}
else
{
v87 = *((_DWORD *)v106 - 2);
*((_DWORD *)v106 - 2) = v87 - 1;
}
if ( v87 <= 0 )
operator delete(v82);
}
return v100;
}