// // DemonInfoPopup::init from 0x1403c71b0 to 0x1403c7ad4 (2340 bytes) // // 2 xrefs: // > DemonInfoPopup::create @ 0x1403c7164 // > @ 0x1406d794c // // 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 // // Hidden C++ exception states: #wind=6 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) { int v15; // r14d bool result; // al __int64 v17; // rcx cocos2d::CCDirector *v18; // rax struct cocos2d::CCRect *v19; // rax struct cocos2d::extension::CCScale9Sprite *v20; // rdi cocos2d::extension::CCScale9Sprite_vtbl *v21; // rbx const cocos2d::CCSize *v22; // rax float v23; // xmm0_4 cocos2d::extension::CCScale9Sprite_vtbl *v24; // rbx const cocos2d::CCPoint *v25; // rax __int64 v26; // rcx cocos2d::CCMenu *v27; // rax __m128i *v28; // rax cocos2d::CCString *v29; // rax const char *CString; // rax struct cocos2d::CCLabelBMFont *v31; // rsi __m128i *v32; // rax cocos2d::CCString *v33; // rax const char *v34; // rax struct cocos2d::CCLabelBMFont *v35; // rdi float v36; // xmm0_4 double v37; // xmm0_8 cocos2d::CCPoint v38; // rax cocos2d::CCPoint v39; // rbx cocos2d::CCArray *v40; // rax double v41; // xmm0_8 int v42; // r15d int v43; // edx signed int v44; // edi signed int v45; // esi cocos2d::CCString *v46; // rax const char *v47; // rax size_t v48; // r8 __m128i *v49; // rcx struct cocos2d::CCSprite *v50; // rbx __m128i *v51; // rax struct cocos2d::CCLabelBMFont *v52; // r14 float v53; // xmm0_4 __m128i *v54; // rax struct cocos2d::CCLabelBMFont *v55; // rdi float v56; // xmm0_4 __int64 v57; // rax __m128i *v58; // rax cocos2d::CCString *v59; // rax const char *v60; // rax struct cocos2d::CCLabelBMFont *v61; // rdi float v62; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v63; // rbx const cocos2d::CCPoint *v64; // rax __m128i *v65; // rax cocos2d::CCString *v66; // rax const char *v67; // rax struct cocos2d::CCLabelBMFont *v68; // rdi float v69; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v70; // rbx const cocos2d::CCPoint *v71; // rax ButtonSprite *v72; // rbx CCMenuItemSpriteExtra *v73; // rdi float v74; // xmm0_4 CCMenuItemSpriteExtra_vtbl *v75; // rbx struct cocos2d::CCPoint v76; // rax __int16 v77; // [rsp+48h] [rbp-C0h] BYREF char v78; // [rsp+4Ah] [rbp-BEh] float v79; // [rsp+50h] [rbp-B8h] __int16 v80; // [rsp+58h] [rbp-B0h] BYREF char v81; // [rsp+5Ah] [rbp-AEh] int v82; // [rsp+5Ch] [rbp-ACh] int v83; // [rsp+60h] [rbp-A8h] int v84; // [rsp+64h] [rbp-A4h] int v85; // [rsp+68h] [rbp-A0h] int v86; // [rsp+6Ch] [rbp-9Ch] int v87; // [rsp+70h] [rbp-98h] _BYTE v88[4]; // [rsp+78h] [rbp-90h] BYREF float v89; // [rsp+7Ch] [rbp-8Ch] cocos2d::CCSize v90; // [rsp+80h] [rbp-88h] BYREF int v91; // [rsp+88h] [rbp-80h] int v92; // [rsp+8Ch] [rbp-7Ch] int v93; // [rsp+90h] [rbp-78h] signed int v94; // [rsp+94h] [rbp-74h] signed int v95; // [rsp+98h] [rbp-70h] cocos2d::CCPoint v96; // [rsp+A0h] [rbp-68h] BYREF char v97[8]; // [rsp+A8h] [rbp-60h] BYREF cocos2d::CCPoint v98; // [rsp+B0h] [rbp-58h] BYREF struct cocos2d::CCPoint v99; // [rsp+B8h] [rbp-50h] BYREF __m128i v100; // [rsp+C8h] [rbp-40h] BYREF __int64 v101; // [rsp+D8h] [rbp-30h] unsigned __int64 v102; // [rsp+E0h] [rbp-28h] cocos2d::CCRect v103[2]; // [rsp+E8h] [rbp-20h] BYREF __m128i v104[2]; // [rsp+108h] [rbp+0h] BYREF __m128i v105[2]; // [rsp+128h] [rbp+20h] BYREF v86 = a4; v87 = a3; v92 = a2; v84 = a5; v82 = a6; v15 = a8; v93 = a8; v91 = a9; v85 = a10; v83 = a11; v95 = a12; v94 = a13; result = FLAlertLayer::init_1(a1, 75); if ( result ) { v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v17); cocos2d::CCDirector::getWinSize(v18); cocos2d::CCRect::CCRect(v103, 0.0, 0.0, 80.0, 80.0); v20 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v19); v21 = v20->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCSize::CCSize(&v90, 380.0, 210.0); v21->setContentSize(v20, v22); v23 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::extension::CCScale9Sprite *, __int64))a1->m_mainLayer->addChild_0)( a1->m_mainLayer, v20, 0xFFFFFFFFLL); v24 = v20->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v23, v79 * 0.5); v24->setPosition_0(v20, v25); v27 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v26); a1->m_buttonMenu = v27; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v27, 10); v28 = GameToolbox::pointsToString(&v100, a2 + v87 + v86 + v84 + v82); if ( v28[1].m128i_i64[1] > 0xFuLL ) v28 = (__m128i *)v28->m128i_i64[0]; v29 = cocos2d::CCString::createWithFormat("Classic: %s", v28->m128i_i8); CString = cocos2d::CCString::getCString(v29); v31 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); sub_14003A830((__int64)&v100); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v31); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v31->setScale_0)(v31); v32 = GameToolbox::pointsToString((__m128i *)v103, a7 + a8 + a9 + v85 + v83); if ( v32[1].m128i_i64[1] > 0xFuLL ) v32 = (__m128i *)v32->m128i_i64[0]; v33 = cocos2d::CCString::createWithFormat("Platformer: %s", v32->m128i_i8); v34 = cocos2d::CCString::getCString(v33); v35 = cocos2d::CCLabelBMFont::create(v34, "goldFont.fnt"); sub_14003A830((__int64)v103); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v35); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v35->setScale_0)(v35); v77 = -14081; v78 = -1; v36 = ((float (__fastcall *)(cocos2d::CCRGBAProtocol *, __int16 *))v35->setColor)( &v35->cocos2d::CCRGBAProtocol, &v77); v37 = cocos2d::CCPoint::CCPoint(v36, v79 * 0.5); v39 = v38; v40 = cocos2d::CCArray::create(v31, v35, 0); GameToolbox::alignItemsHorisontally(v40, 30.0, v39, 0); v41 = cocos2d::CCPoint::CCPoint(*(float *)&v37, (float)(v79 * 0.5) - 140.0); v42 = 0; v77 = -14081; do { cocos2d::CCPoint::CCPoint(*(float *)&v41, (float)v42 * 70.0); cocos2d::CCPoint::operator+(v97, &v96); v43 = v42 + 6; v44 = 0; v45 = 0; if ( v42 ) { switch ( v42 ) { case 1: v43 = 8; v44 = v87; v45 = v15; break; case 2: v43 = 6; v44 = v86; v45 = v91; break; case 3: v43 = 9; v44 = v84; v45 = v85; break; case 4: v43 = 10; v44 = v82; v45 = v83; break; } } else { v43 = 7; v44 = v92; v45 = a7; } v46 = cocos2d::CCString::createWithFormat("difficulty_%02d_btn2_001.png", v43); v47 = cocos2d::CCString::getCString(v46); v100 = 0; v101 = 0; v102 = 0; v48 = -1; do ++v48; while ( v47[v48] ); sub_14003A930(&v100, v47, v48); v49 = &v100; if ( v102 > 0xF ) v49 = (__m128i *)v100.m128i_i64[0]; v50 = cocos2d::CCSprite::createWithSpriteFrameName(v49->m128i_i8); ((void (__fastcall *)(struct cocos2d::CCSprite *))v50->setScale_0)(v50); v50->setPosition_0(v50, &v96); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v50); v51 = GameToolbox::pointsToString(v105, v44); if ( v51[1].m128i_i64[1] > 0xFuLL ) v51 = (__m128i *)v51->m128i_i64[0]; v52 = cocos2d::CCLabelBMFont::create(v51->m128i_i8, "goldFont.fnt"); sub_14003A830((__int64)v105); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v52->setScale_0)(v52); v53 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, v52); cocos2d::CCPoint::CCPoint(v53, 0.0); cocos2d::CCPoint::operator+(&v96, &v98); v52->setPosition_0(v52, &v98); v54 = GameToolbox::pointsToString(v104, v45); if ( v54[1].m128i_i64[1] > 0xFuLL ) v54 = (__m128i *)v54->m128i_i64[0]; v55 = cocos2d::CCLabelBMFont::create(v54->m128i_i8, "goldFont.fnt"); sub_14003A830((__int64)v104); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v55->setScale_0)(v55); v56 = ((float (__fastcall *)(cocos2d::CCLayer *, struct cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)( a1->m_mainLayer, v55); cocos2d::CCPoint::CCPoint(v56, 0.0); v57 = (__int64)v52->getPosition_0(v52); v41 = cocos2d::CCPoint::operator+(v57, &v90); v55->setPosition_0(v55, (const cocos2d::CCPoint *)&v90); v80 = v77; v81 = -1; v55->setColor(&v55->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v80); sub_14003A830((__int64)&v100); ++v42; v15 = v93; } while ( v42 <= 4 ); cocos2d::CCPoint::CCPoint(*(float *)&v41, (float)((float)(v79 * 0.5) + 190.0) - 12.0); if ( v94 > 0 ) { v58 = GameToolbox::pointsToString(v104, v94); if ( v58[1].m128i_i64[1] > 0xFuLL ) v58 = (__m128i *)v58->m128i_i64[0]; v59 = cocos2d::CCString::createWithFormat("Gauntlet: %s", v58->m128i_i8); v60 = cocos2d::CCString::getCString(v59); v61 = cocos2d::CCLabelBMFont::create(v60, "goldFont.fnt"); sub_14003A830((__int64)v104); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v61); v62 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v61->setScale_0)(v61); v63 = v61->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v62, 1.0); v63->setAnchorPoint(v61, v64); v61->setPosition_0(v61, (const cocos2d::CCPoint *)v88); v89 = v89 + 16.0; } if ( v95 > 0 ) { v65 = GameToolbox::pointsToString(v104, v95); if ( v65[1].m128i_i64[1] > 0xFuLL ) v65 = (__m128i *)v65->m128i_i64[0]; v66 = cocos2d::CCString::createWithFormat("Weekly: %s", v65->m128i_i8); v67 = cocos2d::CCString::getCString(v66); v68 = cocos2d::CCLabelBMFont::create(v67, "goldFont.fnt"); sub_14003A830((__int64)v104); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v68); v69 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v68->setScale_0)(v68); v70 = v68->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v69, 1.0); v70->setAnchorPoint(v68, v71); v68->setPosition_0(v68, (const cocos2d::CCPoint *)v88); } v72 = ButtonSprite::create_1("OK", 0, 0, 1.0, 0, "goldFont.fnt", "GJ_button_01.png", 0.0); v103[0].origin = (cocos2d::CCPoint)operator new(0x208u); v73 = CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(*(CCMenuItemSpriteExtra **)&v103[0].origin); if ( v73 ) { if ( CCMenuItemSpriteExtra::init(v73, v72, nullptr, a1, (cocos2d::SEL_MenuHandler *)AudioAssetsBrowser::onClose) ) { cocos2d::CCObject::autorelease(v73); LABEL_39: v74 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v73); v75 = v73->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v74, v79 * 0.5); v76 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v99); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v75->setPosition_0)(v73, v76); return 1; } ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int64))v73->~CCMenuItemSpriteExtra)(v73, 1); } v73 = nullptr; goto LABEL_39; } return result; }