//
// EmotePickerPopup::canAddEmote from 0xcb9490 to 0xcb9568 (216 bytes)
//
// 3 xrefs:
// > EmotePickerPopup::refreshEnabled @ 0xcb9588
// > EmotePickerPopup::onPickEmote @ 0xcba4b8
// > ??> @ 0xe1580
//
// 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:06:13 +0000
//
bool __fastcall EmotePickerPopup::canAddEmote(EmotePickerPopup *this)
{
CCTextInputNode *v2; // x0
int v3; // w0
int v4; // w1
_BOOL4 v5; // w22
__int64 v7[3]; // [xsp+30h] [xbp+30h] BYREF
v2 = *((CCTextInputNode **)this + 146);
if ( !v2 )
return 1;
CCTextInputNode::getString(v2, v7);
v3 = EmoteSprite::parseTokens((char *)v7, nullptr, *((_DWORD *)this + 294));
v4 = *((_DWORD *)this + 294);
v5 = 0;
if ( v3 < v4 )
{
v5 = (int)EmoteSprite::effectiveLength((char *)v7, v4) < *((_DWORD *)this + 295);
if ( (v7[0] & 1) == 0 )
return v5;
LABEL_6:
operator delete((void *)v7[2]);
return v5;
}
if ( (v7[0] & 1) != 0 )
goto LABEL_6;
return v5;
}