// // GameLevelManager::onUploadCommentCompleted from 0x10008c0e0 to 0x10008c5c8 (1256 bytes) // // 1 xrefs: // > GameLevelManager::handleIt @ 0x100088a98 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // void __fastcall GameLevelManager::onUploadCommentCompleted(GameLevelManager *a1, char *a2, char *__s) { char *v3; // x20 cocos2d::CCDictionary *m_friendReqAndUserBlocks; // x21 _BOOL8 v7; // x0 _BOOL4 v8; // w23 GJAccountManager *v9; // x0 __int64 v10; // x21 _BOOL4 v11; // w0 _BOOL4 v12; // w24 CommentUploadDelegate *m_commentUploadDelegate; // x0 _BOOL4 v14; // w0 _BOOL4 v15; // w24 CommentUploadDelegate *v16; // x0 GameManager *v17; // x0 cocos2d::CCString *v18; // x0 char *CString; // x0 __int64 v20; // x19 __int64 v21; // x8 char *v22; // x24 char *v23; // x25 void *v24; // x0 char *v25; // x0 cocos2d::CCArray *v26; // x22 cocos2d::CCString *v27; // x0 int v28; // w23 GameLevelManager *v29; // x20 cocos2d::CCString *v30; // x0 const char *v31; // x0 unsigned int v32; // w22 GameLevelManager *v33; // x20 cocos2d::CCString *v34; // x0 char *v35; // x0 char *v36; // x1 GameLevelManager *v37; // x20 cocos2d::CCString *v38; // x0 char *v39; // x0 char *v40; // x1 CommentUploadDelegate *v41; // x0 CommentUploadDelegate *v42; // x0 char *v43; // x8 cocos2d::CCString *v44; // x21 const char *v45; // x21 cocos2d::CCString *v46; // x0 const char *v47; // x0 char *v48; // x0 __int64 v49; // x21 void *v50[2]; // [xsp+20h] [xbp-A0h] BYREF char v51; // [xsp+37h] [xbp-89h] void *v52[2]; // [xsp+38h] [xbp-88h] BYREF char v53; // [xsp+4Fh] [xbp-71h] void *__p[2]; // [xsp+50h] [xbp-70h] BYREF char v55; // [xsp+67h] [xbp-59h] char __sa[8]; // [xsp+68h] [xbp-58h] BYREF char v57; // [xsp+7Fh] [xbp-41h] v3 = __s; if ( __s[23] < 0 ) v3 = *(char **)__s; m_friendReqAndUserBlocks = a1->m_friendReqAndUserBlocks; sub_100009900(__sa, v3); cocos2d::CCDictionary::removeObjectForKey_1((int)m_friendReqAndUserBlocks, __sa); if ( v57 < 0 ) operator delete(*(void **)__sa); sub_100009900(__sa, v3); sub_100009900(__p, "acc_comment"); v7 = sub_1000045BC(__sa, __p); v8 = v7; if ( v55 < 0 ) operator delete(__p[0]); if ( v57 < 0 ) { operator delete(*(void **)__sa); if ( v8 ) goto LABEL_9; } else if ( v8 ) { LABEL_9: v9 = GJAccountManager::sharedState(); v10 = (unsigned int)(v9->m_accountID - v9->m_unkInt1); goto LABEL_12; } v10 = GameLevelManager::levelIDFromPostCommentKey((GameLevelManager *)v7, v3); LABEL_12: sub_100009900(__sa, "-1"); v11 = sub_1000045BC(a2, __sa); v12 = v11; if ( v57 < 0 ) { operator delete(*(void **)__sa); if ( v12 ) goto LABEL_14; } else if ( v11 ) { LABEL_14: m_commentUploadDelegate = a1->m_commentUploadDelegate; if ( m_commentUploadDelegate ) ((void (__fastcall *)(CommentUploadDelegate *, __int64, _QWORD))m_commentUploadDelegate->commentUploadFailed)( m_commentUploadDelegate, v10, 0); LABEL_16: GameLevelManager::resetTimerForKey(a1, v3); return; } sub_100009900(__sa, "-10"); v14 = sub_1000045BC(a2, __sa); v15 = v14; if ( v57 < 0 ) { operator delete(*(void **)__sa); if ( v15 ) goto LABEL_20; } else if ( v14 ) { LABEL_20: v16 = a1->m_commentUploadDelegate; if ( v16 ) ((void (__fastcall *)(CommentUploadDelegate *, __int64, __int64))v16->commentUploadFailed)(v16, v10, 1); v17 = GameManager::sharedState(); v18 = (cocos2d::CCString *)sub_100268F4C( "You have been banned from making comments. \n" "Please contact support with ID %i if you have any questions.", v17->m_playerUserID.random - v17->m_playerUserID.seed); CString = (char *)cocos2d::CCString::getCString(v18); sub_100009900(v52, CString); v20 = sub_1002ABCCC(0, "Banned", v52, "OK", 0); if ( v53 < 0 ) operator delete(v52[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)v20 + 1288LL))(v20); return; } v21 = a2[23]; if ( v21 < 0 ) { v22 = *(char **)a2; v21 = *((_QWORD *)a2 + 1); } else { v22 = a2; } if ( v21 >= 4 ) { v23 = &v22[v21]; v24 = v22; do { v25 = (char *)memchr(v24, 116, v21 - 3); if ( !v25 ) break; if ( *(_DWORD *)v25 == 1886217588 ) { if ( v25 == v23 || v25 - v22 == -1 ) break; v26 = (cocos2d::CCArray *)sub_100093338(a2, "_"); if ( (unsigned int)sub_10024A36C(v26) < 2 ) { v28 = 0; } else { v27 = cocos2d::CCArray::stringAtIndex(v26, 1u); v28 = cocos2d::CCString::intValue(v27); } v42 = a1->m_commentUploadDelegate; if ( v42 ) ((void (__fastcall *)(CommentUploadDelegate *, __int64, __int64))v42->commentUploadFailed)(v42, v10, 1); GameToolbox::getTimeString(v28, 0, __sa); if ( v57 >= 0 ) v43 = __sa; else v43 = *(char **)__sa; v44 = (cocos2d::CCString *)sub_100268F4C( "You have been banned from making comments for: %s", v43); if ( v57 < 0 ) operator delete(*(void **)__sa); if ( (unsigned int)sub_10024A36C(v26) >= 3 ) { v45 = cocos2d::CCString::getCString(v44); v46 = cocos2d::CCArray::stringAtIndex(v26, 2u); v47 = cocos2d::CCString::getCString(v46); v44 = (cocos2d::CCString *)sub_100268F4C("%s.\n\nReason: %s", v45, v47); } v48 = (char *)cocos2d::CCString::getCString(v44); sub_100009900(v50, v48); v49 = FLAlertLayer::create_1(0, "Banned", v50, "OK", 0, 380.0); if ( v51 < 0 ) operator delete(v50[0]); (*(void (__fastcall **)(__int64))(*(_QWORD *)v49 + 1288LL))(v49); goto LABEL_16; } v24 = v25 + 1; v21 = v23 - (_BYTE *)v24; } while ( v23 - (_BYTE *)v24 >= 4 ); } if ( v8 ) { v29 = GameLevelManager::sharedState(); v30 = (cocos2d::CCString *)sub_100268F4C("a_%i_%i", v10, 0); v31 = cocos2d::CCString::getCString(v30); GameLevelManager::resetTimerForKey(v29, v31); } else { v32 = ((unsigned int)v10 >> 30) & 2; v33 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); v34 = (cocos2d::CCString *)sub_100268F4C("comment_%i_%i_%i_%i", v10, 0, 0, v32); v35 = (char *)cocos2d::CCString::getCString(v34); sub_100009900(__sa, v35); if ( v57 >= 0 ) v36 = __sa; else v36 = *(char **)__sa; GameLevelManager::resetTimerForKey(v33, v36); if ( v57 < 0 ) operator delete(*(void **)__sa); v37 = GameLevelManager::sharedState(); GameLevelManager::sharedState(); v38 = (cocos2d::CCString *)sub_100268F4C("comment_%i_%i_%i_%i", v10, 0, 1, v32); v39 = (char *)cocos2d::CCString::getCString(v38); sub_100009900(__sa, v39); if ( v57 >= 0 ) v40 = __sa; else v40 = *(char **)__sa; GameLevelManager::resetTimerForKey(v37, v40); if ( v57 < 0 ) operator delete(*(void **)__sa); } v41 = a1->m_commentUploadDelegate; if ( v41 ) ((void (__fastcall *)(CommentUploadDelegate *, __int64))v41->commentUploadFinished)(v41, v10); }
GD Web Decomp Icon

GD Web Decomp

Raw Source