// // InfoLayer::onComment from 0x53d4b0 to 0x53d6c2 (530 bytes) // // 1 xrefs: // > InfoLayer::FLAlert_Clicked @ 0x53d71c // // 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:52:16 +0000 // int __fastcall InfoLayer::onComment(InfoLayer *this, cocos2d::CCObject *a2) { GJAccountManager *v3; // r0 GJAccountManager *v4; // r0 GameManager *v6; // r0 GameLevelManager *GameVariable; // r0 GameManager *v8; // r0 int *v9; // r5 GameLevelManager *v10; // r6 GameLevelManager *v11; // r8 const char *active; // r0 const char *PostCommentKey; // r0 char *TimeLeft; // r0 cocos2d::CCString *v15; // r0 const char *CString; // r6 size_t v17; // r0 int v18; // r9 const char *v19; // r11 int v20; // r0 int v21; // r10 size_t v22; // r0 int v23; // r11 _DWORD *v24; // r6 int v25; // r2 int v26[3]; // [sp+Ch] [bp-20h] BYREF int v27; // [sp+18h] [bp-14h] BYREF int v28; // [sp+1Ch] [bp-10h] int v29; // [sp+20h] [bp-Ch] v3 = (GJAccountManager *)GJAccountManager::sharedState(this); if ( *((_DWORD *)v3 + 70) - *((_DWORD *)v3 + 71) <= 0 ) { v4 = (GJAccountManager *)GJAccountManager::sharedState(v3); return GJAccountManager::showAccountNeededAlert(v4, "post comments"); } v6 = (GameManager *)GameManager::sharedState(v3); GameVariable = (GameLevelManager *)GameManager::getGameVariable(v6, "0012"); if ( !GameVariable ) { v8 = (GameManager *)GameManager::sharedState(nullptr); GameManager::setGameVariable(v8, "0012", (_BYTE *)&dword_0 + 1); v27 = 0; v28 = 0; v29 = 0; std::string::__init( &v27, "1. Do not spam.\n" "2. Do not harass other players.\n" "3. Do not post inappropriate or controversial content.\n" "4. Do not try to bypass these rules.\n" "These rules and their enforcement are entirely at Moderators' discretion.", 0xFDu); v9 = FLAlertLayer::create( (int)this + 528, (cocos2d::CCLabelBMFont *)"Comment Rules", (int)&v27, (ButtonSprite *)"Next", nullptr, 380.0); std::string::~string((int)&v27); (*(void (__fastcall **)(int *, int))(*v9 + 36))(v9, 3); return (*(int (__fastcall **)(int *))(*v9 + 656))(v9); } v10 = (GameLevelManager *)GameLevelManager::sharedState(GameVariable); v11 = (GameLevelManager *)GameLevelManager::sharedState(v10); active = (const char *)InfoLayer::activeCommentID(this); PostCommentKey = (const char *)GameLevelManager::getPostCommentKey(v11, active); TimeLeft = (char *)GameLevelManager::getTimeLeft(v10, PostCommentKey, 15.0); if ( (unsigned int)(TimeLeft - 1) <= 0xE ) { v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Please wait %i seconds before posting a new comment!", TimeLeft); v27 = 0; v28 = 0; v29 = 0; CString = (const char *)cocos2d::CCString::getCString(v15); v17 = strlen(CString); std::string::__init(&v27, CString, v17); v9 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Too fast", (int)&v27, (ButtonSprite *)"OK", nullptr, 300.0); std::string::~string((int)&v27); return (*(int (__fastcall **)(int *))(*v9 + 656))(v9); } if ( *((_DWORD *)this + 137) ) { v18 = 6; } else { if ( !*((_BYTE *)this + 640) ) { v18 = 0; LABEL_18: v19 = "Add Comment"; goto LABEL_20; } if ( *((_DWORD *)this + 135) ) v18 = 8; else v18 = 7; } if ( !*((_BYTE *)this + 640) ) goto LABEL_18; if ( *((_DWORD *)this + 135) ) v19 = "Add Note"; else v19 = "Mod Comment"; LABEL_20: if ( v18 ) { v21 = 100; } else { v20 = GameManager::sharedState((GameManager *)TimeLeft); if ( *(_DWORD *)(v20 + 820) - *(_DWORD *)(v20 + 824) == 2 ) v21 = 140; else v21 = 100; } memset(v26, 0, sizeof(v26)); v22 = strlen(v19); std::string::__init(v26, v19, v22); v23 = InfoLayer::activeCommentID(this); v27 = 0; v28 = 0; v29 = 0; std::string::__init(&v27, &unk_B6B226, 0); v24 = (_DWORD *)ShareCommentLayer::create(v26, v21, v18, v23, &v27); std::string::~string((int)&v27); std::string::~string((int)v26); v25 = *((_DWORD *)this + 134); if ( v25 ) v24[150] = *(_DWORD *)(v25 + 688) - *(_DWORD *)(v25 + 692); return (*(int (__fastcall **)(_DWORD *))(*v24 + 656))(v24); }
GD Web Decomp Icon

GD Web Decomp

Raw Source