// // ReportPopup::init from 0xd003e0 to 0xd01060 (3200 bytes) // // 2 xrefs: // > ReportPopup::create @ 0xd01310 // > @ 0x82de0 // // 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 13:06:54 +0000 // __int64 __fastcall ReportPopup::init(ReportPopup *this, const ReportPopupConfig *a2) { __int64 v4; // x19 __int64 v5; // x0 __int64 v6; // x19 _BOOL4 v7; // w27 float v8; // s12 ReportPopup *v9; // x28 __int64 v10; // x1 float v11; // s8 float v12; // s11 float v13; // s8 unsigned __int8 v14; // w0 unsigned int v15; // w23 char *v16; // x25 char *v17; // x1 size_t v18; // x2 char *v19; // x1 size_t v20; // x2 char *v21; // x1 size_t v22; // x2 cocos2d::CCDirector *v23; // x0 char *v24; // x4 cocos2d::CCDirector *v25; // x3 __int64 v26; // x26 signed __int64 v27; // x22 unsigned __int64 v28; // x24 cocos2d::CCDirector *v29; // x1 unsigned __int64 v30; // x1 unsigned __int64 v31; // x0 cocos2d::CCDirector *v32; // x0 float v33; // s10 float v34; // s14 float v35; // s9 float v36; // s8 const char *v37; // x1 __int64 v38; // x26 __int64 v39; // x26 const char *v40; // x2 int v41; // w0 cocos2d::CCLabelBMFont *v42; // x0 cocos2d::CCLabelBMFont *v44; // x25 void (__fastcall *v45)(cocos2d::CCLabelBMFont *, void **); // x26 const char *v46; // x2 EmoteSprite *v47; // x0 int v48; // w2 int v49; // w25 size_t v50; // x26 size_t v51; // x2 int v52; // w3 unsigned __int64 v53; // x0 unsigned __int64 v54; // x4 unsigned __int64 v55; // x1 _QWORD *v56; // x8 char *v57; // x1 char *v58; // x5 unsigned __int64 v59; // x1 signed __int64 v60; // x26 char *v61; // x1 size_t v62; // x1 size_t v63; // x3 unsigned __int64 v64; // x1 char *v65; // x4 char *v66; // x5 size_t v67; // x3 __int64 v68; // x0 size_t v69; // x1 unsigned __int8 v70; // w2 size_t v71; // x3 char *v72; // x1 __int64 v73; // x0 size_t v74; // x3 const char *v75; // x2 cocos2d::CCLabelBMFont *v76; // x0 cocos2d::CCLabelBMFont *v77; // x19 void (__fastcall *v78)(cocos2d::CCLabelBMFont *, char *); // x25 __int64 v79; // x19 void (__fastcall *v80)(__int64, void **); // x25 float v81; // s3 float v82; // s4 const char *v83; // x6 __int64 v84; // x0 __int64 v85; // x19 cocos2d::CCNode *v86; // x25 void (__fastcall *v87)(__int64, void **); // x20 cocos2d::CCDirector *v88; // x3 char *v89; // [xsp+A0h] [xbp+A0h] char *v90; // [xsp+A8h] [xbp+A8h] cocos2d::CCNode *v91; // [xsp+B0h] [xbp+B0h] cocos2d::CCNode *v92; // [xsp+B0h] [xbp+B0h] int v93[2]; // [xsp+B8h] [xbp+B8h] char *v94; // [xsp+C0h] [xbp+C0h] void *v95; // [xsp+C0h] [xbp+C0h] void (__fastcall *v96)(__int64, void **); // [xsp+C0h] [xbp+C0h] int v97; // [xsp+C0h] [xbp+C0h] char *v98; // [xsp+C0h] [xbp+C0h] __int64 *v99; // [xsp+C8h] [xbp+C8h] __int64 v100; // [xsp+D0h] [xbp+D0h] BYREF char v101[8]; // [xsp+D8h] [xbp+D8h] BYREF void *v102; // [xsp+E0h] [xbp+E0h] BYREF _BYTE *v103; // [xsp+E8h] [xbp+E8h] __int64 v104; // [xsp+F0h] [xbp+F0h] __int64 v105; // [xsp+F8h] [xbp+F8h] BYREF size_t v106; // [xsp+100h] [xbp+100h] cocos2d::CCLabelBMFont *v107; // [xsp+108h] [xbp+108h] __int64 v108[2]; // [xsp+110h] [xbp+110h] BYREF void *v109; // [xsp+120h] [xbp+120h] __int64 v110; // [xsp+128h] [xbp+128h] BYREF size_t v111; // [xsp+130h] [xbp+130h] void *v112; // [xsp+138h] [xbp+138h] __int64 v113; // [xsp+140h] [xbp+140h] BYREF size_t v114; // [xsp+148h] [xbp+148h] void *v115; // [xsp+150h] [xbp+150h] v4 = *((_QWORD *)a2 + 12); v5 = *((_QWORD *)a2 + 13); if ( v4 == v5 ) return 0; v6 = (v5 - v4) >> 2; v7 = (int)v6 > 6; if ( (int)v6 > 6 ) v8 = 24.0; else v8 = 28.0; v9 = (const ReportPopupConfig *)((char *)a2 + 40); v10 = *((_BYTE *)a2 + 40) >> 1; if ( (*((_BYTE *)a2 + 40) & 1) != 0 ) v10 = *((_QWORD *)a2 + 6); if ( v10 ) { v11 = 178.0; v12 = 16.0; } else { v11 = 162.0; v12 = 0.0; } v13 = v11 + (float)(v8 * (float)(v6 - 1)); v14 = SetupTriggerPopup::init(this, nullptr, nullptr, 320.0, v13, 1u, 0.0); v15 = v14; if ( !v14 ) return 0; *((_DWORD *)this + 256) = *(_DWORD *)a2; v16 = (char *)this + 1040; *((_DWORD *)this + 257) = *((_DWORD *)a2 + 1); *((_DWORD *)this + 258) = *((_DWORD *)a2 + 2); if ( (char *)this + 1040 != (char *)a2 + 16 ) { if ( (*((_BYTE *)a2 + 16) & 1) != 0 ) { v17 = *((char **)a2 + 4); v18 = *((_QWORD *)a2 + 3); } else { v17 = (char *)a2 + 17; v18 = *((_BYTE *)a2 + 16) >> 1; } std::string::assign((__int64 *)this + 130, v17, v18); } if ( (ReportPopup *)((char *)this + 1064) != v9 ) { if ( (*((_BYTE *)a2 + 40) & 1) != 0 ) { v19 = *((char **)a2 + 7); v20 = *((_QWORD *)a2 + 6); } else { v19 = (char *)a2 + 41; v20 = *((_BYTE *)a2 + 40) >> 1; } std::string::assign((__int64 *)this + 133, v19, v20); } *((_QWORD *)this + 136) = *((_QWORD *)a2 + 8); if ( (char *)this + 1096 != (char *)a2 + 72 ) { if ( (*((_BYTE *)a2 + 72) & 1) != 0 ) { v21 = *((char **)a2 + 11); v22 = *((_QWORD *)a2 + 10); } else { v21 = (char *)a2 + 73; v22 = *((_BYTE *)a2 + 72) >> 1; } std::string::assign((__int64 *)this + 137, v21, v22); } v99 = (__int64 *)((char *)this + 1120); v23 = (const ReportPopupConfig *)((char *)a2 + 96); if ( (char *)this + 1120 != (char *)a2 + 96 ) { v24 = *((char **)a2 + 12); v25 = *((cocos2d::CCDirector **)this + 140); v26 = *((_QWORD *)a2 + 13); v27 = v26 - (_QWORD)v24; v28 = (v26 - (__int64)v24) >> 2; if ( v28 <= (__int64)(*((_QWORD *)this + 142) - (_QWORD)v25) >> 2 ) { v23 = *((cocos2d::CCDirector **)this + 141); v58 = (char *)(v23 - v25); v59 = (v23 - v25) >> 2; if ( v28 <= v59 ) { if ( v28 ) { v88 = (cocos2d::CCDirector *)((char *)memmove(*((void **)this + 140), v24, v26 - (_QWORD)v24) + v27); v23 = *((cocos2d::CCDirector **)this + 141); } else { v88 = (cocos2d::CCDirector *)((char *)v25 + v27); } if ( v23 != v88 ) { v23 = (cocos2d::CCDirector *)((char *)v23 + 4 * ~((unsigned __int64)((cocos2d::CCDirector *)((char *)v23 - 4) - v88) >> 2)); *((_QWORD *)this + 141) = v23; } } else { if ( v59 ) { *(_QWORD *)v93 = v24; v98 = (char *)(v23 - v25); v23 = (cocos2d::CCDirector *)memmove(*((void **)this + 140), v24, v23 - v25); v58 = v98; v24 = *(char **)v93; } v60 = v26 - (unsigned __int64)&v58[(_QWORD)v24]; if ( v60 > 3 ) { memcpy(*((void **)this + 141), &v58[(_QWORD)v24], v60); v23 = *((cocos2d::CCDirector **)this + 141); *((_QWORD *)this + 141) = (char *)v23 + v60; } } } else { if ( v25 ) { v29 = *((cocos2d::CCDirector **)this + 141); if ( v25 != v29 ) *((_QWORD *)this + 141) = (char *)v29 + 4 * ~((unsigned __int64)((cocos2d::CCDirector *)((char *)v29 - 4) - v25) >> 2); v94 = v24; operator delete(v25); *((_QWORD *)this + 142) = 0; v24 = v94; *((_QWORD *)this + 141) = 0; *((_QWORD *)this + 140) = 0; } v30 = 0x3FFFFFFFFFFFFFFFLL; if ( v28 > 0x3FFFFFFFFFFFFFFFLL ) sub_631898(); v31 = (__int64)(*((_QWORD *)this + 142) - *((_QWORD *)this + 140)) >> 2; if ( v31 <= 0x1FFFFFFFFFFFFFFELL ) { v30 = 2 * v31; if ( 2 * v31 < v28 ) v30 = v28; } v95 = v24; v23 = (cocos2d::CCDirector *)std::vector::allocate(v99, v30); if ( v27 > 3 ) { memcpy(*((void **)this + 141), v95, v27); v23 = *((cocos2d::CCDirector **)this + 141); *((_QWORD *)this + 141) = (char *)v23 + v27; } } } v32 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v23); cocos2d::CCDirector::getWinSize(&v100, v32); v113 = 0; v33 = *((float *)&v100 + 1) * 0.5; v34 = v13 * 0.5; v114 = 0; v35 = *(float *)&v100 * 0.5; v115 = nullptr; std::string::__init(&v113, "Report", 6u); v36 = (float)(v13 * 0.5) + v33; SetupTriggerPopup::addTitle((__int64)this, (__int64)&v113); if ( (v113 & 1) != 0 ) operator delete(v115); v38 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v37); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v38 + 160LL))(v38, 0.8); v39 = CCMenuItemSpriteExtra::create(v38, 0, (__int64)this, 1368, 1); CCMenuItemSpriteExtra::setSizeMult(v39, 1.5); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v39); v96 = *(void (__fastcall **)(__int64, void **))(*(_QWORD *)v39 + 184LL); v91 = *((cocos2d::CCNode **)this + 69); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, (float)(v35 - 160.0) + 8.0, v36 - 12.0); cocos2d::CCNode::convertToNodeSpace((__int64 *)&v102, v91, (const cocos2d::CCPoint *)v101); v96(v39, &v102); if ( v12 > 0.0 ) { v41 = *((unsigned __int8 *)this + 1096); if ( (v41 & 1) != 0 ) { if ( *((_QWORD *)this + 138) ) { v16 = (char *)this + 1096; LABEL_39: v42 = *((cocos2d::CCLabelBMFont **)v16 + 2); goto LABEL_46; } } else if ( v41 >> 1 ) { v16 = (char *)this + 1096; goto LABEL_45; } } if ( (*((_BYTE *)this + 1040) & 1) != 0 ) goto LABEL_39; LABEL_45: v42 = (cocos2d::CCLabelBMFont *)(v16 + 1); LABEL_46: v44 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v42, "bigFont.fnt", v40); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, float))(*(_QWORD *)v44 + 160LL))(v44, 0.6); cocos2d::CCLabelBMFont::limitLabelWidth(v44, 280.0, 0.6, 0.2); v45 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, void **))(*(_QWORD *)v44 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v102, v35, (float)(v36 - 42.0) + 6.0); v45(v44, &v102); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v44, 1); if ( v12 > 0.0 ) { v47 = (EmoteSprite *)*((unsigned int *)this + 256); if ( (_DWORD)v47 == 8 ) v97 = EmoteSprite::maxEmotesMessage(v47); else v97 = EmoteSprite::maxEmotesComment(v47); v102 = nullptr; v103 = nullptr; v104 = 0; EmoteSprite::parseTokens((char *)this + 1064, &v102, v97); v48 = *((unsigned __int8 *)this + 1064); v49 = v48 & 1; if ( (v48 & 1) != 0 ) { v50 = *((_QWORD *)this + 134); LODWORD(v51) = v48 >> 1; } else { LODWORD(v51) = v48 >> 1; v50 = (int)v51; } v51 = (int)v51; v52 = 61; v53 = 0; v54 = 0; while ( 1 ) { LABEL_53: v55 = (int)v51; if ( v49 ) v55 = *((_QWORD *)this + 134); if ( v53 >= v55 ) break; if ( !--v52 ) { v50 = v53; break; } if ( v54 < 0xAAAAAAAAAAAAAAABLL * ((v103 - (_BYTE *)v102) >> 3) && (v56 = (char *)v102 + 24 * v54, *v56 == v53) ) { ++v54; v53 += v56[1]; } else { do { ++v53; if ( v49 ) { if ( v53 >= *((_QWORD *)this + 134) ) goto LABEL_53; v57 = *((char **)this + 135); } else { if ( v53 >= (int)v51 ) goto LABEL_53; v57 = (char *)this + 1065; } } while ( (v57[v53] & 0xC0) == 0x80 ); } } v108[0] = 0; v61 = (char *)this + 1065; v108[1] = 0; v109 = nullptr; if ( v49 ) { v51 = *((_QWORD *)this + 134); v61 = *((char **)this + 135); } if ( v51 > v50 ) v51 = v50; std::string::__init(v108, v61, v51); v62 = *((_BYTE *)this + 1064) >> 1; if ( (*((_BYTE *)this + 1064) & 1) != 0 ) v62 = *((_QWORD *)this + 134); GameToolbox::singleLineSnippet((__int64)v108, v62, (__int64)&v110); if ( (v110 & 1) != 0 ) { v63 = v111; v64 = (v110 & 0xFFFFFFFFFFFFFFFELL) - 1; if ( v111 != v64 ) { v65 = (char *)v112; LABEL_86: v66 = &byte_11ACB00; if ( v63 ) { if ( v65 <= &byte_11ACB00 && &v65[v63] > &byte_11ACB00 ) v66 = &byte_11ACB01; v89 = v66; v90 = v65; v92 = (cocos2d::CCNode *)v63; memmove(v65 + 1, v65, v63); v63 = (size_t)v92; v65 = v90; v66 = v89; } v67 = v63 + 1; *v65 = *v66; if ( (v110 & 1) != 0 ) v111 = v67; else LOBYTE(v110) = 2 * v67; v65[v67] = 0; goto LABEL_94; } } else { v65 = (char *)&v110 + 1; v63 = (int)(unsigned __int8)v110 >> 1; if ( (_DWORD)v63 != 22 ) goto LABEL_86; v64 = 22; } std::string::__grow_by_and_replace((__int64)&v110, v64, 1u, v64, 0, 0, 1u, &byte_11ACB00); LABEL_94: v68 = v110; v69 = v111; v70 = *((_BYTE *)this + 1064); v115 = v112; v110 = 0; v71 = v70 >> 1; v111 = 0; v113 = v68; v114 = v69; v112 = nullptr; if ( (v70 & 1) != 0 ) v71 = *((_QWORD *)this + 134); v72 = &byte_11ACB00; if ( v50 < v71 ) v72 = "...\""; v73 = std::string::append((__int64)&v113, v72); v74 = *(_QWORD *)(v73 + 8); v105 = *(_QWORD *)v73; v106 = v74; v107 = *(cocos2d::CCLabelBMFont **)(v73 + 16); *(_QWORD *)v73 = 0; *(_QWORD *)(v73 + 8) = 0; *(_QWORD *)(v73 + 16) = 0; if ( (v113 & 1) != 0 ) operator delete(v115); if ( (v110 & 1) != 0 ) operator delete(v112); if ( (v108[0] & 1) != 0 ) operator delete(v109); if ( v102 != v103 ) v103 += -24 * ((0xAAAAAAAAAAAAAABLL * ((unsigned __int64)(v103 - 24 - (_BYTE *)v102) >> 3)) & 0x1FFFFFFFFFFFFFFFLL) - 24; EmoteSprite::parseTokens((char *)&v105, &v102, v97); if ( v102 != v103 ) { EmoteSprite::replaceTokens((__int64)&v105, (__int64 *)&v102, &v113, 0.0); if ( (v105 & 1) != 0 ) { *(_BYTE *)v107 = 0; v106 = 0; } else { LOWORD(v105) = 0; } std::string::reserve(&v105, 0); v107 = (cocos2d::CCLabelBMFont *)v115; v105 = v113; v106 = v114; } v76 = (cocos2d::CCLabelBMFont *)((char *)&v105 + 1); if ( (v105 & 1) != 0 ) v76 = v107; v77 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v76, "chatFont.fnt", v75); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, float))(*(_QWORD *)v77 + 160LL))(v77, 0.55); cocos2d::CCLabelBMFont::limitLabelWidth(v77, 280.0, 0.55, 0.3); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(*(_QWORD *)v77 + 1024LL))(v77, 4294967210LL); v78 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v77 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, v35, v36 - 60.0); v78(v77, v101); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v77, 1); EmoteSprite::attachToLabel((__int64)v77, *((_QWORD *)this + 73), (__int64 *)&v102, 0.0); if ( (v105 & 1) != 0 ) operator delete(v107); if ( v102 ) { if ( v102 != v103 ) v103 += -24 * ((0xAAAAAAAAAAAAAABLL * ((unsigned __int64)(v103 - 24 - (_BYTE *)v102) >> 3)) & 0x1FFFFFFFFFFFFFFFLL) - 24; operator delete(v102); } } v79 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Select one or more reasons:", "goldFont.fnt", v46); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v79 + 160LL))(v79, 0.5); v80 = *(void (__fastcall **)(__int64, void **))(*(_QWORD *)v79 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v102, v35, (float)(v36 - 66.0) - v12); v80(v79, &v102); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v79, 1); if ( v7 ) { v81 = 0.6; v82 = 0.45; } else { v82 = 0.5; v81 = 0.7; } ReportPopup::buildReasonRows( (const char **)v99, *((cocos2d::CCNode **)this + 69), *((_QWORD *)this + 73), (__int64)this, (__int64)ReportPopup::onReasonToggle, 0, (__int64)this + 1144, 0, v35 - 110.0, (float)(v36 - 96.0) - v12, v8, v81, v82, 230.0, 0.0); v84 = ButtonSprite::create( (ButtonSprite *)"Report", (const char *)&qword_60 + 4, 0, 1, 0.7, "bigFont.fnt", "GJ_button_06.png", v83, 30.0); v85 = CCMenuItemSpriteExtra::create(v84, 0, (__int64)this, (__int64)ReportPopup::onSubmit, 0); CCMenuItemSpriteExtra::setSizeMult(v85, 1.1); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v85); v86 = *((cocos2d::CCNode **)this + 69); v87 = *(void (__fastcall **)(__int64, void **))(*(_QWORD *)v85 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, v35, (float)(v33 - v34) + 24.0); cocos2d::CCNode::convertToNodeSpace((__int64 *)&v102, v86, (const cocos2d::CCPoint *)v101); v87(v85, &v102); return v15; }
GD Web Decomp Icon

GD Web Decomp

Raw Source