//
// ShareCommentLayer::textChanged from 0x910274 to 0x9103c8 (340 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'ShareCommentLayer::textChanged @ 0x9103cc
// > ??> @ 0xf91c0
// > ??> @ 0x1466db8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:57:16 +0000
//
__int64 __fastcall ShareCommentLayer::textChanged(ShareCommentLayer *this, CCTextInputNode *a2)
{
const char *v3; // x23
size_t v4; // x0
size_t v5; // x19
unsigned __int64 v6; // x21
char *v7; // x3
__int64 v9[2]; // [xsp+48h] [xbp+48h] BYREF
void *v10; // [xsp+58h] [xbp+58h]
unsigned __int64 v11; // [xsp+60h] [xbp+60h] BYREF
size_t v12; // [xsp+68h] [xbp+68h]
void *v13; // [xsp+70h] [xbp+70h]
v3 = (char *)v9 + 1;
CCTextInputNode::getString(a2, v9);
if ( (v9[0] & 1) != 0 )
v3 = (const char *)v10;
v11 = 0;
v12 = 0;
v13 = nullptr;
v4 = strlen(v3);
v5 = v4;
if ( v4 > 0xFFFFFFFFFFFFFFEFLL )
sub_62D03C();
if ( v4 > 0x16 )
{
v6 = (v4 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v7 = (char *)operator new(v6);
v13 = v7;
v12 = v5;
v11 = v6 | 1;
LABEL_6:
v7 = (char *)memcpy(v7, v3, v5);
goto LABEL_7;
}
LOBYTE(v11) = 2 * v4;
v7 = (char *)&v11 + 1;
if ( v4 )
goto LABEL_6;
LABEL_7:
v7[v5] = 0;
ShareCommentLayer::updateDescText(this, (__int64 *)&v11);
if ( (v11 & 1) != 0 )
operator delete(v13);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
return _stack_chk_guard;
}