//
// FriendsProfilePage::textChanged from 0x5f4fc0 to 0x5f50e2 (290 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'FriendsProfilePage::textChanged @ 0x5f50ec
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:30 +0000
//
void __fastcall FriendsProfilePage::textChanged(FriendsProfilePage *this, CCTextInputNode *a2)
{
char *v4; // r7
bool v5; // zf
int v6; // r0
int v7; // r0
unsigned int v8; // r3
unsigned int v9; // r0
char *v10; // r0
char *v11; // r9
int v12; // r8
int v13; // r2
int v14; // r2
size_t v15; // r2
int v16; // r0
int v17; // r1
int v18; // r2
int v19; // [sp+0h] [bp-14h] BYREF
int v20; // [sp+4h] [bp-10h]
int v21; // [sp+8h] [bp-Ch]
*((_BYTE *)this + 668) = 0;
v4 = (char *)this + 648;
PagedListPopup::clearStatus(this);
CCTextInputNode::getString((CCTextInputNode *)&v19, (int)a2);
v5 = (*((_BYTE *)this + 648) & 1) == 0;
if ( (*((_BYTE *)this + 648) & 1) != 0 )
{
**((_BYTE **)this + 164) = 0;
}
else
{
*((_BYTE *)this + 648) = 0;
*((_BYTE *)this + 649) = 0;
}
v6 = *((unsigned __int8 *)this + 648);
if ( !v5 )
*((_DWORD *)this + 163) = 0;
if ( (v6 & 1) != 0 )
{
v7 = *((_DWORD *)this + 163);
v8 = (*((_DWORD *)this + 162) & 0xFFFFFFFE) - 1;
if ( (unsigned int)v7 <= 0xA )
{
if ( (*((_DWORD *)this + 162) & 0xFFFFFFFE) == 0xB )
goto LABEL_24;
LABEL_13:
v10 = (char *)this + 649;
v11 = *((char **)this + 164);
v12 = 1;
goto LABEL_17;
}
}
else
{
v7 = v6 >> 1;
if ( v7 <= 10 )
goto LABEL_24;
v8 = 10;
}
v9 = (v7 + 16) & 0xFFFFFFF0;
if ( v9 - 1 == v8 )
goto LABEL_24;
if ( v9 == 11 )
goto LABEL_13;
v10 = (char *)operator new(v9);
v12 = *((_BYTE *)this + 648) & 1;
if ( (*((_BYTE *)this + 648) & 1) != 0 )
v11 = *((char **)this + 164);
else
v11 = (char *)this + 649;
LABEL_17:
v13 = *((unsigned __int8 *)this + 648);
if ( (v13 & 1) != 0 )
v14 = *((_DWORD *)this + 163);
else
v14 = v13 >> 1;
v15 = v14 + 1;
if ( v15 )
memcpy(v10, v11, v15);
if ( v12 )
operator delete(v11);
LABEL_24:
v16 = v19;
v17 = v20;
v18 = v21;
v19 = 0;
v20 = 0;
v21 = 0;
*(_DWORD *)v4 = v16;
*((_DWORD *)v4 + 1) = v17;
*((_DWORD *)v4 + 2) = v18;
std::string::~string((int)&v19);
FriendsProfilePage::filterUsersWithQuery((int)this, (unsigned __int8 *)v4);
FriendsProfilePage::rebuildList((cocos2d::CCArray **)this);
}