//
// NewThreadPopup::shareIDPicked from 0xc748c0 to 0xc749f8 (312 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'NewThreadPopup::shareIDPicked @ 0xc749fc
// > ??> @ 0xe3c20
// > ??> @ 0x14efbd8
//
// 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 13:05:32 +0000
//
__int64 __fastcall NewThreadPopup::shareIDPicked(NewThreadPopup *this, const char *a2, char a3)
{
char *v4; // x0
cocos2d::CCString *v5; // x0
const char *CString; // x24
size_t v7; // x0
size_t v8; // x19
char *v9; // x3
unsigned __int64 v11; // x0
__int64 v12; // [xsp+40h] [xbp+40h] BYREF
size_t v13; // [xsp+48h] [xbp+48h]
void *v14; // [xsp+50h] [xbp+50h]
if ( (int)a2 <= 0 )
return _stack_chk_guard;
if ( a3 )
v4 = "li_%i";
else
v4 = "l_%i";
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v4, a2);
v12 = 0;
CString = (const char *)cocos2d::CCString::getCString(v5);
v13 = 0;
v14 = nullptr;
v7 = strlen(CString);
v8 = v7;
if ( v7 > 0xFFFFFFFFFFFFFFEFLL )
sub_630518();
if ( v7 > 0x16 )
{
v11 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v12 = v11 | 1;
v9 = (char *)operator new(v11);
v14 = v9;
v13 = v8;
}
else
{
LOBYTE(v12) = 2 * v7;
v9 = (char *)&v12 + 1;
if ( !v7 )
goto LABEL_7;
}
v9 = (char *)memcpy(v9, CString, v8);
LABEL_7:
v9[v8] = 0;
NewThreadPopup::insertShareToken(this, (__int64)&v12);
if ( (v12 & 1) != 0 )
operator delete(v14);
return _stack_chk_guard;
}