//
// GJNotificationCell::onMute from 0x100241990 to 0x100241bea (602 bytes)
//
// 1 xrefs:
// > GJNotificationCell::loadFromNotification @ 0x100234bdc
//
// 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:18 +0000
//
void __fastcall GJNotificationCell::onMute(__int64 a1)
{
__int64 v1; // rax
char v2; // cl
__int128 *v3; // rax
unsigned __int64 v4; // rdx
__int64 v5; // rax
const char *CString; // r14
size_t v7; // rax
size_t v8; // r15
char *v9; // r12
char *v10; // r14
size_t v11; // r13
size_t v12; // rax
size_t v13; // r15
char *v14; // r12
size_t v15; // r13
__int64 *v16; // rbx
_QWORD v17[2]; // [rsp+0h] [rbp-70h] BYREF
void *__p; // [rsp+10h] [rbp-60h]
_QWORD __dst[2]; // [rsp+18h] [rbp-58h] BYREF
char *__s; // [rsp+28h] [rbp-48h]
__int128 v21; // [rsp+30h] [rbp-40h] BYREF
void *v22; // [rsp+40h] [rbp-30h]
v1 = *(_QWORD *)(a1 + 560);
if ( !v1 || *(int *)(v1 + 216) <= 0 )
return;
v2 = *(_BYTE *)(v1 + 224);
if ( (v2 & 1) != 0 )
{
v4 = *(_QWORD *)(v1 + 232);
if ( v4 )
{
sub_10001AD30(&v21, *(const void **)(v1 + 240), v4);
goto LABEL_9;
}
}
else if ( v2 )
{
v3 = (__int128 *)(v1 + 224);
v22 = *((void **)v3 + 2);
v21 = *v3;
goto LABEL_9;
}
LOBYTE(v21) = 18;
*(_QWORD *)((char *)&v21 + 1) = 0x6573752073696874LL;
*(_WORD *)((char *)&v21 + 9) = 114;
LABEL_9:
v5 = sub_10088E820(
"Stop notifications from %s?\n"
"You stay friends / followers. Unmute from the Muted tab in your friends list.",
v17[0]);
CString = (const char *)cocos2d::CCString::getCString(v5);
v7 = strlen(CString);
if ( v7 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v8 = v7;
if ( v7 >= 0x17 )
{
v11 = 26;
if ( (v7 | 7) != 0x17 )
v11 = (v7 | 7) + 1;
v9 = (char *)operator new(v11);
__s = v9;
__dst[0] = v11 | 1;
__dst[1] = v8;
LABEL_17:
memmove(v9, CString, v8);
v9[v8] = 0;
if ( (__dst[0] & 1) != 0 )
goto LABEL_13;
goto LABEL_18;
}
LOBYTE(__dst[0]) = 2 * v7;
v9 = (char *)__dst + 1;
if ( v7 )
goto LABEL_17;
BYTE1(__dst[0]) = 0;
if ( (__dst[0] & 1) != 0 )
{
LABEL_13:
v10 = __s;
goto LABEL_19;
}
LABEL_18:
v10 = (char *)__dst + 1;
LABEL_19:
v12 = strlen(v10);
if ( v12 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v13 = v12;
if ( v12 >= 0x17 )
{
v15 = 26;
if ( (v12 | 7) != 0x17 )
v15 = (v12 | 7) + 1;
v14 = (char *)operator new(v15);
__p = v14;
v17[0] = v15 | 1;
v17[1] = v13;
}
else
{
LOBYTE(v17[0]) = 2 * v12;
v14 = (char *)v17 + 1;
if ( !v12 )
goto LABEL_27;
}
memmove(v14, v10, v13);
LABEL_27:
v14[v13] = 0;
v16 = (__int64 *)FLAlertLayer::create_1(a1 + 552, "Mute", v17, "Cancel", "Mute", 300.0);
if ( (v17[0] & 1) != 0 )
operator delete(__p);
ButtonSprite::updateBGImage(v16[77], (__int64)"GJ_button_06.png");
(*(void (__fastcall **)(__int64 *))(*v16 + 1312))(v16);
if ( (__dst[0] & 1) != 0 )
operator delete(__s);
if ( (v21 & 1) != 0 )
operator delete(v22);
}