//
// FriendsProfilePage::onUnfollow from 0x100736bd0 to 0x100736e39 (617 bytes)
//
// 1 xrefs:
// > FriendsProfilePage::mountVirtualRow @ 0x10073655a
//
// 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:36:25 +0000
//
void __fastcall FriendsProfilePage::onUnfollow(__int64 a1, __int64 a2)
{
__int64 v3; // rax
__int64 v4; // r14
_DWORD *v5; // rdi
__int64 v6; // r14
__int64 v7; // rax
const char *CString; // r14
size_t v9; // rax
size_t v10; // r15
char *v11; // r12
char *v12; // r14
size_t v13; // r13
size_t v14; // rax
size_t v15; // r15
char *v16; // r12
size_t v17; // r13
__int64 *v18; // rbx
char v19; // [rsp+0h] [rbp-80h]
_QWORD v20[2]; // [rsp+8h] [rbp-78h] BYREF
void *v21; // [rsp+18h] [rbp-68h]
__int128 v22; // [rsp+20h] [rbp-60h] BYREF
void *__p; // [rsp+30h] [rbp-50h]
_QWORD __dst[2]; // [rsp+40h] [rbp-40h] BYREF
char *__s; // [rsp+50h] [rbp-30h]
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 640LL))(a2);
if ( !v3 )
return;
v4 = v3;
if ( *(int *)(v3 + 376) <= 0 )
return;
v5 = *(_DWORD **)(a1 + 840);
if ( v5 )
cocos2d::CCObject::release(v5);
*(_QWORD *)(a1 + 840) = v4;
cocos2d::CCObject::retain(v4);
if ( (*(_BYTE *)(v4 + 320) & 1) != 0 )
{
sub_10001AD30(&v22, *(const void **)(v4 + 336), *(_QWORD *)(v4 + 328));
}
else
{
v6 = v4 + 320;
__p = *(void **)(v6 + 16);
v22 = *(_OWORD *)v6;
}
v7 = sub_10088E820("Are you sure you want to unfollow %s?", v19);
CString = (const char *)cocos2d::CCString::getCString(v7);
v9 = strlen(CString);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v10 = v9;
if ( v9 >= 0x17 )
{
v13 = 26;
if ( (v9 | 7) != 0x17 )
v13 = (v9 | 7) + 1;
v11 = (char *)operator new(v13);
__s = v11;
__dst[0] = v13 | 1;
__dst[1] = v10;
}
else
{
LOBYTE(__dst[0]) = 2 * v9;
v11 = (char *)__dst + 1;
if ( !v9 )
{
BYTE1(__dst[0]) = 0;
if ( (v22 & 1) == 0 )
goto LABEL_13;
goto LABEL_12;
}
}
memmove(v11, CString, v10);
v11[v10] = 0;
if ( (v22 & 1) != 0 )
LABEL_12:
operator delete(__p);
LABEL_13:
if ( (__dst[0] & 1) != 0 )
v12 = __s;
else
v12 = (char *)__dst + 1;
v14 = strlen(v12);
if ( v14 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v15 = v14;
if ( v14 >= 0x17 )
{
v17 = 26;
if ( (v14 | 7) != 0x17 )
v17 = (v14 | 7) + 1;
v16 = (char *)operator new(v17);
v21 = v16;
v20[0] = v17 | 1;
v20[1] = v15;
}
else
{
LOBYTE(v20[0]) = 2 * v14;
v16 = (char *)v20 + 1;
if ( !v14 )
goto LABEL_29;
}
memmove(v16, v12, v15);
LABEL_29:
v16[v15] = 0;
v18 = (__int64 *)FLAlertLayer::create_1(
(int)a1 + 784,
(int)"Unfollow",
(__int64)v20,
(int)"Back",
(int)"Unfollow",
300.0);
if ( (v20[0] & 1) != 0 )
operator delete(v21);
(*(void (__fastcall **)(__int64 *, __int64))(*v18 + 72))(v18, 1);
ButtonSprite::updateBGImage(v18[77], (__int64)"GJ_button_06.png");
(*(void (__fastcall **)(__int64 *))(*v18 + 1312))(v18);
if ( (__dst[0] & 1) != 0 )
operator delete(__s);
}