//
// EmotePickerPopup::refreshEnabled from 0xcb9568 to 0xcb96b8 (336 bytes)
//
// 4 xrefs:
// > EmotePickerPopup::textChanged @ 0xcb96b8
// > EmotePickerPopup::init @ 0xcb984c
// > EmotePickerPopup::onPickEmote @ 0xcba5c8
// > ??> @ 0x8dd90
//
// 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
//
__int64 __fastcall EmotePickerPopup::refreshEnabled(__int64 this)
{
__int64 v1; // x19
unsigned int v2; // w21
__int64 v3; // x1
__int64 *v4; // x20
__int64 v5; // x22
unsigned __int64 v6; // x22
__int64 i; // x19
cocos2d::CCArray *v8; // x0
__int64 v9; // x0
__int64 v10; // x1
v1 = this;
if ( *(_QWORD *)(this + 1048) )
{
this = EmotePickerPopup::canAddEmote((EmotePickerPopup *)this);
v2 = (unsigned __int8)this;
if ( (unsigned __int8)this != *(_DWORD *)(v1 + 1208) )
{
v3 = *(_QWORD *)(v1 + 1048);
*(_DWORD *)(v1 + 1208) = (unsigned __int8)this;
this = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 488LL))(v3);
if ( this )
{
this = **(unsigned int **)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 1048) + 488LL))(*(_QWORD *)(v1 + 1048))
+ 56);
if ( (_DWORD)this )
{
v4 = *(__int64 **)(*(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 1048) + 488LL))(*(_QWORD *)(v1 + 1048))
+ 56)
+ 16LL);
v5 = *(_QWORD *)(*(_QWORD *)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 1048) + 488LL))(*(_QWORD *)(v1 + 1048))
+ 56)
+ 16LL);
this = 8LL
* **(unsigned int **)((*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 1048) + 488LL))(*(_QWORD *)(v1 + 1048))
+ 56)
- 8;
v6 = v5 + this;
if ( (unsigned __int64)v4 <= v6 )
{
for ( i = *v4; *v4; i = *v4 )
{
++v4;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)i + 1056LL))(i, v2);
v8 = (cocos2d::CCArray *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)i + 488LL))(i);
v9 = cocos2d::CCArray::objectAtIndex(v8, 0);
if ( v2 )
v10 = 255;
else
v10 = 90;
this = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 912LL))(v9, v10);
if ( v6 < (unsigned __int64)v4 )
break;
}
}
}
}
}
}
return this;
}