//
// FriendsProfilePage::onToggleSort from 0x140214ba0 to 0x140214c34 (148 bytes)
//
// 2 xrefs:
// > FriendsProfilePage::init @ 0x140213ff8
// > ??> @ 0x14091b668
//
// This function is hookable on this platform (idp: pc, 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:28:20 +0000
//
void __fastcall FriendsProfilePage::onToggleSort(__int64 a1)
{
char v2; // cl
__int64 v3; // r8
const char *v4; // rcx
const char *v5; // rdx
v2 = *(_BYTE *)(a1 + 952);
v3 = *(_QWORD *)(a1 + 944);
*(_BYTE *)(a1 + 952) = v2 == 0;
if ( v3 )
{
if ( v2 )
{
v4 = "Z-A";
v5 = "A-Z";
}
else
{
v4 = "Old";
v5 = "New";
}
if ( *(_BYTE *)(a1 + 976) )
v5 = v4;
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(v3 + 632) + 360LL))(*(_QWORD *)(v3 + 632) + 360LL, v5);
}
FriendsProfilePage::sortUsers(a1);
if ( *(_QWORD *)(a1 + 896) )
FriendsProfilePage::filterUsersWithQuery(a1);
FriendsProfilePage::updateCountLabel(a1);
}