// // EditorPauseLayer::init from 0x8b71d8 to 0x8b7818 (1600 bytes) // // 2 xrefs: // > EditorPauseLayer::create @ 0x8b78c0 // > @ 0xac6d8 // // This function is hookable on this platform (idp: arm, 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:56:25 +0000 // __int64 __fastcall EditorPauseLayer::init(EditorPauseLayer *this, LevelEditorLayer *a2) { unsigned __int8 v3; // w0 unsigned int v4; // w23 cocos2d::CCDirector *v6; // x0 int v7; // w25 cocos2d::CCDirector *v8; // x0 __int64 v9; // x2 int v10; // w0 cocos2d::CCString *v11; // x0 size_t v12; // x0 LevelEditorLayer *v13; // x0 unsigned __int64 v14; // x2 __int64 v15; // x0 unsigned __int64 v16; // x1 char *v17; // x3 char *v18; // x0 int v19; // w1 unsigned int v20; // t1 __int64 v21; // x0 char *v22; // x3 char *v23; // x0 int v24; // w19 int v25; // t1 cocos2d::CCString *v26; // x0 size_t v27; // x0 cocos2d::CCLabelBMFont *v28; // x0 cocos2d::CCDirector **v29; // x20 void (__fastcall *v30)(cocos2d::CCDirector **, __int64 *); // x24 void (__fastcall *v31)(cocos2d::CCDirector **, __int64 *); // x24 cocos2d::CCDirector *v32; // x0 cocos2d::CCDirector *ScreenLeft; // x0 float v34; // s0 float v35; // s8 cocos2d::CCDirector *v36; // x0 float v37; // s0 float LastObjectX; // s0 __int64 v39; // x24 float v40; // s0 __int64 v41; // x1 float v42; // s9 int v43; // w0 float v44; // s8 GJGameLevel *LengthKey; // x0 const char *v46; // x1 size_t v47; // x0 const char *v48; // x2 const char *v49; // x1 __int64 v50; // x2 char *v51; // x3 cocos2d::CCString *v52; // x0 cocos2d::CCLabelBMFont *v53; // x0 __int64 v54; // x24 void (__fastcall *v55)(__int64, __int64 *); // x25 void (__fastcall *v56)(__int64, __int64 *); // x21 __int64 v57; // x25 bool v58; // cc int v59; // w1 int v60; // w0 int v61; // w19 __int64 v62; // x2 const char *v63; // x1 cocos2d::CCString *v64; // x0 size_t v65; // x0 char *v66; // x24 const char *CString; // [xsp+68h] [xbp+68h] char *v68; // [xsp+68h] [xbp+68h] char *v69; // [xsp+68h] [xbp+68h] const char *v70; // [xsp+68h] [xbp+68h] bool v71; // [xsp+77h] [xbp+77h] BYREF __int64 v72; // [xsp+78h] [xbp+78h] BYREF _BYTE v73[8]; // [xsp+80h] [xbp+80h] BYREF __int64 v74; // [xsp+88h] [xbp+88h] BYREF __int64 v75[2]; // [xsp+90h] [xbp+90h] BYREF void *v76; // [xsp+A0h] [xbp+A0h] __int64 v77; // [xsp+A8h] [xbp+A8h] BYREF __int64 v78; // [xsp+B0h] [xbp+B0h] void *v79; // [xsp+B8h] [xbp+B8h] __int64 v80; // [xsp+C0h] [xbp+C0h] BYREF __int64 v81; // [xsp+C8h] [xbp+C8h] void *v82; // [xsp+D0h] [xbp+D0h] __int64 v83[2]; // [xsp+D8h] [xbp+D8h] BYREF void *v84; // [xsp+E8h] [xbp+E8h] __int64 v85[2]; // [xsp+F0h] [xbp+F0h] BYREF void *v86; // [xsp+100h] [xbp+100h] *((_QWORD *)this + 72) = a2; v3 = CCBlockLayer::init(this); v4 = v3; if ( !v3 ) return v4; v6 = *(cocos2d::CCDirector **)(*((_QWORD *)this + 72) + 1936LL); v7 = *((_DWORD *)v6 + 285); v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6); cocos2d::CCDirector::getWinSize(&v72, v8); v75[0] = 0; v9 = *((_QWORD *)this + 72); v75[1] = 0; v76 = nullptr; v10 = *(unsigned __int8 *)(*(_QWORD *)(v9 + 1936) + 1200LL) + *(unsigned __int8 *)(*(_QWORD *)(v9 + 1936) + 1201LL); if ( v10 == 2 ) { v11 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Objects: %i (Unlimited)", (const char *)(unsigned int)(*(_DWORD *)(v9 + 14272) - *(_DWORD *)(v9 + 14276))); CString = (const char *)cocos2d::CCString::getCString(v11); v12 = strlen(CString); std::string::assign(v75, CString, v12); } else { v58 = v10 <= 0; v59 = *(_DWORD *)(v9 + 14276); v60 = *(_DWORD *)(v9 + 14272); v61 = !v58; v62 = 40000; v63 = (const char *)(unsigned int)(v60 - v59); if ( v61 ) v62 = 80000; v64 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Objects: %i/%i", v63, v62); v70 = (const char *)cocos2d::CCString::getCString(v64); v65 = strlen(v70); std::string::assign(v75, v70, v65); if ( v61 ) std::string::append((__int64)v75, " (high)", 7u); } v13 = *((LevelEditorLayer **)this + 72); v71 = 0; LevelEditorLayer::getSongIDs(v13, &v71, &v77); LevelEditorLayer::getSFXIDs(*((LevelEditorLayer **)this + 72), &v80); if ( (v77 & 1) != 0 ) { v15 = v78; v16 = 1; if ( !v78 ) goto LABEL_14; v17 = (char *)v79; } else { LODWORD(v15) = (int)(unsigned __int8)v77 >> 1; v16 = 1; if ( !(_DWORD)v15 ) goto LABEL_14; v15 = (int)v15; v17 = (char *)&v77 + 1; } v18 = &v17[v15]; if ( v18 == v17 ) { v16 = 1; } else { v19 = 0; do { v20 = (unsigned __int8)*v17++; v14 = v20; if ( v20 == 44 ) ++v19; } while ( v17 != v18 ); v16 = (unsigned int)(v19 + 1); } LABEL_14: if ( (v80 & 1) == 0 ) { LODWORD(v21) = (int)(unsigned __int8)v80 >> 1; if ( (_DWORD)v21 ) { v21 = (int)v21; v22 = (char *)&v80 + 1; goto LABEL_17; } LABEL_53: if ( !v71 ) goto LABEL_25; goto LABEL_24; } v21 = v81; if ( !v81 ) goto LABEL_53; v22 = (char *)v82; LABEL_17: v23 = &v22[v21]; if ( v23 != v22 ) { v24 = 0; do { v25 = (unsigned __int8)*v22++; if ( v25 == 44 ) ++v24; } while ( v22 != v23 ); v14 = (unsigned int)(v24 + 1); if ( (int)v14 <= 0 && !v71 ) goto LABEL_25; } LABEL_24: v26 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)", Songs: %i, SFX: %i", (const char *)v16); v68 = (char *)cocos2d::CCString::getCString(v26); v27 = strlen(v68); std::string::append((__int64)v75, v68, v27); LABEL_25: if ( v7 != 2 ) std::string::append((__int64)v75, " (Read-Only)", 0xCu); if ( (v75[0] & 1) != 0 ) v28 = (cocos2d::CCLabelBMFont *)v76; else v28 = (cocos2d::CCLabelBMFont *)((char *)v75 + 1); v29 = (cocos2d::CCDirector **)cocos2d::CCLabelBMFont::create(v28, "goldFont.fnt", (const char *)v14); v30 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v29 + 37); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, 0.0, 1.0); v30(v29, &v74); (*(void (__fastcall **)(EditorPauseLayer *, cocos2d::CCDirector **))(*(_QWORD *)this + 456LL))(this, v29); v31 = *((void (__fastcall **)(cocos2d::CCDirector **, __int64 *))*v29 + 23); v32 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v29); ScreenLeft = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenLeft(v32); v35 = (float)(v34 + 10.0) + 0.0; v36 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenLeft); cocos2d::CCDirector::getScreenTop(v36); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, v35, v37 - 5.0); v31(v29, &v74); (*((void (__fastcall **)(cocos2d::CCDirector **, float))*v29 + 20))(v29, 0.5); LastObjectX = LevelEditorLayer::getLastObjectX(*((LevelEditorLayer **)this + 72)); v39 = *(_QWORD *)(*((_QWORD *)this + 72) + 14288LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, LastObjectX + 340.0, 0.0); DrawGridLayer::timeForPos(v39, (const cocos2d::CCPoint *)&v74, 0, 0, 0, 0, 0, 0); v41 = *((_QWORD *)this + 72); v42 = v40; v43 = *(_DWORD *)(*(_QWORD *)(v41 + 1936) + 1232LL); if ( v43 > 0 && v40 < (float)((float)v43 / 240.0) ) v42 = (float)v43 / 240.0; v44 = floorf(v42 / 60.0); LengthKey = (GJGameLevel *)GJGameLevel::getLengthKey( (GJGameLevel *)(unsigned int)(int)v42, *(_BYTE *)(*(_QWORD *)(v41 + 3272) + 341LL)); GJGameLevel::lengthKeyToString(v85, LengthKey); v46 = (char *)v85 + 1; if ( (v85[0] & 1) != 0 ) v46 = (const char *)v86; v69 = (char *)v46; v83[0] = 0; v83[1] = 0; v84 = nullptr; v47 = strlen(v46); std::string::__init(v83, v69, v47); if ( (v85[0] & 1) != 0 ) operator delete(v86); if ( *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 72) + 3272LL) + 341LL) ) { v53 = (cocos2d::CCLabelBMFont *)"Length: Platformer"; } else { v49 = (const char *)(unsigned int)(int)v44; v50 = (unsigned int)(int)(float)(v42 - (float)(60 * (int)v49)); if ( (int)v49 <= 0 ) { v66 = (char *)v83 + 1; if ( (v83[0] & 1) != 0 ) v66 = (char *)v84; v52 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Length: %i seconds (%s)", (const char *)(unsigned int)v50, v66); } else { v51 = (char *)v83 + 1; if ( (v83[0] & 1) != 0 ) v51 = (char *)v84; v52 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Length: %imin %is (%s)", v49, v50, v51); } v53 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v52); } v54 = cocos2d::CCLabelBMFont::create(v53, "goldFont.fnt", v48); v55 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v54 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v74, 0.0, 1.0); v55(v54, &v74); (*(void (__fastcall **)(EditorPauseLayer *, __int64))(*(_QWORD *)this + 456LL))(this, v54); v56 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v54 + 184LL); v57 = (*((__int64 (__fastcall **)(cocos2d::CCDirector **))*v29 + 24))(v29); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v73, 0.0, -20.0); cocos2d::CCPoint::operator+(&v74, v57); v56(v54, &v74); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v54 + 160LL))(v54, 0.5); if ( (v83[0] & 1) != 0 ) operator delete(v84); if ( (v80 & 1) != 0 ) operator delete(v82); if ( (v77 & 1) != 0 ) operator delete(v79); if ( (v75[0] & 1) != 0 ) operator delete(v76); return v4; }
GD Web Decomp Icon

GD Web Decomp

Raw Source