// // EditorPauseLayer::init from 0x100443204 to 0x1004436f4 (1264 bytes) // // 1 xrefs: // > EditorPauseLayer::create @ 0x1004431b8 // // 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 11:05:13 +0000 // __int64 __fastcall EditorPauseLayer::init(__int64 a1, __int64 a2) { __int64 v3; // x19 int v4; // w21 __int64 v5; // x0 __int64 v6; // x8 __int64 v7; // x10 int v8; // w9 int v9; // w10 int v11; // w22 int v12; // w8 int v13; // w9 void *v14; // x0 const std::string::value_type *CString; // x0 void *v16; // x0 const std::string::value_type *v17; // x0 __int64 v18; // x8 unsigned __int8 *v19; // x9 int v20; // w10 int v21; // t1 int v22; // w8 __int64 v23; // x9 unsigned __int8 *v24; // x10 int v25; // w11 int v26; // t1 void *v27; // x0 const std::string::value_type *v28; // x0 std::string *v29; // x0 void *v30; // x21 __int64 v31; // x0 float v32; // s8 __int64 v33; // x0 __int64 v34; // x1 float v35; // s9 __int64 v36; // x0 float v37; // s0 float v38; // s0 __int64 v39; // x22 float v40; // s8 __int64 v41; // x8 int v42; // w9 unsigned int LengthKey; // w0 char *v44; // x1 const char *v45; // x0 int v46; // w8 float v47; // s0 void **v48; // x10 void *v49; // x0 void *v50; // x22 float32x2_t *v51; // x20 double v52; // d0 float32x2_t v54; // [xsp+20h] [xbp-C0h] BYREF void *__p[2]; // [xsp+28h] [xbp-B8h] BYREF char v56; // [xsp+3Fh] [xbp-A1h] void *v57[2]; // [xsp+40h] [xbp-A0h] BYREF char v58; // [xsp+57h] [xbp-89h] void *v59; // [xsp+58h] [xbp-88h] BYREF __int64 v60; // [xsp+60h] [xbp-80h] char v61; // [xsp+6Fh] [xbp-71h] void *v62; // [xsp+70h] [xbp-70h] BYREF __int64 v63; // [xsp+78h] [xbp-68h] char v64; // [xsp+87h] [xbp-59h] bool v65; // [xsp+8Fh] [xbp-51h] BYREF std::string v66; // [xsp+90h] [xbp-50h] BYREF __int64 v67; // [xsp+A8h] [xbp-38h] BYREF *(_QWORD *)(a1 + 576) = a2; v3 = CCBlockLayer::init((_BYTE *)a1); if ( !(_DWORD)v3 ) return v3; v4 = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 576) + 1936LL) + 1140LL); v5 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(v5, &v67); v6 = *(_QWORD *)(a1 + 576); v7 = *(_QWORD *)(v6 + 1936); v8 = *(unsigned __int8 *)(v7 + 1200); v9 = *(unsigned __int8 *)(v7 + 1201); memset(&v66, 0, sizeof(v66)); if ( v8 != 1 || v9 == 0 ) { v11 = v8 | v9; v12 = *(_DWORD *)(v6 + 14272) - *(_DWORD *)(v6 + 14276); v13 = 40000; if ( v11 ) v13 = 80000; v14 = sub_1003065B0("Objects: %i/%i", v12, v13); CString = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v14); std::string::assign(&v66, CString); if ( v11 ) std::string::append(&v66, " (high)"); } else { v16 = sub_1003065B0("Objects: %i (Unlimited)", *(_DWORD *)(v6 + 14272) - *(_DWORD *)(v6 + 14276)); v17 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v16); std::string::assign(&v66, v17); } v65 = 0; LevelEditorLayer::getSongIDs(*(_QWORD *)(a1 + 576), &v65, &v62); LevelEditorLayer::getSFXIDs(*(_QWORD *)(a1 + 576), &v59); v18 = v64; if ( (v64 & 0x8000000000000000LL) == 0 ) { if ( v64 ) { v19 = (unsigned __int8 *)&v62; goto LABEL_16; } LABEL_21: v22 = 1; goto LABEL_22; } v18 = v63; if ( !v63 ) goto LABEL_21; v19 = (unsigned __int8 *)v62; LABEL_16: v20 = 0; do { v21 = *v19++; if ( v21 == 44 ) ++v20; --v18; } while ( v18 ); v22 = v20 + 1; LABEL_22: v23 = v61; if ( (v61 & 0x8000000000000000LL) != 0 ) { v23 = v60; if ( v60 ) { v24 = (unsigned __int8 *)v59; LABEL_27: v25 = 0; do { v26 = *v24++; if ( v26 == 44 ) ++v25; --v23; } while ( v23 ); LODWORD(v23) = v25 + 1; } } else if ( v61 ) { v24 = (unsigned __int8 *)&v59; goto LABEL_27; } if ( v65 || (int)v23 >= 1 ) { v27 = sub_1003065B0(", Songs: %i, SFX: %i", v22, v23); v28 = (const std::string::value_type *)cocos2d::CCString::getCString((__int64)v27); std::string::append(&v66, v28); } if ( v4 != 2 ) std::string::append(&v66, " (Read-Only)"); if ( (v66.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v29 = &v66; else v29 = (std::string *)v66.__r_.__value_.__r.__words[0]; v30 = cocos2d::CCLabelBMFont::create_1((const char *)v29, "goldFont.fnt"); sub_1000262BC((float *)v57, 0.0, 1.0); (*(void (__fastcall **)(void *, void **))(*(_QWORD *)v30 + 296LL))(v30, v57); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 456LL))(a1, v30); v31 = cocos2d::CCDirector::sharedDirector(); v32 = sub_100207EA8(v31); if ( *(_BYTE *)(AppDelegate::get(v33, v34) + 37) ) v35 = 25.0; else v35 = 0.0; v36 = cocos2d::CCDirector::sharedDirector(); v37 = sub_100207E98(v36); sub_1000262BC((float *)v57, (float)(v32 + 10.0) + v35, v37 + -5.0); (*(void (__fastcall **)(void *, void **))(*(_QWORD *)v30 + 184LL))(v30, v57); (*(void (__fastcall **)(void *, float))(*(_QWORD *)v30 + 160LL))(v30, 0.5); v38 = sub_100403570(*(_QWORD *)(a1 + 576)); v39 = *(_QWORD *)(*(_QWORD *)(a1 + 576) + 14288LL); sub_1000262BC((float *)v57, v38 + 340.0, 0.0); v40 = sub_100402398(v39, (double *)v57, 0, 0, 0, 0, 0, 0); v41 = *(_QWORD *)(a1 + 576); v42 = *(_DWORD *)(*(_QWORD *)(v41 + 1936) + 1232LL); if ( v42 >= 1 && (float)((float)(unsigned int)v42 / 240.0) > v40 ) v40 = (float)(unsigned int)v42 / 240.0; LengthKey = GJGameLevel::getLengthKey((int)v40, *(_BYTE *)(*(_QWORD *)(v41 + 3272) + 341LL)); GJGameLevel::lengthKeyToString(LengthKey, __p); if ( v56 >= 0 ) v44 = (char *)__p; else v44 = (char *)__p[0]; sub_100009900(v57, v44); if ( v56 < 0 ) operator delete(__p[0]); if ( (*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 576) + 3272LL) + 341LL) & 1) != 0 ) { v45 = "Length: Platformer"; } else { v46 = vcvtms_s32_f32(v40 / 60.0); v47 = v40 - (float)(60 * v46); v48 = v57; if ( v58 < 0 ) v48 = (void **)v57[0]; if ( v46 < 1 ) v49 = sub_1003065B0("Length: %i seconds (%s)", (int)v47, (const char *)v48); else v49 = sub_1003065B0("Length: %imin %is (%s)", v46, (int)v47, (const char *)v48); v45 = (const char *)cocos2d::CCString::getCString((__int64)v49); } v50 = cocos2d::CCLabelBMFont::create_1(v45, "goldFont.fnt"); sub_1000262BC((float *)__p, 0.0, 1.0); (*(void (__fastcall **)(void *, void **))(*(_QWORD *)v50 + 296LL))(v50, __p); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)a1 + 456LL))(a1, v50); v51 = (float32x2_t *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v30 + 192LL))(v30); sub_1000262BC((float *)&v54, 0.0, -20.0); *(float32x2_t *)&v52 = sub_100026318(v51, &v54, (float32x2_t *)__p); (*(void (__fastcall **)(void *, void **, double))(*(_QWORD *)v50 + 184LL))(v50, __p, v52); (*(void (__fastcall **)(void *, float))(*(_QWORD *)v50 + 160LL))(v50, 0.5); if ( v58 < 0 ) operator delete(v57[0]); if ( v61 < 0 ) operator delete(v59); if ( v64 < 0 ) operator delete(v62); if ( SHIBYTE(v66.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v66.__r_.__value_.__l.__data_); return v3; }