//
// FriendsProfilePage::onUnfollow from 0xa51b5c to 0xa51d8c (560 bytes)
//
// 3 xrefs:
// > ??> @ 0xf2c08
// > FriendsProfilePage::mountVirtualRow @ 0xa50154
// > ??> @ 0x1547598
//
// 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 13:00:05 +0000
//
__int64 __fastcall FriendsProfilePage::onUnfollow(FriendsProfilePage *this, cocos2d::CCObject *a2)
{
__int64 v3; // x0
__int64 v4; // x20
cocos2d::CCObject *v5; // x0
__int64 v6; // x1
char *v7; // x1
cocos2d::CCString *v8; // x0
size_t v9; // x0
char *v10; // x21
const char *v11; // x1
size_t v12; // x0
ButtonSprite **v13; // x20
char *CString; // [xsp+38h] [xbp+38h]
char *v16; // [xsp+38h] [xbp+38h]
__int64 v17[2]; // [xsp+48h] [xbp+48h] BYREF
void *v18; // [xsp+58h] [xbp+58h]
__int64 v19; // [xsp+60h] [xbp+60h] BYREF
__int64 v20; // [xsp+68h] [xbp+68h]
char *v21; // [xsp+70h] [xbp+70h]
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 640LL))(a2);
v4 = v3;
if ( v3 && *(int *)(v3 + 376) > 0 )
{
v5 = *((cocos2d::CCObject **)this + 105);
if ( v5 )
cocos2d::CCObject::release(v5);
*((_QWORD *)this + 105) = v4;
cocos2d::CCObject::retain((cocos2d::CCObject *)v4);
v19 = 0;
v20 = 0;
v21 = nullptr;
if ( (*(_BYTE *)(v4 + 320) & 1) != 0 )
{
std::string::__init(&v19, *(void **)(v4 + 336), *(_QWORD *)(v4 + 328));
}
else
{
v6 = *(_QWORD *)(v4 + 328);
v19 = *(_QWORD *)(v4 + 320);
v20 = v6;
v21 = *(char **)(v4 + 336);
}
v7 = (char *)&v19 + 1;
if ( (v19 & 1) != 0 )
v7 = v21;
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Are you sure you want to unfollow %s?",
v7);
CString = (char *)cocos2d::CCString::getCString(v8);
v17[0] = 0;
v17[1] = 0;
v18 = nullptr;
v9 = strlen(CString);
std::string::__init(v17, CString, v9);
if ( (v19 & 1) != 0 )
operator delete(v21);
v10 = (char *)this + 784;
v11 = (char *)v17 + 1;
if ( (v17[0] & 1) != 0 )
v11 = (const char *)v18;
v16 = (char *)v11;
v19 = 0;
v20 = 0;
v21 = nullptr;
v12 = strlen(v11);
std::string::__init(&v19, v16, v12);
v13 = (ButtonSprite **)FLAlertLayer::create(
(__int64)v10,
(cocos2d::CCLabelBMFont *)"Unfollow",
(char *)&v19,
(ButtonSprite *)"Back",
(ButtonSprite *)"Unfollow",
300.0);
if ( (v19 & 1) != 0 )
operator delete(v21);
(*((void (__fastcall **)(ButtonSprite **, __int64))*v13 + 9))(v13, 1);
ButtonSprite::updateBGImage(v13[77], "GJ_button_06.png");
(*((void (__fastcall **)(ButtonSprite **))*v13 + 164))(v13);
if ( (v17[0] & 1) != 0 )
operator delete(v18);
}
return _stack_chk_guard;
}