//
// ThreadViewPopup::markShareLinks from 0x74f6c0 to 0x74f976 (694 bytes)
//
// 2 xrefs:
// > ThreadRequestPopup::init @ 0x758494
// > ThreadViewPopup::mountVirtualRow @ 0x75f81e
//
// 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:49 +0000
//
char **__fastcall ThreadViewPopup::markShareLinks(
char **result,
unsigned __int8 *a2,
_DWORD *a3,
const cocos2d::CCPoint *a4,
int a5,
int a6)
{
char *v7; // r2
int v8; // r2
int i; // r3
unsigned int *v10; // r6
unsigned int v11; // r5
signed int v12; // r9
int v13; // r10
const cocos2d::CCPoint *v14; // r4
int v15; // r0
cocos2d::CCArray *v16; // r0
int v17; // r5
signed int v18; // r6
signed int v19; // r7
cocos2d::CCArray *v20; // r0
int v21; // r0
void (__fastcall *v22)(int, int *); // r3
cocos2d::CCArray *v23; // r0
int v24; // r7
cocos2d::CCArray *v25; // r0
int v26; // r6
float v27; // s16
float v28; // s17
float v29; // s16
float v30; // s15
int v31; // r3
char v32; // r3
float v33; // r1
float v34; // s12
float v35; // r2
int v36; // r4
int v37; // [sp+Ch] [bp-70h]
int v38; // [sp+10h] [bp-6Ch]
cocos2d::CCArray *v39; // [sp+14h] [bp-68h]
int v40; // [sp+18h] [bp-64h]
int v42; // [sp+24h] [bp-58h]
float v44; // [sp+34h] [bp-48h] BYREF
float v45; // [sp+38h] [bp-44h]
float v46; // [sp+3Ch] [bp-40h] BYREF
float v47; // [sp+40h] [bp-3Ch]
_BYTE v48[8]; // [sp+44h] [bp-38h] BYREF
char *v49[3]; // [sp+4Ch] [bp-30h] BYREF
int v50; // [sp+58h] [bp-24h] BYREF
char v51; // [sp+5Ch] [bp-20h]
_BYTE v52[16]; // [sp+60h] [bp-1Ch] BYREF
int v53; // [sp+70h] [bp-Ch]
v7 = result[130];
if ( v7 )
{
v39 = *((cocos2d::CCArray **)v7 + 134);
if ( v39 )
{
v8 = (int)result[128];
memset(v49, 0, sizeof(v49));
EmoteSprite::parseTokens(a2, (int)v49, v8);
for ( i = 0; ; i = v37 + 1 )
{
v37 = i;
if ( i >= (a3[1] - *a3) >> 4 )
break;
v10 = (unsigned int *)(*a3 + 16 * i);
v11 = *v10;
v42 = sub_745114(a2, *v10, v49);
v40 = sub_745114(a2, v10[1] + v11, v49) - 1;
if ( v40 >= v42 )
{
v12 = 0;
v13 = 0;
while ( v12 < cocos2d::CCArray::count(v39) )
{
v14 = (const cocos2d::CCPoint *)cocos2d::CCArray::objectAtIndex(v39, v12);
v15 = (*(int (__fastcall **)(const cocos2d::CCPoint *))(*(_DWORD *)v14 + 244))(v14);
if ( v15 )
{
v16 = (cocos2d::CCArray *)(*(int (__fastcall **)(const cocos2d::CCPoint *))(*(_DWORD *)v14 + 244))(v14);
v15 = cocos2d::CCArray::count(v16);
}
v17 = v15;
v18 = v40 - v13;
if ( v15 <= v40 - v13 )
v18 = v15 - 1;
if ( v15 > 0 && v18 >= 0 )
{
v19 = (v42 - v13) & ~((v42 - v13) >> 31);
if ( v19 <= v18 && v19 < v15 )
{
v38 = (v42 - v13) & ~((v42 - v13) >> 31);
do
{
v20 = (cocos2d::CCArray *)(*(int (__fastcall **)(const cocos2d::CCPoint *))(*(_DWORD *)v14 + 244))(v14);
v21 = cocos2d::CCArray::objectAtIndex(v20, v38);
v22 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v21 + 480);
LOWORD(v50) = -14081;
BYTE2(v50) = 80;
v22(v21, &v50);
++v38;
}
while ( v38 <= v18 );
v23 = (cocos2d::CCArray *)(*(int (__fastcall **)(const cocos2d::CCPoint *))(*(_DWORD *)v14 + 244))(v14);
v24 = cocos2d::CCArray::objectAtIndex(v23, v19);
v25 = (cocos2d::CCArray *)(*(int (__fastcall **)(const cocos2d::CCPoint *))(*(_DWORD *)v14 + 244))(v14);
v26 = cocos2d::CCArray::objectAtIndex(v25, v18);
v27 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v24 + 112))(v24));
v28 = v27 - *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v24 + 164))(v24);
v29 = COERCE_FLOAT((*(int (__fastcall **)(int))(*(_DWORD *)v26 + 112))(v26));
v30 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v26 + 164))(v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v48, v28, -6.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v50, v14);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v44, a4);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v48, v29 + v30, 20.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v50, v14);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v46, a4);
v31 = *a3 + 16 * v37;
v50 = *(_DWORD *)(v31 + 8);
v32 = *(_BYTE *)(v31 + 12);
if ( v44 > v46 )
v33 = v46;
else
v33 = v44;
v51 = v32;
v34 = fabsf(v47 - v45);
if ( v45 > v47 )
v35 = v47;
else
v35 = v45;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v52, v33, v35, fabsf(v46 - v44), v34);
v36 = *(_DWORD *)(a5 + 4);
v53 = a6;
if ( v36 == *(_DWORD *)(a5 + 8) )
{
std::vector::__push_back_slow_path(
(void **)a5,
(int)&v50);
}
else
{
if ( v36 )
{
*(_DWORD *)v36 = v50;
*(_BYTE *)(v36 + 4) = v51;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)(v36 + 8), (const cocos2d::CCRect *)v52);
*(_DWORD *)(v36 + 24) = v53;
}
*(_DWORD *)(a5 + 4) += 28;
}
}
}
v13 += v17;
if ( v13 > v40 )
break;
++v12;
}
}
}
return std::__vector_base::~__vector_base(v49);
}
}
return result;
}