// // GJComment::create from 0x1000a689c to 0x1000a6ce0 (1092 bytes) // // 3 xrefs: // > GameLevelManager::createAndGetCommentsFull @ 0x1000a6658 // > GameLevelManager::createAndGetCommentsFull @ 0x1000a6694 // > GJMultiplayerManager::addComment @ 0x1001cf564 // // 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 // GJComment *__fastcall GJComment::create(cocos2d::CCDictionary *a1) { cocos2d::CCString *v2; // x0 char *CString; // x0 cocos2d::CCString *v4; // x0 int v5; // w20 cocos2d::CCString *v6; // x0 int v7; // w21 cocos2d::CCString *v8; // x0 const char *v9; // x0 int v10; // w22 cocos2d::CCString *v11; // x0 bool v12; // w24 cocos2d::CCString *v13; // x0 int v14; // w25 cocos2d::CCString *v15; // x0 char *v16; // x0 cocos2d::CCString *v17; // x0 int v18; // w26 cocos2d::CCString *v19; // x0 int v20; // w27 cocos2d::CCString *v21; // x0 int v22; // w28 GJComment *v23; // x23 cocos2d::CCString *v24; // x0 char *v25; // x0 char *v26; // x1 cocos2d::CCArray *v27; // x19 cocos2d::CCString *v28; // x0 unsigned __int8 v29; // w20 cocos2d::CCString *v30; // x0 __int16 v31; // w21 cocos2d::CCString *v32; // x0 std::string v34; // [xsp+8h] [xbp-108h] BYREF std::string __dst; // [xsp+20h] [xbp-F0h] BYREF std::string __str; // [xsp+40h] [xbp-D0h] BYREF void *v37[2]; // [xsp+58h] [xbp-B8h] BYREF char v38; // [xsp+6Fh] [xbp-A1h] std::string v39; // [xsp+70h] [xbp-A0h] BYREF void *__p[2]; // [xsp+88h] [xbp-88h] BYREF char v41; // [xsp+9Fh] [xbp-71h] std::string v42; // [xsp+A0h] [xbp-70h] BYREF sub_100009900(&v39, "2"); v2 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v39); CString = (char *)cocos2d::CCString::getCString(v2); sub_100009900(__p, CString); LevelTools::base64DecodeString(&v42, __p); if ( v41 < 0 ) operator delete(__p[0]); if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); sub_100009900(&v39, "3"); v4 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v39); v5 = cocos2d::CCString::intValue(v4); if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); sub_100009900(&v39, "4"); v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v39); v7 = cocos2d::CCString::intValue(v6); if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); sub_100009900(&v39, "6"); v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v39); v9 = cocos2d::CCString::getCString(v8); v10 = atoi(v9); if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); sub_100009900(&v39, "7"); v11 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v39); v12 = cocos2d::CCString::boolValue(v11); if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); sub_100009900(&v39, "8"); v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v39); v14 = cocos2d::CCString::intValue(v13); if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); sub_100009900(v37, "9"); v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, v37); v16 = (char *)cocos2d::CCString::getCString(v15); sub_100009900(&v39, v16); if ( v38 < 0 ) operator delete(v37[0]); sub_100009900(v37, "10"); v17 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, v37); v18 = cocos2d::CCString::intValue(v17); if ( v38 < 0 ) operator delete(v37[0]); sub_100009900(v37, "11"); v19 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, v37); v20 = cocos2d::CCString::intValue(v19); if ( v38 < 0 ) operator delete(v37[0]); sub_100009900(v37, "1"); v21 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, v37); v22 = cocos2d::CCString::intValue(v21); if ( v38 < 0 ) operator delete(v37[0]); v23 = GJComment::create_1(); if ( SHIBYTE(v42.__r_.__value_.__r.__words[2]) < 0 ) sub_1000097D0(&__str, v42.__r_.__value_.__l.__data_, v42.__r_.__value_.__l.__size_); else __str = v42; std::string::operator=((std::string *)&v23->m_commentString, &__str); if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__str.__r_.__value_.__l.__data_); v23->m_userID = v5; v23->m_likeCount = v7; v23->m_commentID = v10; v23->m_isSpam = v12; v23->m_accountID = v14; if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) sub_1000097D0(&__dst, v39.__r_.__value_.__l.__data_, v39.__r_.__value_.__l.__size_); else __dst = v39; std::string::operator=((std::string *)&v23->m_uploadDate, &__dst); if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__dst.__r_.__value_.__l.__data_); v23->m_percentage = v18; v23->m_modBadge = v20; v23->m_levelID = v22; if ( v22 ) v23->m_hasLevelID = 1; if ( v20 >= 1 ) { sub_100009900(&v34, "12"); v24 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(a1, &v34); v25 = (char *)cocos2d::CCString::getCString(v24); sub_100009900(v37, v25); if ( SHIBYTE(v34.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v34.__r_.__value_.__l.__data_); if ( v38 >= 0 ) v26 = (char *)v37; else v26 = (char *)v37[0]; sub_100009900(&v34, v26); v27 = (cocos2d::CCArray *)sub_100093338(&v34, ","); if ( SHIBYTE(v34.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v34.__r_.__value_.__l.__data_); if ( (unsigned int)sub_10024A36C(v27) >= 3 ) { v28 = cocos2d::CCArray::stringAtIndex(v27, 0); v29 = cocos2d::CCString::intValue(v28); v30 = cocos2d::CCArray::stringAtIndex(v27, 1u); v31 = cocos2d::CCString::intValue(v30); v32 = cocos2d::CCArray::stringAtIndex(v27, 2u); v23->m_color.b = cocos2d::CCString::intValue(v32); *(_WORD *)&v23->m_color.r = v29 | (unsigned __int16)(v31 << 8); } if ( v38 < 0 ) operator delete(v37[0]); } if ( SHIBYTE(v39.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v39.__r_.__value_.__l.__data_); if ( SHIBYTE(v42.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v42.__r_.__value_.__l.__data_); return v23; }
GD Web Decomp Icon

GD Web Decomp

Raw Source