//
// EmotePickerPopup::canAddEmote from 0x1004dbc54 to 0x1004dbcdc (136 bytes)
//
// 2 xrefs:
// > EmotePickerPopup::refreshEnabled @ 0x1004db348
// > EmotePickerPopup::onPickEmote @ 0x1004dba58
//
// 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 11:06:34 +0000
//
__int64 __fastcall EmotePickerPopup::canAddEmote(__int64 a1)
{
__int64 v2; // x0
int v3; // w0
__int64 v4; // x1
_BOOL8 v5; // x19
std::string __p; // [xsp+8h] [xbp-28h] BYREF
v2 = *(_QWORD *)(a1 + 1168);
if ( !v2 )
return 1;
CCTextInputNode::getString(v2, &__p);
v3 = EmoteSprite::parseTokens(&__p);
v4 = *(unsigned int *)(a1 + 1176);
v5 = v3 < (int)v4 && (int)EmoteSprite::effectiveLength(&__p, v4) < *(_DWORD *)(a1 + 1180);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
return v5;
}