// // ThreadOptionsPopup::init from 0x7573ec to 0x757ada (1774 bytes) // // 1 xrefs: // > ThreadOptionsPopup::create @ 0x757bcc // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:58:56 +0000 // GameManager *__fastcall ThreadOptionsPopup::init( ThreadOptionsPopup *this, GJMessageThread *a2, ThreadViewPopup *a3, bool a4) { int v6; // r6 int v7; // r9 int v8; // r0 _BOOL4 v9; // r3 int v10; // r7 int v11; // r3 float v12; // s17 GameLevelManager *v13; // r0 GameLevelManager *v14; // r0 signed int v15; // r8 cocos2d::CCArray *ThreadMembers; // r9 int v17; // r0 int v18; // r3 _BOOL4 v19; // r3 int v20; // r3 int v21; // r1 float v22; // s20 float v23; // s16 const char *v24; // r9 size_t v25; // r0 cocos2d::CCLabelBMFont *v26; // r9 int RoleBadge; // r0 int v28; // r10 void (__fastcall *v29)(int, _DWORD *); // r8 float v30; // s18 float v31; // s19 float v32; // s22 float v33; // r0 __int64 v34; // r2 const char *v35; // r1 const char **v36; // r0 const char *v37; // r1 cocos2d::CCLabelBMFont *v38; // r2 const char *v39; // r2 cocos2d::CCLabelBMFont *v40; // r0 int v41; // r8 void (__fastcall *v42)(int, _DWORD *); // r11 int v43; // r8 int v44; // r8 _BYTE *v45; // r1 const char *v46; // r3 int v47; // r3 const char *v48; // r0 int v49; // r12 _BYTE *v50; // r2 _BYTE *v51; // r2 const char *v52; // r0 int v53; // r7 _BYTE *v54; // r2 int v55; // r3 _BYTE *v56; // r12 _BYTE *v57; // r2 _BYTE *v58; // r2 int v59; // r2 int v60; // r3 _BYTE *v61; // r2 _BYTE *v62; // r3 const char *v63; // r1 _BYTE *v64; // r2 _BYTE *v65; // r3 int v66; // r5 ButtonSprite *v67; // r0 int v68; // r7 int v69; // s15 const cocos2d::CCPoint *v70; // r11 _BYTE *v72; // r2 _BYTE *v73; // r3 float v74; // [sp+10h] [bp-C4h] GameManager *v75; // [sp+14h] [bp-C0h] _BOOL4 v76; // [sp+18h] [bp-BCh] void (__fastcall *v77)(int, _BYTE *); // [sp+18h] [bp-BCh] void (__fastcall *v78)(int, _BYTE *); // [sp+1Ch] [bp-B8h] cocos2d::CCPoint *v79; // [sp+24h] [bp-B0h] float v80[2]; // [sp+2Ch] [bp-A8h] BYREF _BYTE v81[8]; // [sp+34h] [bp-A0h] BYREF _BYTE v82[8]; // [sp+3Ch] [bp-98h] BYREF _DWORD v83[2]; // [sp+44h] [bp-90h] BYREF const char *v84; // [sp+4Ch] [bp-88h] const char *v85; // [sp+50h] [bp-84h] const char *v86; // [sp+6Ch] [bp-68h] BYREF const char *v87; // [sp+70h] [bp-64h] cocos2d::CCLabelBMFont *v88; // [sp+74h] [bp-60h] void *v89; // [sp+8Ch] [bp-48h] BYREF int v90; // [sp+90h] [bp-44h] void *v91; // [sp+94h] [bp-40h] int v92; // [sp+98h] [bp-3Ch] _BYTE v93[4]; // [sp+D0h] [bp-4h] BYREF if ( !a2 ) return nullptr; *((_DWORD *)this + 181) = a3; *((_BYTE *)this + 736) = a4; v6 = *((unsigned __int8 *)a2 + 168); if ( *((_BYTE *)a2 + 168) ) { v9 = 0; } else { v7 = *((_DWORD *)a2 + 33); v8 = GJAccountManager::sharedState((GJAccountManager *)&_stack_chk_guard); v9 = v7 == *(_DWORD *)(v8 + 280) - *(_DWORD *)(v8 + 284); } v10 = *((unsigned __int8 *)this + 736); v76 = v9; if ( *((_BYTE *)this + 736) ) { v10 = 0; v11 = 1; } else if ( v6 ) { v11 = 5; } else if ( *((_DWORD *)a2 + 43) == 8 ) { v10 = 1; v11 = 2; } else { v10 = 0; v11 = v9 ? 6 : 5; } v74 = *(float *)&v11; v12 = (float)(v11 - 1); v75 = SetupTriggerPopup::init(this, nullptr, nullptr, 240.0, (float)(v12 * 29.0) + 88.0, (char *)&dword_0 + 1, 0.0); if ( !v75 ) return nullptr; *((_DWORD *)this + 180) = a2; v13 = (GameLevelManager *)cocos2d::CCObject::retain(a2); if ( v6 ) { v14 = (GameLevelManager *)GameLevelManager::sharedState(v13); v15 = 0; ThreadMembers = (cocos2d::CCArray *)GameLevelManager::getThreadMembers( v14, *(const char **)(*((_DWORD *)this + 180) + 52)); while ( 1 ) { v13 = ThreadMembers; if ( ThreadMembers ) v13 = (GameLevelManager *)cocos2d::CCArray::count(ThreadMembers); if ( v15 >= (int)v13 ) break; v17 = cocos2d::CCArray::objectAtIndex(ThreadMembers, v15); if ( *(_DWORD *)(v17 + 296) == *(_DWORD *)(*((_DWORD *)this + 180) + 56) ) *((_DWORD *)this + 183) = *(_DWORD *)(v17 + 376) > 0; ++v15; } v18 = *((_DWORD *)this + 180); if ( *(int *)(v18 + 192) <= 0 ) { v20 = *(_DWORD *)(v18 + 172); if ( !v20 ) goto LABEL_26; v19 = v20 == 6; } else { v19 = 1; } *((_DWORD *)this + 183) = v19; } LABEL_26: cocos2d::CCDirector::sharedDirector(v13); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v80); v21 = *((_DWORD *)this + 180); v22 = v80[0] * 0.5; v23 = (float)((float)((float)(v12 * 29.0) + 88.0) * 0.5) + (float)(v80[1] * 0.5); if ( v6 ) { if ( (*(_BYTE *)(v21 + 60) & 1) != 0 ) v24 = *(const char **)(v21 + 68); else v24 = (const char *)(v21 + 61); } else if ( (*(_BYTE *)(v21 + 72) & 1) != 0 ) { v24 = *(const char **)(v21 + 80); } else { v24 = (const char *)(v21 + 73); } v89 = nullptr; v90 = 0; v91 = nullptr; v25 = strlen(v24); std::string::__init((int *)&v89, v24, v25); v26 = (cocos2d::CCLabelBMFont *)SetupTriggerPopup::addTitle((int)this, (unsigned __int8 *)&v89); std::string::~string((int)&v89); cocos2d::CCLabelBMFont::limitLabelWidth(v26, 180.0, 0.5, 0.2); if ( v6 ) { RoleBadge = GJMessageThread::createRoleBadge(*((GJMessageThread **)this + 180), 16.0); v28 = RoleBadge; if ( RoleBadge ) { v29 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)RoleBadge + 92); v30 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v26 + 112))(v26)); v31 = *(float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v26 + 164))(v26); v32 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v26 + 84))(v26)); v33 = (*(float (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v26 + 120))(v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, (float)(v30 + (float)((float)(v31 * v32) * 0.5)) + 6.0, v33); v29(v28, v83); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v28, 1); } } v34 = *(_QWORD *)(*((_DWORD *)this + 180) + 184); v35 = (const char *)((unsigned __int64)(v34 - 1) >> 32); if ( v34 >= 1 ) { GameToolbox::timestampToDateString((GameToolbox *)&v89, *(_DWORD *)(*((_DWORD *)this + 180) + 184)); v36 = (const char **)std::string::insert(&v89, 0, "Created: "); v37 = v36[1]; v38 = (cocos2d::CCLabelBMFont *)v36[2]; v86 = *v36; v87 = v37; v88 = v38; *v36 = nullptr; v36[1] = nullptr; v36[2] = nullptr; std::string::~string((int)&v89); if ( ((unsigned __int8)v86 & 1) != 0 ) v40 = v88; else v40 = (cocos2d::CCLabelBMFont *)((char *)&v86 + 1); v41 = cocos2d::CCLabelBMFont::create(v40, "chatFont.fnt", v39); (*(void (__fastcall **)(int, int))(*(_DWORD *)v41 + 80))(v41, 1058642330); (*(void (__fastcall **)(int, void *))(*(_DWORD *)v41 + 536))(v41, &unk_BF077C); (*(void (__fastcall **)(int, int))(*(_DWORD *)v41 + 512))(v41, 150); v42 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v41 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, v22, v23 - 33.0); v42(v41, v83); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v41, 1); std::string::~string((int)&v86); } v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v35); (*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1061997773); v83[0] = 684; v83[1] = 1; v44 = CCMenuItemSpriteExtra::create(v43, 0, (int)this, 684, 1); CCMenuItemSpriteExtra::setSizeMult(v44, 1.5); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v44); v78 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v44 + 92); v79 = *((cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, (float)(v22 - 120.0) + 8.0, v23 - 12.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v82, v79); v78(v44, v82); v45 = *((_BYTE **)this + 180); if ( !v10 ) { if ( *((_BYTE *)this + 736) ) { if ( v45[176] ) v46 = "Unlock Conversation"; else v46 = "Lock Conversation"; v84 = v46; v86 = "GJ_button_06.png"; v89 = ThreadOptionsPopup::onModLock; v90 = 0; } else if ( v6 ) { v84 = "View Profile"; v86 = "GJ_button_01.png"; v90 = 0; v89 = ThreadOptionsPopup::onViewProfile; } else { v84 = "Members"; v86 = "GJ_button_01.png"; v90 = 0; v89 = ThreadOptionsPopup::onMembers; if ( v76 ) { v85 = "Rename"; v87 = "GJ_button_04.png"; v92 = 0; v91 = ThreadOptionsPopup::onRename; goto LABEL_52; } } v47 = 1; goto LABEL_54; } v85 = "Remove"; v84 = "Report"; v87 = "GJ_button_06.png"; v89 = ThreadOptionsPopup::onReport; v86 = "GJ_button_05.png"; v90 = 0; v92 = 0; v91 = ThreadOptionsPopup::onDismissRemoved; LABEL_52: v47 = 2; LABEL_54: if ( v45[136] ) v48 = "Unmute"; else v48 = "Mute"; v49 = v47 + 1; v50 = &v93[4 * v47]; *((_DWORD *)v50 - 33) = v48; *((_DWORD *)v50 - 25) = "GJ_button_04.png"; v51 = &v93[8 * v47]; *((_DWORD *)v51 - 17) = ThreadOptionsPopup::onMuteRow; *((_DWORD *)v51 - 16) = 0; if ( v45[178] ) v52 = "Unpin"; else v52 = "Pin"; v53 = v47 + 2; v54 = &v93[4 * v49]; v55 = v47 + 3; *((_DWORD *)v54 - 33) = v52; *((_DWORD *)v54 - 25) = "GJ_button_04.png"; v56 = &v93[8 * v49]; *((_DWORD *)v56 - 16) = 0; *((_DWORD *)v56 - 17) = ThreadOptionsPopup::onPinRow; v57 = &v93[4 * v53]; *((_DWORD *)v57 - 33) = "Report"; *((_DWORD *)v57 - 25) = "GJ_button_05.png"; v58 = &v93[8 * v53]; *((_DWORD *)v58 - 17) = ThreadOptionsPopup::onReport; *((_DWORD *)v58 - 16) = 0; v59 = 4 * v55; v60 = 8 * v55; if ( v6 ) { if ( v45[169] ) { v61 = &v93[v59]; *((_DWORD *)v61 - 33) = "Cancel Request"; *((_DWORD *)v61 - 25) = "GJ_button_06.png"; v62 = &v93[v60]; *((_DWORD *)v62 - 16) = 0; *((_DWORD *)v62 - 17) = ThreadOptionsPopup::onCancelRequest; } else { if ( *((_DWORD *)this + 183) ) v63 = "Clear"; else v63 = "Leave"; v64 = &v93[v59]; v65 = &v93[v60]; *((_DWORD *)v64 - 33) = v63; *((_DWORD *)v64 - 25) = "GJ_button_06.png"; *((_DWORD *)v65 - 17) = ThreadOptionsPopup::onHide; *((_DWORD *)v65 - 16) = 0; } } else { v72 = &v93[v59]; *((_DWORD *)v72 - 33) = "Leave"; *((_DWORD *)v72 - 25) = "GJ_button_06.png"; v73 = &v93[v60]; *((_DWORD *)v73 - 16) = 0; *((_DWORD *)v73 - 17) = ThreadOptionsPopup::onLeave; } v66 = 0; do { v67 = ButtonSprite::create( (ButtonSprite *)(&v84)[v66], (const char *)&dword_80 + 2, 0, 0.5, 1, "bigFont.fnt", (char *)(&v86)[v66], (const char *)0x41B00000, v74); v68 = CCMenuItemSpriteExtra::create((int)v67, 0, (int)this, (int)*(&v89 + 2 * v66), *(&v90 + 2 * v66)); CCMenuItemSpriteExtra::setSizeMult(v68, 1.1); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v68); v69 = v66; v70 = *((const cocos2d::CCPoint **)this + 111); ++v66; v77 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v68 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v22, (float)(v23 - 61.0) - (float)((float)v69 * 29.0)); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v82, v70); v77(v68, v82); } while ( v66 != LODWORD(v74) ); return v75; }
GD Web Decomp Icon

GD Web Decomp

Raw Source