// // ShareLevelLayer::init from 0x10026c960 to 0x10026d4d3 (2931 bytes) // // 1 xrefs: // > ShareLevelLayer::create @ 0x10026c90a // // This function is hookable on this platform (idp: pc, 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:27:36 +0000 // __int64 __fastcall ShareLevelLayer::init(_QWORD *a1, const std::string::value_type *a2) { unsigned int v4; // eax unsigned int v5; // ebx __int64 v6; // rsi __int64 v7; // rax __int64 v8; // r12 __int64 v9; // rax std::string::pointer data; // rdi __int64 v11; // r12 __int64 v12; // r13 __int64 v13; // rbx __int64 v14; // r13 const std::string::value_type *p_s; // rsi unsigned __int64 v16; // rsi int v17; // ecx int v18; // eax const char *v19; // r15 size_t v20; // rax size_t v21; // r12 char *v22; // r13 size_t v23; // rbx unsigned int v24; // eax __int64 v25; // r15 void *v26; // rax __int64 v27; // r15 __int64 v28; // rax __int64 v29; // r15 __int64 v30; // rax void *v31; // r12 const char *v32; // r9 char *v33; // rax void *v34; // r12 __int64 v35; // r12 __int64 v36; // r15 void *v37; // r15 __int64 v38; // r12 __int64 v39; // r12 void *v40; // r12 __int64 v41; // r13 __int64 v42; // rdx double v43; // xmm0_8 __int64 v44; // rax __int64 v45; // r12 __int64 v46; // r14 unsigned int *v47; // rax _BYTE v49[16]; // [rsp+0h] [rbp-100h] BYREF char v50[8]; // [rsp+10h] [rbp-F0h] BYREF char v51[8]; // [rsp+18h] [rbp-E8h] BYREF char v52[8]; // [rsp+20h] [rbp-E0h] BYREF const std::string::value_type *v53; // [rsp+28h] [rbp-D8h] _QWORD v54[2]; // [rsp+30h] [rbp-D0h] BYREF void *v55; // [rsp+40h] [rbp-C0h] _QWORD v56[2]; // [rsp+48h] [rbp-B8h] BYREF void *v57; // [rsp+58h] [rbp-A8h] unsigned __int8 v58; // [rsp+60h] [rbp-A0h] BYREF std::string::value_type __s; // [rsp+61h] [rbp-9Fh] BYREF __int64 v60; // [rsp+68h] [rbp-98h] void *v61; // [rsp+70h] [rbp-90h] _QWORD __dst[2]; // [rsp+78h] [rbp-88h] BYREF void *__p; // [rsp+88h] [rbp-78h] float v64; // [rsp+94h] [rbp-6Ch] double v65; // [rsp+98h] [rbp-68h] BYREF std::string __str; // [rsp+A0h] [rbp-60h] BYREF float v67; // [rsp+C4h] [rbp-3Ch] BYREF float v68; // [rsp+C8h] [rbp-38h] unsigned __int8 v69; // [rsp+CFh] [rbp-31h] double v70[6]; // [rsp+D0h] [rbp-30h] BYREF *(_DWORD *)&__str.__r_.__value_.__l.0 = -1778384896; v4 = cocos2d::CCLayerColor::initWithColor(a1, &__str); v5 = v4; if ( !(_BYTE)v4 ) return v5; v69 = v4; FLAlertLayer::incrementForcePrio(a1); a1[83] = a2; cocos2d::CCObject::retain(a2); (*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1000LL))(a1, 1); (*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1072LL))(a1, 1); v6 = cocos2d::CCDirector::sharedDirector(a1, 1); cocos2d::CCDirector::getWinSize(&v67, v6); v7 = cocos2d::CCLayer::create(); a1[73] = v7; (*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 456LL))(a1, v7); sub_100278270(&__str, 0.0, 0.0, COERCE_DOUBLE(1117782016), COERCE_DOUBLE(1117782016)); v8 = cocos2d::extension::CCScale9Sprite::create_2("GJ_square01.png", &__str); sub_100278260(&__str, COERCE_DOUBLE(1137836032), COERCE_DOUBLE(1133903872)); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v8 + 320LL))(v8, &__str); (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v8, 0xFFFFFFFFLL); sub_100278250(&__str, v67 * 0.5, v68 * 0.5); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v8 + 184LL))(v8, &__str); v9 = a1[83]; if ( (*(_BYTE *)(v9 + 344) & 1) != 0 ) { sub_10001AD30(&__str, *(const void **)(v9 + 360), *(_QWORD *)(v9 + 352)); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_4; } else { __str = *(std::string *)(v9 + 344); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) == 0 ) { LABEL_4: data = __str.__r_.__value_.__s.__data_; goto LABEL_7; } } data = __str.__r_.__value_.__l.__data_; LABEL_7: v11 = cocos2d::CCLabelBMFont::create_3(data, "goldFont.fnt"); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[73] + 456LL))(a1[73], v11); sub_100278250(&__str, v67 * 0.5, (float)((float)(v68 * 0.5) + 150.0) + -20.0); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v11 + 184LL))(v11, &__str); v55 = operator new(0x38u); v54[0] = 57; v54[1] = 53; strcpy((char *)v55, "You cannot change the name once it is shared."); sub_100278250(&__str, 0.5, 1.0); v64 = 1.0; v12 = TextArea::create(v54, "chatFont.fnt", &__str, 0, 0, 1.0, 400.0, 20.0); v53 = a2; if ( (v54[0] & 1) != 0 ) operator delete(v55); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[73] + 456LL))(a1[73], v12); v13 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11); sub_100278250(&v58, 0.0, -20.0); sub_100278350(&__str, v13, &v58); (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v12 + 184LL))(v12, &__str); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v12 + 160LL))(v12, 0.80000001); sub_100278250(v51, v67 * 0.5, (float)(0.5 * v68) + 60.0); sub_100278270(v49, 0.0, 0.0, COERCE_DOUBLE(1117782016), COERCE_DOUBLE(1117782016)); sub_1002787F0(&__str, v49); v14 = cocos2d::extension::CCScale9Sprite::create_2("square02b_001.png", &__str); sub_100278260(v50, COERCE_DOUBLE(1136525312), COERCE_DOUBLE(1112014848)); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v14 + 320LL))(v14, v50); (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v14, 0xFFFFFFFFLL); (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v14 + 184LL))(v14, v51); __str.__r_.__value_.__s.__data_[1] = 33; *(_WORD *)&__str.__r_.__value_.__l.0 = 16514; (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v14 + 960LL))(v14, &__str); __str.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x20u); __str.__r_.__value_.__r.__words[0] = 33; __str.__r_.__value_.__l.__size_ = 25; strcpy(__str.__r_.__value_.__l.__data_, "(No description provided)"); p_s = v53; GJGameLevel::getUnpackedLevelDescription(&v58, v53); if ( (v58 & 1) != 0 ) { if ( !v60 ) goto LABEL_19; } else if ( !(v58 >> 1) ) { goto LABEL_19; } if ( (v58 & 1) != 0 ) p_s = (const std::string::value_type *)v61; else p_s = &__s; std::string::assign(&__str, p_s); LABEL_19: sub_1004EE050(&__str); v16 = (unsigned int)EmoteSprite::maxEmotesComment(&__str, p_s); v17 = EmoteSprite::effectiveLength(&__str, v16); v18 = 180; if ( v17 > 180 || (v16 = (unsigned int)EmoteSprite::maxEmotesComment(&__str, v16), v18 = EmoteSprite::effectiveLength(&__str, v16), v18 >= 71) ) { v64 = (float)((float)((float)(180 - v18) / 180.0) * 0.30000001) + 0.69999999; } if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) v19 = __str.__r_.__value_.__l.__data_; else v19 = __str.__r_.__value_.__s.__data_; v20 = strlen(v19); if ( v20 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v21 = v20; if ( v20 >= 0x17 ) { v23 = 26; if ( (v20 | 7) != 0x17 ) v23 = (v20 | 7) + 1; v22 = (char *)operator new(v23); __p = v22; __dst[0] = v23 | 1; __dst[1] = v21; } else { LOBYTE(__dst[0]) = 2 * v20; v22 = (char *)__dst + 1; if ( !v20 ) goto LABEL_33; } v16 = (unsigned __int64)v19; memmove(v22, v19, v21); LABEL_33: v22[v21] = 0; sub_100278250(v70, 0.5, 0.5); v24 = EmoteSprite::maxEmotesComment(v70, v16); v25 = TextArea::create(__dst, "chatFont.fnt", v70, 1, v24, 1.0, 368.5 / v64, 20.0); if ( (__dst[0] & 1) != 0 ) operator delete(__p); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[73] + 456LL))(a1[73], v25); sub_100278250(&v65, 0.0, 1.0); sub_100278350(v70, v51, &v65); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v25 + 184LL))(v25, v70); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v25 + 160LL))(v25, v64); v26 = operator new(0x68u); v5 = v69; v57 = v26; v56[0] = 105; v56[1] = 102; strcpy( (char *)v26, "By sharing a level you give the rights to use the level\n(in any way) to the creators of Geometry Dash."); sub_100278250(v70, 0.5, 1.0); v27 = TextArea::create(v56, "chatFont.fnt", v70, 0, 0, 1.0, 380.0, 20.0); if ( (v56[0] & 1) != 0 ) operator delete(v57); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[73] + 456LL))(a1[73], v27); sub_100278250(v70, v67 * 0.5, (float)((float)(v68 * 0.5) + -150.0) + 65.0); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v27 + 184LL))(v27, v70); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v27 + 160LL))(v27, 0.64999998); *((_DWORD *)a1 + 160) = -1; v28 = cocos2d::CCMenu::create(); a1[69] = v28; (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v28, 10); ShareLevelLayer::setupStars(a1); v29 = sub_1007FE900(a1); v30 = sub_100059E00((__int64)"Cancel"); v31 = CCMenuItemSpriteExtra::create(v30, 0, (__int64)a1, (__int64)ShareLevelLayer::onClose, 0); (*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[69] + 456LL))(a1[69], v31); sub_1007FEBF0(v29, v31); v32 = "GJ_button_01.png"; if ( *(_BYTE *)(a1[83] + 785LL) ) v32 = "GJ_button_04.png"; v33 = sub_100059FD0((__int64)"Share Level", 0, 0, 0, (__int64)"goldFont.fnt", (__int64)v32, 1.0); v34 = CCMenuItemSpriteExtra::create((__int64)v33, 0, (__int64)a1, (__int64)ShareLevelLayer::onShare, 0); (*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[69] + 456LL))(a1[69], v34); sub_1007FEBF0(v29, v34); v35 = a1[69]; sub_100278250(&v65, v67 * 0.5, (float)((float)(v68 * 0.5) + -150.0) + 25.0); cocos2d::CCNode::convertToNodeSpace(v70, v35, (unsigned int *)&v65); GameToolbox::alignItemsHorisontally(v29, v70, 0, 15.0); v36 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsBtn02_001.png"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v36 + 160LL))(v36, 0.80000001); v37 = CCMenuItemSpriteExtra::create(v36, 0, (__int64)a1, (__int64)ShareLevelLayer::onSettings, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v37, 2.0); (*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[69] + 456LL))(a1[69], v37); v38 = a1[69]; sub_100278250(&v65, (float)((float)(v67 * 0.5) + 210.0) + -26.0, (float)((float)(v68 * 0.5) + 150.0) + -26.0); cocos2d::CCNode::convertToNodeSpace(v70, v38, (unsigned int *)&v65); (*(void (__fastcall **)(void *, double *))(*(_QWORD *)v37 + 184LL))(v37, v70); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_reportBtn_001.png"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 160LL))(v39, 0.60000002); v40 = CCMenuItemSpriteExtra::create(v39, 0, (__int64)a1, (__int64)sub_10026DB80, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v40, 1.2); (*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[69] + 456LL))(a1[69], v40); v41 = a1[69]; sub_100278250(&v65, (float)((float)(v67 * 0.5) + -210.0) + 26.0, (float)((float)(0.5 * v68) + 150.0) + -26.0); cocos2d::CCNode::convertToNodeSpace(v70, v41, (unsigned int *)&v65); (*(void (__fastcall **)(void *, double *))(*(_QWORD *)v40 + 184LL))(v40, v70); *(_QWORD *)&v43 = GameManager::sharedState(v40, v70, v42).u64[0]; if ( !(unsigned __int8)GameManager::getGameVariable(v44, "0029") ) { v45 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_optionsTxt_001.png"); (*(void (__fastcall **)(_QWORD, __int64, double))(*(_QWORD *)a1[73] + 456LL))(a1[73], v45, v43); v46 = a1[69]; v47 = (unsigned int *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v37 + 192LL))(v37); cocos2d::CCNode::convertToWorldSpace(&v65, v46, v47); sub_100278250(v52, -55.0, 0.0); sub_100278350(v70, &v65, v52); (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v45 + 184LL))(v45, v70); } if ( (v58 & 1) != 0 ) operator delete(v61); if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 ) operator delete(__str.__r_.__value_.__l.__data_); return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source