//
// AccountReviewPopup::applySelected from 0x73a954 to 0x73a9e2 (142 bytes)
//
// 6 xrefs:
// > AccountReviewPopup::onSelectAll @ 0x73aa26
// > AccountReviewPopup::onToggleRow @ 0x73aa98
// > AccountReviewPopup::onToggleRow @ 0x73aad6
// > AccountReviewPopup::FLAlert_Clicked @ 0x73ab80
// > AccountReviewPopup::FLAlert_Clicked @ 0x73ac0e
// > AccountReviewPopup::FLAlert_Clicked @ 0x73ace4
//
// 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:58:29 +0000
//
int __fastcall AccountReviewPopup::applySelected(int this, int a2, int a3, int a4)
{
int v4; // r4
int v6; // r2
int *v7; // r0
int *v8; // r5
_DWORD *v9; // r0
int *v10; // r3
int v11; // [sp+4h] [bp-Ch] BYREF
_DWORD v12[2]; // [sp+8h] [bp-8h] BYREF
v12[0] = a3;
v12[1] = a4;
v4 = this;
v11 = a2;
if ( a2 >= 0 )
{
v6 = *(_DWORD *)(this + 928);
if ( a2 < (*(_DWORD *)(this + 932) - v6) >> 2 )
{
if ( *(_DWORD *)(v6 + 4 * a2) )
{
if ( a3 )
{
std::__tree::__emplace_unique_key_args((int)v12, this + 940, &v11, &v11);
}
else
{
v7 = std::__tree::find(this + 940, &v11);
v8 = v7;
if ( v7 != (int *)(v4 + 944) )
{
v9 = std::__tree_next *>(v7);
v10 = *(int **)(v4 + 940);
--*(_DWORD *)(v4 + 948);
if ( v10 == v8 )
*(_DWORD *)(v4 + 940) = v9;
std::__tree_remove *>(*(int **)(v4 + 944), v8);
operator delete(v8);
}
}
this = *(_DWORD *)(*(_DWORD *)(v4 + 928) + 4 * v11);
if ( *(unsigned __int8 *)(this + 308) != a3 )
return CCMenuItemToggler::toggle((CCMenuItemToggler *)this, a3);
}
}
}
return this;
}