//
// sub_10028C060 from 0x10028c060 to 0x10028c125 (197 bytes)
//
// 3 xrefs:
// > GJAccountSettingsLayer::init @ 0x10028b0ab
// > GJAccountSettingsLayer::init @ 0x10028b173
// > GJAccountSettingsLayer::init @ 0x10028b214
//
// 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 12:27:47 +0000
//
unsigned int *__fastcall sub_10028C060(__int64 a1, __int64 a2)
{
int v2; // eax
int v3; // r14d
unsigned int *result; // rax
__int64 *v5; // r15
unsigned __int64 v6; // r12
__int64 v7; // rbx
int v8; // eax
if ( !a2 )
{
v3 = 3;
if ( *(_DWORD *)(a1 + 680) == 1 )
goto LABEL_4;
goto LABEL_3;
}
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(a1 + 680) = (v2 != 3) + 1;
*(_DWORD *)(a1 + 676) = (v2 == 2) + 1;
v3 = 3;
if ( v2 != 3 )
LABEL_3:
v3 = *(_DWORD *)(a1 + 676);
LABEL_4:
result = *(unsigned int **)(a1 + 744);
if ( result )
{
result = *((unsigned int **)result + 7);
if ( *result )
{
v5 = *((__int64 **)result + 2);
v6 = (unsigned __int64)&v5[*result - 1];
do
{
v7 = *v5;
if ( !*v5 )
break;
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 64LL))(*v5);
result = (unsigned int *)CCMenuItemToggler::toggle(v7, v8 != v3);
++v5;
}
while ( (unsigned __int64)v5 <= v6 );
}
}
return result;
}