// // ThreadDescPopup::onSave from 0x7547a8 to 0x754988 (480 bytes) // // 0 xrefs: // // 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:53 +0000 // int __fastcall ThreadDescPopup::onSave(ThreadDescPopup *this, cocos2d::CCObject *a2) { int v3; // r2 EmoteSprite *String; // r0 int v5; // r0 int v6; // r2 int v7; // r3 int *v8; // r0 int v9; // r4 int v10; // r3 int v11; // r6 size_t v12; // r2 int v13; // r1 int v14; // r3 char *v15; // r0 unsigned __int8 *v16; // r1 char *v17; // r0 unsigned __int8 *v18; // r2 _BOOL4 v19; // r0 int v20; // t1 int v21; // r2 int v22; // r6 int v23; // r3 int v24; // lr size_t v25; // r2 int v26; // r1 int v27; // r3 char *v28; // r0 unsigned __int8 *v29; // r1 char *v30; // r0 unsigned __int8 *v31; // r2 _BOOL4 v32; // r0 int v33; // t1 int v34; // r4 unsigned __int8 *v35; // r0 GameManager *v36; // r0 GameLevelManager *updated; // r0 int v39; // [sp+Ch] [bp+0h] BYREF size_t v40; // [sp+10h] [bp+4h] char *v41; // [sp+14h] [bp+8h] int v42[3]; // [sp+18h] [bp+Ch] BYREF v3 = *((_DWORD *)this + 182); if ( v3 ) { String = CCTextInputNode::getString((CCTextInputNode *)&v39, v3); } else { v39 = 0; v40 = 0; v41 = nullptr; String = (EmoteSprite *)std::string::__init(&v39, &unk_B6B226, 0); } v5 = EmoteSprite::maxEmotesComment(String); if ( EmoteSprite::effectiveLength((unsigned __int8 *)&v39, v5, v6, v7) <= 300 ) { v9 = *((_DWORD *)this + 180); v10 = *(unsigned __int8 *)(v9 + 144); v11 = v39 & 1; if ( v11 ) v12 = v40; else v12 = (int)(unsigned __int8)v39 >> 1; v13 = v10 & 1; if ( (v10 & 1) != 0 ) v14 = *(_DWORD *)(v9 + 148); else v14 = v10 >> 1; if ( v12 == v14 ) { if ( v11 ) v15 = v41; else v15 = (char *)&v39 + 1; if ( v13 ) v16 = *(unsigned __int8 **)(v9 + 152); else v16 = (unsigned __int8 *)(v9 + 145); if ( v11 ) { v19 = std::char_traits::compare(v15, v16, v12) == 0; } else { v17 = v15 - 1; v18 = &v16[v12]; while ( v16 != v18 ) { v20 = (unsigned __int8)*++v17; if ( v20 != *v16 ) goto LABEL_26; ++v16; } v19 = 1; } } else { LABEL_26: v19 = 0; } v21 = *((unsigned __int8 *)this + 748); v22 = !v19; v23 = *(unsigned __int8 *)(v9 + 156); v24 = v21 & 1; if ( (v21 & 1) != 0 ) v25 = *((_DWORD *)this + 188); else v25 = v21 >> 1; v26 = v23 & 1; if ( (v23 & 1) != 0 ) v27 = *(_DWORD *)(v9 + 160); else v27 = v23 >> 1; if ( v25 == v27 ) { if ( v24 ) v28 = *((char **)this + 189); else v28 = (char *)this + 749; if ( v26 ) v29 = *(unsigned __int8 **)(v9 + 164); else v29 = (unsigned __int8 *)(v9 + 157); if ( v24 ) { v32 = std::char_traits::compare(v28, v29, v25) == 0; } else { v30 = v28 - 1; v31 = &v29[v25]; while ( v29 != v31 ) { v33 = (unsigned __int8)*++v30; if ( v33 != *v29 ) goto LABEL_47; ++v29; } v32 = 1; } } else { LABEL_47: v32 = 0; } v34 = !v32; if ( v22 || v34 ) { v35 = std::string::operator=((unsigned __int8 *)this + 736, (unsigned __int8 *)&v39); *((_BYTE *)this + 760) = v22; if ( v34 ) { v36 = (GameManager *)GameLevelManager::sharedState((GameLevelManager *)v35); updated = (GameLevelManager *)GameLevelManager::updateThread( v36, *(const char **)(*((_DWORD *)this + 180) + 52), 16, (unsigned __int8 *)this + 748); if ( updated ) { *(_DWORD *)(GameLevelManager::sharedState(updated) + 840) = (char *)this + 712; *((_BYTE *)this + 761) = 1; } } else { ThreadDescPopup::sendDescription(this); } } else { (*(void (__fastcall **)(ThreadDescPopup *, _DWORD))(*(_DWORD *)this + 684))(this, 0); } } else { memset(v42, 0, sizeof(v42)); std::string::__init(v42, "Description is too long.", 0x18u); v8 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Description", (int)v42, (ButtonSprite *)"OK", nullptr); (*(void (__fastcall **)(int *))(*v8 + 656))(v8); std::string::~string((int)v42); } return std::string::~string((int)&v39); }
GD Web Decomp Icon

GD Web Decomp

Raw Source