// // DemonInfoPopup::init from 0x8ff798 to 0x900298 (2816 bytes) // // 2 xrefs: // > DemonInfoPopup::create @ 0x9003e8 // > @ 0x6ddd0 // // 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 DemonInfoPopup::init( DemonInfoPopup *a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13) { cocos2d::CCDirector *v17; // x0 cocos2d::CCNode *v18; // x20 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // x21 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x21 cocos2d::CCMenu *v21; // x0 cocos2d::CCLayer *m_mainLayer; // x3 cocos2d::CCString *v23; // x0 void *v24; // x0 cocos2d::CCString *v25; // x0 cocos2d::CCLabelBMFont *v26; // x20 void *v27; // x0 cocos2d::CCLayer *v28; // x3 int v29; // w22 void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x4 cocos2d::CCArray *v31; // x20 cocos2d::CCPoint *v32; // x20 cocos2d::CCString *v33; // x0 char *CString; // x0 cocos2d::CCSprite *v35; // x20 cocos2d::CCLabelBMFont *v36; // x20 void *v37; // x0 void (__fastcall *v38)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 cocos2d::CCLabelBMFont *v39; // x26 void *v40; // x0 void (__fastcall *v41)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x28 __int64 v42; // x20 void (__fastcall *v43)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // x3 char *v44; // x0 const char *v45; // x1 __int64 v46; // x2 __int64 v47; // x3 bool v48; // w4 __int64 v49; // x5 const char *v50; // x6 cocos2d::CCString *v51; // x0 cocos2d::CCLabelBMFont *v52; // x20 void *v53; // x0 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCString *v55; // x0 cocos2d::CCLabelBMFont *v56; // x20 void *v57; // x0 void (__fastcall *v58)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // x22 cocos2d::CCNode *v59; // x0 CCMenuItemSpriteExtra *v60; // x20 cocos2d::CCMenu *m_buttonMenu; // x23 void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // x22 unsigned int *v63; // x1 int v64; // w2 unsigned int *v65; // x1 int v66; // w2 unsigned int *v67; // x1 int v68; // w2 unsigned int *v69; // x1 int v70; // w2 unsigned int *v71; // x1 int v72; // w2 unsigned int *v73; // x1 int v74; // w3 unsigned int *v75; // x22 int v76; // w1 cocos2d::CCArray *v77[2]; // [xsp+0h] [xbp+0h] BYREF cocos2d::CCArray *v78; // [xsp+88h] [xbp+88h] int v79; // [xsp+90h] [xbp+90h] int v80; // [xsp+94h] [xbp+94h] int v81; // [xsp+98h] [xbp+98h] int v82; // [xsp+9Ch] [xbp+9Ch] int v83; // [xsp+A0h] [xbp+A0h] char v84; // [xsp+A7h] [xbp+A7h] cocos2d::CCPoint *v85; // [xsp+A8h] [xbp+A8h] float v86; // [xsp+C0h] [xbp+C0h] float v87; // [xsp+C4h] [xbp+C4h] char v88; // [xsp+C8h] [xbp+C8h] BYREF __int64 v89; // [xsp+D0h] [xbp+D0h] BYREF const char *v90; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCPoint v91; // [xsp+E0h] [xbp+E0h] BYREF cocos2d::CCRect v92; // [xsp+E8h] [xbp+E8h] BYREF cocos2d::CCPoint v93; // 0:kr08_8.8 cocos2d::SEL_MenuHandler v94; // 0:x2.16 cocos2d::CCPoint v95; // 0:s1.4,4:s2.4 cocos2d::CCRect v96; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4 v81 = a3; v80 = a4; v83 = a5; v82 = a6; v79 = a8; v84 = FLAlertLayer::init(a1, 0x4Bu); if ( v84 ) { v17 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v17); cocos2d::CCRect::CCRect(&v92, 0.0, 0.0, 80.0, 80.0); v18 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square02.png", (const char *)&v92, v96); setContentSize = v18->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v92, 380.0, 210.0); setContentSize(v18, (const cocos2d::CCSize *)&v92); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v18, -1); setPosition = v18->setPosition; cocos2d::CCPoint::CCPoint(&v92.origin, v86 * 0.5, v87 * 0.5); setPosition(v18, &v92.origin); v21 = cocos2d::CCMenu::create(); m_mainLayer = a1->m_mainLayer; a1->m_buttonMenu = v21; m_mainLayer->addChild_0(m_mainLayer, v21, 10); GameToolbox::pointsToString((GameToolbox *)(unsigned int)(a2 + v81 + v80 + v83 + v82), (__int64 *)&v92); v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Classic: %s", *(const char **)&v92.origin); cocos2d::CCString::getCString(v23); v78 = (cocos2d::CCArray *)cocos2d::CCLabelBMFont::create(); v24 = (void *)(*(_QWORD *)&v92.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v92.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v71 = (unsigned int *)(*(_QWORD *)&v92.origin - 8LL); do v72 = __ldaxr(v71); while ( __stlxr(v72 - 1, v71) ); } else { v72 = *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL) = v72 - 1; } if ( v72 <= 0 ) operator delete(v24); } a1->m_mainLayer->addChild(a1->m_mainLayer, (cocos2d::CCNode *)v78); ((void (__fastcall *)(cocos2d::CCArray *, float))v78->__vftable[2].copyWithZone)(v78, 0.7); GameToolbox::pointsToString((GameToolbox *)(unsigned int)(a7 + v79 + a9 + a10 + a11), (__int64 *)&v92); v25 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Platformer: %s", *(const char **)&v92.origin); cocos2d::CCString::getCString(v25); v26 = cocos2d::CCLabelBMFont::create(); v27 = (void *)(*(_QWORD *)&v92.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v92.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v73 = (unsigned int *)(*(_QWORD *)&v92.origin - 8LL); do v74 = __ldaxr(v73); while ( __stlxr(v74 - 1, v73) ); } else { v74 = *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL) = v74 - 1; } if ( v74 <= 0 ) operator delete(v27); } v28 = a1->m_mainLayer; v85 = (cocos2d::CCPoint *)&v88; v29 = 0; v28->addChild(v28, v26); v26->setScale(v26, 0.7); setColor = v26->setColor; LOWORD(v92.origin.x) = -14081; BYTE2(v92.origin.x) = -1; setColor(v26, (const cocos2d::ccColor3B *)&v92); v31 = (cocos2d::CCArray *)cocos2d::CCArray::create(v78, v26, 0); cocos2d::CCPoint::CCPoint(&v92.origin, v86 * 0.5, (float)((float)(v87 * 0.5) + 105.0) - 20.0); GameToolbox::alignItemsHorisontally(v31, 30.0, v95, (unsigned __int8)v77 - 24); v32 = v85; cocos2d::CCPoint::CCPoint(v85, (float)(v86 * 0.5) + -140.0, (float)(v87 * 0.5) + 35.0); cocos2d::CCPoint::CCPoint(&v92.origin, 0.0, 0.0); cocos2d::CCPoint::operator+(&v89, v32, &v92); v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", &byte_7); while ( 1 ) { CString = (char *)cocos2d::CCString::getCString(v33); sub_D153B8((unsigned int)v77 + 216, CString); v35 = cocos2d::CCSprite::createWithSpriteFrameName(v90); v35->setScale(v35, 1.0); v35->setPosition(v35, (const cocos2d::CCPoint *)&v89); a1->m_mainLayer->addChild(a1->m_mainLayer, v35); GameToolbox::pointsToString((GameToolbox *)(unsigned int)a2, (__int64 *)&v91); v36 = cocos2d::CCLabelBMFont::create(); v37 = (void *)(*(_QWORD *)&v91 - 24LL); if ( (__int64 *)(*(_QWORD *)&v91 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v67 = (unsigned int *)(*(_QWORD *)&v91 - 8LL); do v68 = __ldaxr(v67); while ( __stlxr(v68 - 1, v67) ); } else { v68 = *(_DWORD *)(*(_QWORD *)&v91 - 8LL); *(_DWORD *)(*(_QWORD *)&v91 - 8LL) = v68 - 1; } if ( v68 <= 0 ) operator delete(v37); } v36->setScale(v36, 0.6); a1->m_mainLayer->addChild(a1->m_mainLayer, v36); v38 = v36->setPosition; cocos2d::CCPoint::CCPoint(&v91, 0.0, -50.0); cocos2d::CCPoint::operator+(&v92, &v89, &v91); v38(v36, &v92.origin); GameToolbox::pointsToString((GameToolbox *)(unsigned int)a7, (__int64 *)&v92); v39 = cocos2d::CCLabelBMFont::create(); v40 = (void *)(*(_QWORD *)&v92.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v92.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v65 = (unsigned int *)(*(_QWORD *)&v92.origin - 8LL); do v66 = __ldaxr(v65); while ( __stlxr(v66 - 1, v65) ); } else { v66 = *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL) = v66 - 1; } if ( v66 <= 0 ) operator delete(v40); } v39->setScale(v39, 0.6); a1->m_mainLayer->addChild(a1->m_mainLayer, v39); v41 = v39->setPosition; v42 = (__int64)v36->getPosition(v36); cocos2d::CCPoint::CCPoint(&v91, 0.0, -26.0); cocos2d::CCPoint::operator+(&v92, v42, &v91); v41(v39, &v92.origin); v43 = v39->setColor; LOWORD(v92.origin.x) = -14081; BYTE2(v92.origin.x) = -1; v43(v39, (const cocos2d::ccColor3B *)&v92); v44 = (char *)(v90 - 24); if ( v90 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v63 = (unsigned int *)(v90 - 8); do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = *((_DWORD *)v90 - 2); *((_DWORD *)v90 - 2) = v64 - 1; } if ( v64 <= 0 ) operator delete(v44); } if ( ++v29 == 5 ) break; cocos2d::CCPoint::CCPoint(&v92.origin, (float)v29 * 70.0, 0.0); cocos2d::CCPoint::operator+(&v89, v85, &v92); switch ( v29 ) { case 3: a7 = a10; a2 = v83; v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", byte_9); break; case 4: a7 = a11; a2 = v82; v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", &byte_9[1]); break; case 2: a7 = a9; a2 = v80; v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", &byte_6); break; default: a7 = v79; a2 = v81; v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn2_001.png", byte_8); break; } } cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v90, (float)((float)(v86 * 0.5) + 190.0) - 12.0, (float)((float)(v87 * 0.5) + -105.0) + 14.0); if ( a13 > 0 ) { GameToolbox::pointsToString((GameToolbox *)(unsigned int)a13, (__int64 *)&v92); v51 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Gauntlet: %s", *(const char **)&v92.origin); cocos2d::CCString::getCString(v51); v52 = cocos2d::CCLabelBMFont::create(); v53 = (void *)(*(_QWORD *)&v92.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v92.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v69 = (unsigned int *)(*(_QWORD *)&v92.origin - 8LL); do v70 = __ldaxr(v69); while ( __stlxr(v70 - 1, v69) ); } else { v70 = *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL) = v70 - 1; } if ( v70 <= 0 ) operator delete(v53); } a1->m_mainLayer->addChild(a1->m_mainLayer, v52); v52->setScale(v52, 0.4); setAnchorPoint = v52->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v92.origin, 1.0, 0.0); setAnchorPoint(v52, &v92.origin); v52->setPosition(v52, (const cocos2d::CCPoint *)&v90); *((float *)&v90 + 1) = *((float *)&v90 + 1) + 16.0; } if ( a12 > 0 ) { GameToolbox::pointsToString((GameToolbox *)(unsigned int)a12, (__int64 *)&v92); v55 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Weekly: %s", *(const char **)&v92.origin); cocos2d::CCString::getCString(v55); v56 = cocos2d::CCLabelBMFont::create(); v57 = (void *)(*(_QWORD *)&v92.origin - 24LL); if ( (__int64 *)(*(_QWORD *)&v92.origin - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v75 = (unsigned int *)(*(_QWORD *)&v92.origin - 8LL); do v76 = __ldaxr(v75); while ( __stlxr(v76 - 1, v75) ); } else { v76 = *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL); *(_DWORD *)(*(_QWORD *)&v92.origin - 8LL) = v76 - 1; } if ( v76 <= 0 ) operator delete(v57); } a1->m_mainLayer->addChild(a1->m_mainLayer, v56); v56->setScale(v56, 0.4); v58 = v56->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v92.origin, 1.0, 0.0); v58(v56, &v92.origin); v56->setPosition(v56, (const cocos2d::CCPoint *)&v90); } v59 = (cocos2d::CCNode *)ButtonSprite::create((ButtonSprite *)"OK", v45, v46, v47, v48, v49, v50); v94.ptr = (void (__cdecl *)(cocos2d::CCObject *))a1; v94.adj = (size_t)DemonInfoPopup::onClose; v60 = CCMenuItemSpriteExtra::create(v59, nullptr, v94); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v60); m_buttonMenu = a1->m_buttonMenu; v62 = v60->setPosition; cocos2d::CCPoint::CCPoint(&v91, v86 * 0.5, (float)((float)(v87 * 0.5) + -105.0) + 25.0); v93 = cocos2d::CCNode::convertToNodeSpace(m_buttonMenu, &v91); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCRect *, float, float))v62)(v60, &v92, v93.x, v93.y); } return v84; }