// // ProfilePage::setupAccountButtons from 0x5f5d5c to 0x5f61c8 (1132 bytes) // // 2 xrefs: // > ProfilePage::loadPageFromUserInfo @ 0x5f8d8c // > ProfilePage::loadPageFromUserInfo @ 0x5f9d6c // // 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:54:31 +0000 // float __fastcall ProfilePage::setupAccountButtons(float this) { int v1; // r4 cocos2d::CCArray *WinSize; // r0 float v3; // s17 int v4; // r5 cocos2d::CCArray *v5; // r8 const char *v6; // r1 int v7; // r7 GameManager *v8; // r0 const char *v9; // r1 GameManager *v10; // r0 GameManager *v11; // r0 const char *v12; // r1 int v13; // r3 int v14; // r2 GameManager *v15; // r5 int v16; // r9 cocos2d::CCObject *v17; // r5 GameManager *v18; // r0 int v19; // r0 int v20; // r3 int v21; // r3 char *v22; // r0 int v23; // r5 cocos2d::CCObject *v24; // r5 int v25; // r3 int v26; // r5 int v27; // r9 cocos2d::CCObject *v28; // r5 int v29; // r5 void (__fastcall *v30)(int, _DWORD); // r9 float v31; // s18 int v32; // r0 cocos2d::CCObject *v33; // r9 GameManager *v34; // r0 GameManager *v35; // r0 GameManager *v36; // r0 const char *v37; // r1 int v38; // r9 void (__fastcall *v39)(int, _DWORD); // r11 float v40; // s18 float v41; // s18 int v42; // r0 GameManager *(__fastcall *v43)(GameManager *, cocos2d::CCObject *, int, GJEditorSoundConfig *); // r3 GameManager *v44; // r0 const char *v45; // r1 void (__fastcall *v46)(int, _DWORD); // r11 float v47; // s18 float v48; // s18 int v49; // r0 cocos2d::CCObject *v50; // r5 const cocos2d::CCPoint *v51; // r6 const cocos2d::CCPoint *v52; // r7 cocos2d::CCObject *v53; // r5 float v54[16]; // [sp+Ch] [bp-60h] BYREF _BYTE v55[8]; // [sp+4Ch] [bp-20h] BYREF _BYTE v56[8]; // [sp+54h] [bp-18h] BYREF _BYTE v57[8]; // [sp+5Ch] [bp-10h] BYREF v1 = LODWORD(this); if ( !*(_BYTE *)(LODWORD(this) + 560) ) { this = COERCE_FLOAT(GJAccountManager::sharedState((GJAccountManager *)LODWORD(this))); if ( *(_DWORD *)(LODWORD(this) + 280) - *(_DWORD *)(LODWORD(this) + 284) != *(_DWORD *)(v1 + 556) ) { cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(this)); WinSize = (cocos2d::CCArray *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v54); v3 = (float)(v54[1] * 0.5) - 123.0; v4 = *(_DWORD *)(*(_DWORD *)(v1 + 552) + 520); v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(WinSize); v7 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"accountBtn_blocked_001.png", v6); v8 = (GameManager *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v7 + 80))(v7, 1061158912); if ( v4 == 2 ) { v25 = *(_DWORD *)(v1 + 552); v26 = *(unsigned __int8 *)(v25 + 554); if ( !*(_BYTE *)(v25 + 554) ) { v27 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"accountBtn_unblock_001.png", v9); (*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1061158912); LODWORD(v54[7]) = v26; LODWORD(v54[6]) = ProfilePage::onUnblockUser; v28 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v27, v26, v1, (int)ProfilePage::onUnblockUser, v26); CCMenuItemSpriteExtra::setSizeMult((int)v28, 1.2); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v1 + 444) + 228))( *(_DWORD *)(v1 + 444), v28); cocos2d::CCArray::addObject(v5, v28); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v1 + 608), v28); } if ( !*(_BYTE *)(*(_DWORD *)(v1 + 552) + 554) ) { LABEL_26: v29 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_reportBtn_001.png", v9); v30 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v29 + 80); v31 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v7 + 164))(v7) + 4) * 0.75; v32 = (*(int (__fastcall **)(int))(*(_DWORD *)v29 + 164))(v29); v30(v29, v31 / *(float *)(v32 + 4)); v54[11] = 0.0; LODWORD(v54[10]) = ProfilePage::onReportUser; v33 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v29, 0, v1, (int)ProfilePage::onReportUser, 0); CCMenuItemSpriteExtra::setSizeMult((int)v33, 1.2); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v1 + 444) + 228))( *(_DWORD *)(v1 + 444), v33); cocos2d::CCArray::addObject(v5, v33); v34 = (GameManager *)cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v1 + 608), v33); v35 = (GameManager *)GameManager::sharedState(v34); v36 = (GameManager *)GameManager::modUIRank(v35); if ( v36 == (GameManager *)((char *)&dword_0 + 2) ) { v38 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"modBadge_02_001.png", v37); v39 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v38 + 80); v40 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v29 + 84))(v29)); v41 = v40 * *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v29 + 164))(v29) + 4); v42 = (*(int (__fastcall **)(int))(*(_DWORD *)v38 + 164))(v38); v39(v38, v41 / *(float *)(v42 + 4)); v43 = (GameManager *(__fastcall *)(GameManager *, cocos2d::CCObject *, int, GJEditorSoundConfig *))ProfilePage::onAdminPanel; v54[13] = 0.0; LODWORD(v54[12]) = ProfilePage::onAdminPanel; } else { v44 = (GameManager *)GameManager::sharedState(v36); if ( GameManager::modUIRank(v44) != 1 ) { LABEL_31: v51 = *(const cocos2d::CCPoint **)(v1 + 444); v52 = *(const cocos2d::CCPoint **)(v1 + 460); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v57, v54[0] * 0.5, v3); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v56, v52); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v55, v51); return GameToolbox::alignItemsHorisontally(*(float *)&v5, 12.0, (int)v55, 0); } v38 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"modBadge_01_001.png", v45); v46 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v38 + 80); v47 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v29 + 84))(v29)); v48 = v47 * *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v29 + 164))(v29) + 4); v49 = (*(int (__fastcall **)(int))(*(_DWORD *)v38 + 164))(v38); v46(v38, v48 / *(float *)(v49 + 4)); v43 = ProfilePage::onModNotes; v54[15] = 0.0; LODWORD(v54[14]) = ProfilePage::onModNotes; } v50 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v38, 0, v1, (int)v43, 0); CCMenuItemSpriteExtra::setSizeMult((int)v50, 1.5); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v1 + 444) + 228))( *(_DWORD *)(v1 + 444), v50); cocos2d::CCArray::addObject(v5, v50); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v1 + 608), v50); goto LABEL_31; } } else { v10 = (GameManager *)GameManager::sharedState(v8); v11 = (GameManager *)GameManager::messagesRestricted(v10); v13 = *(_DWORD *)(v1 + 552); v14 = *(_DWORD *)(v13 + 356); v15 = v11; if ( v14 != 2 ) { if ( v14 != 1 || *(_DWORD *)(v13 + 520) == 1 || (v11 = (GameManager *)GameManager::sharedState(v11), (unsigned int)(*((_DWORD *)v11 + 205) - *((_DWORD *)v11 + 206) - 1) <= 1) ) { if ( !v15 ) { v16 = cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"accountBtn_messages_001.png", v12); (*(void (__fastcall **)(int, int))(*(_DWORD *)v16 + 80))(v16, 1061158912); v54[3] = 0.0; LODWORD(v54[2]) = ProfilePage::onSendMessage; v17 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v16, 0, v1, (int)ProfilePage::onSendMessage, 0); CCMenuItemSpriteExtra::setSizeMult((int)v17, 1.2); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v1 + 444) + 228))( *(_DWORD *)(v1 + 444), v17); cocos2d::CCArray::addObject(v5, v17); v11 = (GameManager *)cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v1 + 608), v17); } } } v18 = (GameManager *)GameManager::sharedState(v11); v19 = GameManager::friendRequestsRestricted(v18); v20 = *(_DWORD *)(v1 + 552); if ( (*(_DWORD *)(v20 + 360) != 1 || *(_DWORD *)(v20 + 520)) && !v19 ) { v21 = *(_DWORD *)(v20 + 520); switch ( v21 ) { case 3: v22 = "accountBtn_pendingRequest_001.png"; break; case 4: v22 = "accountBtn_pending_001.png"; break; case 1: v22 = "accountBtn_removeFriend_001.png"; break; default: v22 = "accountBtn_requests_001.png"; break; } v23 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v22, v9); (*(void (__fastcall **)(int, int))(*(_DWORD *)v23 + 80))(v23, 1061158912); v54[5] = 0.0; LODWORD(v54[4]) = ProfilePage::onFriend; v24 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v23, 0, v1, (int)ProfilePage::onFriend, 0); CCMenuItemSpriteExtra::setSizeMult((int)v24, 1.2); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v1 + 444) + 228))( *(_DWORD *)(v1 + 444), v24); cocos2d::CCArray::addObject(v5, v24); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v1 + 608), v24); } } if ( (unsigned int)(*(_DWORD *)(*(_DWORD *)(v1 + 552) + 512) - 1) > 1 ) { v54[9] = 0.0; LODWORD(v54[8]) = ProfilePage::onBlockUser; v53 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v7, 0, v1, (int)ProfilePage::onBlockUser, 0); CCMenuItemSpriteExtra::setSizeMult((int)v53, 1.2); (*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v1 + 444) + 228))( *(_DWORD *)(v1 + 444), v53); cocos2d::CCArray::addObject(v5, v53); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v1 + 608), v53); } goto LABEL_26; } } return this; }
GD Web Decomp Icon

GD Web Decomp

Raw Source