//
// FriendsProfilePage::getUserListFinished from 0x100273484 to 0x1002736fc (632 bytes)
//
// 2 xrefs:
// > sub_1002736FC @ 0x100273700
// > ??> @ 0x100918318
//
// 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 11:01:48 +0000
//
__int64 __fastcall FriendsProfilePage::getUserListFinished(__int64 result, __int64 a2, int a3)
{
__int64 v4; // x19
int v5; // w8
_DWORD *v6; // x0
_DWORD *v7; // x0
__int64 v8; // x0
__int64 v9; // x8
unsigned int *v10; // x8
__int64 v11; // x9
unsigned __int64 v12; // x8
unsigned __int64 v13; // x9
__int64 v14; // x20
__int64 v15; // x0
__int64 v16; // x8
__int64 v17; // x0
__int64 v18; // x0
unsigned int v19; // w20
__int64 v20; // x0
__int64 v21; // x0
__int64 v22; // x0
__int64 v23; // x0
__int64 v24; // x0
__int64 v25; // x8
unsigned int *v26; // x8
__int64 v27; // x9
unsigned __int64 v28; // x8
unsigned __int64 v29; // x9
__int64 v30; // x19
__int64 v31; // x0
v4 = result;
v5 = *(_DWORD *)(result + 816);
if ( a3 == 2 )
{
if ( v5 != 1 )
{
v6 = *(_DWORD **)(result + 872);
if ( v6 )
cocos2d::CCObject::release(v6);
*(_QWORD *)(v4 + 872) = a2;
cocos2d::CCObject::retain(a2);
*(_BYTE *)(v4 + 920) = 1;
sub_1002726C0(v4);
sub_100526440(*(_QWORD *)(v4 + 688), 0.0);
sub_10051B1EC(v4);
sub_10051B070(v4);
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v4 + 904) + 344LL))(*(_QWORD *)(v4 + 904), 1);
}
}
else if ( v5 == a3 )
{
v7 = *(_DWORD **)(result + 856);
if ( v7 )
cocos2d::CCObject::release(v7);
*(_QWORD *)(v4 + 856) = a2;
cocos2d::CCObject::retain(a2);
sub_1002731B0(v4);
v8 = *(_QWORD *)(v4 + 928);
if ( v8 )
{
v9 = *(_QWORD *)(v4 + 856);
if ( v9 )
{
v10 = *(unsigned int **)(v9 + 56);
v11 = *v10;
if ( (_DWORD)v11 )
{
v12 = *((_QWORD *)v10 + 2);
v13 = v12 + 8 * v11 - 8;
while ( *(_QWORD *)v12 )
{
if ( *(int *)(*(_QWORD *)v12 + 456LL) >= 1 )
{
v14 = 1;
goto LABEL_17;
}
v12 += 8LL;
if ( v12 > v13 )
break;
}
}
}
v14 = 0;
LABEL_17:
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 344LL))(v8, v14);
v15 = *(_QWORD *)(v4 + 952);
if ( v15 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 344LL))(v15, v14);
}
v16 = *(char *)(v4 + 903);
if ( v16 < 0 )
v16 = *(_QWORD *)(v4 + 888);
if ( v16 )
sub_100273230(v4, v4 + 880);
sub_1002726C0(v4);
sub_100526440(*(_QWORD *)(v4 + 688), 0.0);
sub_10051B1EC(v4);
sub_10051B070(v4);
result = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v4 + 904) + 344LL))(*(_QWORD *)(v4 + 904), 1);
if ( !*(_DWORD *)(v4 + 816) )
{
v17 = GameManager::sharedState(result);
GameManager::reportAchievementWithID(v17, "geometry.ach.friends01", 100, 0);
v18 = sub_1002E757C(*(_QWORD *)(v4 + 856));
if ( (int)v18 >= 10 )
{
v19 = v18;
v20 = GameManager::sharedState(v18);
v21 = GameManager::reportAchievementWithID(v20, "geometry.ach.friends02", 100, 0);
if ( v19 >= 0x19 )
{
v22 = GameManager::sharedState(v21);
v23 = GameManager::reportAchievementWithID(v22, "geometry.ach.friends03", 100, 0);
if ( v19 >= 0x32 )
{
v24 = GameManager::sharedState(v23);
GameManager::reportAchievementWithID(v24, "geometry.ach.friends04", 100, 0);
}
}
}
v25 = *(_QWORD *)(v4 + 856);
if ( v25 )
{
v26 = *(unsigned int **)(v25 + 56);
v27 = *v26;
if ( (_DWORD)v27 )
{
v28 = *((_QWORD *)v26 + 2);
v29 = v28 + 8 * v27 - 8;
do
{
if ( !*(_QWORD *)v28 )
break;
*(_BYTE *)(*(_QWORD *)v28 + 724LL) = 0;
v28 += 8LL;
}
while ( v28 <= v29 );
}
}
v30 = GameLevelManager::sharedState();
v31 = GJAccountManager::sharedState(v30);
result = GameLevelManager::userInfoForAccountID(v30, *(_DWORD *)(v31 + 352) - *(_DWORD *)(v31 + 356));
if ( result )
*(_DWORD *)(result + 700) = 0;
}
}
return result;
}