//
// ThreadViewPopup::refreshLockNotice from 0xc77898 to 0xc78024 (1932 bytes)
//
// 9 xrefs:
// > ThreadOptionsPopup::threadUpdateFinished @ 0xc78350
// > ThreadViewPopup::exitSearch @ 0xc86640
// > ThreadViewPopup::init @ 0xc878bc
// > ThreadViewPopup::threadSendFinished @ 0xc89ec8
// > ThreadViewPopup::threadSendFinished @ 0xc89f04
// > ThreadViewPopup::threadMessagesFinished @ 0xc8a30c
// > ThreadViewPopup::threadMessagesFinished @ 0xc8a3ac
// > ThreadViewPopup::threadMessagesFinished @ 0xc8a430
// > ??> @ 0xb0338
//
// 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:05:34 +0000
//
__int64 __fastcall ThreadViewPopup::refreshLockNotice(ThreadViewPopup *this, __int64 a2, const char *a3)
{
int v4; // w22
unsigned int v5; // w20
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x0
__int64 v11; // x0
__int64 v12; // x0
ButtonSprite *v13; // x24
__int64 v14; // x0
int v15; // w25
const char *v16; // x0
size_t v17; // x0
__int64 v18; // x0
char *v19; // x3
size_t v20; // x4
char *CString; // x1
char *v22; // x1
char *v23; // x23
float v24; // s8
float v25; // s0
__int64 v26; // x23
float v27; // s8
void (__fastcall *v28)(__int64, _BYTE *); // x24
float v29; // s9
float v30; // s0
const char *v32; // x1
__int64 v33; // x0
__int64 v34; // x0
const char *v35; // x0
size_t v36; // x0
__int64 v37; // x0
int v38; // w0
__int64 v39; // x1
int v40; // w0
bool v41; // w0
__int64 v42; // x0
int v43; // w0
__int64 v44; // x0
char v45; // w1
__int64 v46; // x0
__int64 v47; // x23
void (__fastcall *v48)(__int64, _BYTE *); // x22
char v49; // w0
__int64 v50; // x2
const char *v51; // x1
cocos2d::CCString *v52; // x0
char v53; // w0
__int64 v54; // x2
const char *v55; // x1
cocos2d::CCString *v56; // x0
char *v57; // [xsp+68h] [xbp+68h]
char *v58; // [xsp+68h] [xbp+68h]
char *v59; // [xsp+68h] [xbp+68h]
_BYTE v60[8]; // [xsp+70h] [xbp+70h] BYREF
__int64 v61[2]; // [xsp+78h] [xbp+78h] BYREF
void *v62; // [xsp+88h] [xbp+88h]
__int64 v63; // [xsp+90h] [xbp+90h] BYREF
size_t v64; // [xsp+98h] [xbp+98h]
void *v65; // [xsp+A0h] [xbp+A0h]
v4 = *((unsigned __int8 *)this + 1104);
if ( *((_BYTE *)this + 1104) )
return _stack_chk_guard;
if ( *((_BYTE *)this + 791) || ThreadViewPopup::removedView(this) || *(_BYTE *)(*((_QWORD *)this + 94) + 272LL) )
v5 = 1;
else
v5 = (unsigned __int8)ThreadViewPopup::dmSendBlocked(this);
v6 = *((_QWORD *)this + 152);
if ( v6 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, v5 ^ 1);
v7 = *((_QWORD *)this + 153);
if ( v7 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 344LL))(v7, v5 ^ 1);
v8 = *((_QWORD *)this + 126);
if ( v8 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 344LL))(v8, v5 ^ 1);
v9 = *((_QWORD *)this + 114);
if ( v9 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v9 + 344LL))(v9, v5 ^ 1);
v10 = *((_QWORD *)this + 127);
if ( v10 )
{
if ( !v5 )
goto LABEL_14;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v10 + 344LL))(v10, 0);
}
else if ( !v5 )
{
LABEL_14:
v11 = *((_QWORD *)this + 116);
if ( !v11 )
goto LABEL_16;
goto LABEL_15;
}
v33 = *((_QWORD *)this + 115);
if ( v33 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v33 + 1368LL))(v33, 0);
v34 = *((_QWORD *)this + 116);
if ( v34 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v34 + 1160LL))(v34, 0);
v11 = *((_QWORD *)this + 116);
LABEL_15:
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 344LL))(v11, v5 ^ 1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 116) + 1000LL))(*((_QWORD *)this + 116), v5 ^ 1);
}
LABEL_16:
v12 = *((_QWORD *)this + 114);
if ( v12 )
{
v13 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 1072LL))(v12);
v14 = *((_QWORD *)this + 94);
if ( *(_BYTE *)(v14 + 264) && (v15 = *(_DWORD *)(v14 + 268), v15 == 1) )
{
v35 = (const char *)(*(__int64 (__fastcall **)(_QWORD *))(**((_QWORD **)v13 + 78) + 944LL))(*((_QWORD **)v13 + 78));
v63 = 0;
v58 = (char *)v35;
v64 = 0;
v65 = nullptr;
v36 = strlen(v35);
std::string::__init(&v63, v58, v36);
v18 = 3;
v19 = "Req";
}
else
{
v15 = 0;
v16 = (const char *)(*(__int64 (__fastcall **)(_QWORD *))(**((_QWORD **)v13 + 78) + 944LL))(*((_QWORD **)v13 + 78));
v63 = 0;
v57 = (char *)v16;
v64 = 0;
v65 = nullptr;
v17 = strlen(v16);
std::string::__init(&v63, v57, v17);
v18 = 4;
v19 = "Send";
}
if ( (v63 & 1) != 0 )
{
v20 = v64;
if ( v18 != v64 )
goto LABEL_22;
}
else
{
v20 = (unsigned __int8)v63 >> 1;
if ( v18 != v20 )
goto LABEL_36;
}
v4 = std::string::compare((__int64)&v63, 0, 0xFFFFFFFFFFFFFFFFLL, v19, v20) == 0;
if ( (v63 & 1) == 0 )
{
if ( v4 )
goto LABEL_23;
goto LABEL_36;
}
LABEL_22:
operator delete(v65);
if ( v4 )
goto LABEL_23;
LABEL_36:
if ( v15 )
{
ButtonSprite::setString(v13, "Req");
v32 = "GJ_button_05.png";
}
else
{
ButtonSprite::setString(v13, "Send");
v32 = "GJ_button_01.png";
}
ButtonSprite::updateBGImage(v13, v32);
}
LABEL_23:
if ( !*((_QWORD *)this + 100) )
{
v46 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11B8890, "goldFont.fnt", a3);
*((_QWORD *)this + 100) = v46;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 160LL))(v46, 0.5);
v47 = *((_QWORD *)this + 100);
v48 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v47 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v60, *((float *)this + 212), *((float *)this + 265) + 14.0);
v48(v47, v60);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 100),
6);
}
if ( *((_BYTE *)this + 791) )
{
if ( *(_BYTE *)(*((_QWORD *)this + 94) + 272LL) )
CString = "Locked. Moderator view.";
else
CString = "Moderator view.";
}
else if ( ThreadViewPopup::removedView(this) )
{
CString = "You were removed from this group chat.";
}
else
{
v39 = *((_QWORD *)this + 94);
if ( *(_BYTE *)(v39 + 272) )
{
CString = "This conversation has been locked.";
}
else
{
v40 = *(_DWORD *)(v39 + 268);
switch ( v40 )
{
case 4:
v49 = *(_BYTE *)(v39 + 64);
v50 = v39 + 64;
v51 = (const char *)(v39 + 65);
if ( (v49 & 1) != 0 )
v51 = *(const char **)(v50 + 16);
v52 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s only accepts messages from friends.",
v51,
v50);
CString = (char *)cocos2d::CCString::getCString(v52);
break;
case 5:
v53 = *(_BYTE *)(v39 + 64);
v54 = v39 + 64;
v55 = (const char *)(v39 + 65);
if ( (v53 & 1) != 0 )
v55 = *(const char **)(v54 + 16);
v56 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s has messages turned off.",
v55,
v54);
CString = (char *)cocos2d::CCString::getCString(v56);
break;
case 7:
CString = "You can't message this user.";
break;
default:
CString = "Message request pending.";
break;
}
}
}
(*(void (__fastcall **)(_QWORD, char *))(**((_QWORD **)this + 100) + 928LL))(*((_QWORD *)this + 100), CString);
cocos2d::CCLabelBMFont::limitLabelWidth(
*((cocos2d::CCLabelBMFont **)this + 100),
*((float *)this + 210) - 40.0,
0.5,
0.3);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 100) + 344LL))(*((_QWORD *)this + 100), v5);
if ( !*((_QWORD *)this + 101) )
{
v61[0] = 0;
v61[1] = 0;
v62 = nullptr;
std::string::__init(v61, &byte_11B8890, 0);
v63 = 0;
v64 = 0;
v65 = nullptr;
std::string::__init(&v63, &byte_11B8890, 0);
v44 = InfoAlertButton::create((char *)v61, (char *)&v63, 0.5);
v45 = v63;
*((_QWORD *)this + 101) = v44;
if ( (v45 & 1) != 0 )
operator delete(v65);
if ( (v61[0] & 1) != 0 )
operator delete(v62);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 101), 1.5);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
*((_QWORD *)this + 101));
}
if ( *((_BYTE *)this + 791) )
{
v22 = "Moderator View";
v23 = "You are reading this conversation as a moderator.\nParticipants cannot see this and nothing is marked read.";
}
else
{
if ( ThreadViewPopup::removedView(this) )
{
v22 = "Removed";
}
else
{
v37 = *((_QWORD *)this + 94);
if ( *(_BYTE *)(v37 + 272) )
{
v22 = "Conversation Locked";
}
else
{
v38 = *(_DWORD *)(v37 + 268);
switch ( v38 )
{
case 4:
v22 = "Friends Only";
break;
case 5:
v22 = "Messages Off";
break;
case 7:
v22 = "Blocked";
break;
default:
v22 = "Request Pending";
break;
}
}
}
if ( *((_BYTE *)this + 791) )
{
v23 = "You are reading this conversation as a moderator.\n"
"Participants cannot see this and nothing is marked read.";
}
else
{
v59 = v22;
v41 = ThreadViewPopup::removedView(this);
v22 = v59;
if ( v41 )
{
v23 = "The owner removed you from this group chat.\n"
"You can still read messages sent before you were removed.\n"
"You cannot see new messages or send messages.\n"
"You can remove the group chat from the options menu when you are done.";
}
else
{
v42 = *((_QWORD *)this + 94);
if ( *(_BYTE *)(v42 + 272) )
{
v23 = "A moderator locked this conversation.\nIt can still be read, but no new messages can be sent.";
}
else
{
v43 = *(_DWORD *)(v42 + 268);
switch ( v43 )
{
case 4:
v23 = "This user only accepts messages from friends.\nSend a friend request to message them.";
break;
case 5:
v23 = "This user has turned messages off.\nYou can read the conversation but not reply.";
break;
case 7:
v23 = "Messages between you and this user are blocked.";
break;
default:
v23 = "Your message was sent as a request.\nYou can write again once they reply.";
break;
}
}
}
}
}
std::string::assign((__int64 *)(*((_QWORD *)this + 101) + 504LL), v22);
std::string::assign((__int64 *)(*((_QWORD *)this + 101) + 528LL), v23);
v24 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 100) + 328LL))(*((_QWORD *)this + 100));
v25 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 100) + 168LL))(*((_QWORD *)this + 100));
v26 = *((_QWORD *)this + 101);
v27 = v24 * v25;
v28 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v26 + 184LL);
v29 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 100) + 224LL))(*((_QWORD *)this + 100));
v30 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)this + 100) + 240LL))(*((_QWORD *)this + 100));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v60, (float)(v29 + (float)(v27 * 0.5)) + 12.0, v30);
v28(v26, v60);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 101) + 344LL))(*((_QWORD *)this + 101), v5);
return _stack_chk_guard;
}