// // EmoteSprite::replaceTokens from 0x3f4134 to 0x3f4382 (590 bytes) // // 7 xrefs: // > MultilineBitmapFont::readEmoteInfo @ 0x3d5d42 // > CCTextInputNode::updateLabel @ 0x3e3124 // > CommentCell::loadFromComment @ 0x432f34 // > NewsPopup::rebuildPage @ 0x6c1df2 // > InvitesPopup::buildRows @ 0x75955a // > EditorSoundConfigUploadPopup::init @ 0x789636 // > ReportPopup::init @ 0x7a0a4e // // 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:47:16 +0000 // int *__fastcall EmoteSprite::replaceTokens(int *a1, unsigned __int8 *a2, _DWORD *a3, float a4) { int v8; // r4 unsigned int v9; // r1 unsigned int v10; // r9 unsigned int v11; // r8 int v12; // r4 cocos2d::CCSpriteFrameCache *v13; // r0 int v14; // r3 int v15; // r3 int v16; // r7 char v17; // r4 int *i; // r2 int *v19; // r3 int *v20; // r1 float v21; // s16 cocos2d::CCSpriteFrameCache *v22; // r4 cocos2d::CCString *v23; // r0 const char *CString; // r0 int v25; // r0 float v26; // s16 int *v27; // r3 int v28; // r1 int v29; // r2 int *v30; // r2 int *v31; // r4 int v32; // r3 _DWORD *v33; // r0 char v34; // r1 _DWORD *v36; // [sp+1Ch] [bp-10h] int *v37; // [sp+20h] [bp-Ch] BYREF *a1 = 0; a1[1] = 0; a1[2] = 0; v8 = *a2; if ( (v8 & 1) != 0 ) v9 = *((_DWORD *)a2 + 1); else v9 = v8 >> 1; std::string::reserve(a1, v9); v10 = 0; v11 = 0; while ( v10 < -1431655765 * ((a3[1] - *a3) >> 2) ) { v12 = 12 * v10; v13 = (cocos2d::CCSpriteFrameCache *)std::string::append(a1, a2, v11, *(_DWORD *)(*a3 + 12 * v10) - v11); v11 = *(_DWORD *)(*a3 + 12 * v10 + 4) + *(_DWORD *)(*a3 + 12 * v10); v14 = *(unsigned __int8 *)a1; if ( (v14 & 1) != 0 ) v15 = a1[1]; else v15 = v14 >> 1; *(_DWORD *)(*a3 + 12 * v10) = v15; *(_DWORD *)(*a3 + v12 + 4) = 1; v16 = *(_DWORD *)(v12 + *a3 + 8); v17 = byte_D2B554; __dmb(0xFu); if ( (v17 & 1) == 0 ) { v13 = (cocos2d::CCSpriteFrameCache *)_cxa_guard_acquire((__guard *)&byte_D2B554); if ( v13 ) { dword_D2B54C = 0; dword_D2B550 = 0; dword_D2B548 = (int)&dword_D2B54C; _cxa_guard_release((__guard *)&byte_D2B554); v13 = (cocos2d::CCSpriteFrameCache *)_aeabi_atexit(); } } v19 = &dword_D2B54C; for ( i = (int *)dword_D2B54C; i; i = v20 ) { v13 = (cocos2d::CCSpriteFrameCache *)i[4]; if ( (int)v13 >= *(_DWORD *)(v16 + 4) ) { v20 = (int *)*i; } else { v20 = (int *)i[1]; i = v19; } v19 = i; } if ( v19 == &dword_D2B54C || *(_DWORD *)(v16 + 4) < v19[4] ) { v22 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v13); v23 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"particle_%02d_001.png", *(const char **)(v16 + 4)); CString = (const char *)cocos2d::CCString::getCString(v23); v25 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v22, CString); if ( v25 && (v26 = *(float *)(v25 + 100), v26 > 0.0) ) v21 = *(float *)(v25 + 96) / v26; else v21 = 1.0; v27 = (int *)dword_D2B54C; if ( dword_D2B54C ) { v28 = *(_DWORD *)(v16 + 4); while ( 1 ) { v29 = v27[4]; if ( v28 >= v29 ) { if ( v29 >= v28 ) { v37 = v27; v31 = (int *)&v37; goto LABEL_35; } v30 = (int *)v27[1]; if ( !v30 ) { v37 = v27; v31 = v27 + 1; goto LABEL_35; } } else { v30 = (int *)*v27; if ( !*v27 ) { v37 = v27; v31 = v27; goto LABEL_35; } } v27 = v30; } } v31 = &dword_D2B54C; v37 = &dword_D2B54C; LABEL_35: v32 = *v31; if ( !*v31 ) { v33 = (_DWORD *)operator new(0x18u); v33[4] = *(_DWORD *)(v16 + 4); v33[5] = 0; *v33 = 0; v33[1] = 0; v33[2] = v37; *v31 = (int)v33; if ( *(_DWORD *)dword_D2B548 ) dword_D2B548 = *(_DWORD *)dword_D2B548; v36 = v33; std::__tree_balance_after_insert *>((_DWORD *)dword_D2B54C, (_DWORD *)*v31); v32 = (int)v36; ++dword_D2B550; } *(float *)(v32 + 20) = v21; } else { v21 = *((float *)v19 + 5); } if ( a4 > 0.0 && v21 > a4 ) v21 = a4; if ( (float)(v21 * *(float *)(v16 + 8)) <= 1.1 ) v34 = 127; else v34 = 30; std::string::push_back(a1, v34); ++v10; } std::string::append(a1, a2, v11, 0xFFFFFFFF); return a1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source