//
// MessageThreadsPage::onDeleteSelected from 0x7517ec to 0x751a82 (662 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:58:51 +0000
//
int __fastcall MessageThreadsPage::onDeleteSelected(MessageThreadsPage *this, cocos2d::CCObject *a2)
{
char *v2; // r6
int result; // r0
const char *v4; // r8
signed int v5; // r4
const char *v6; // r7
const char *v7; // r9
const char *v8; // r10
const char *v9; // r11
int v10; // r0
__int16 *v11; // r2
cocos2d::CCString *v12; // r0
char *CString; // r0
int v14; // r3
__int16 *v15; // r2
cocos2d::CCString *v16; // r0
char *v17; // r0
int v18; // r3
__int16 *v19; // r2
cocos2d::CCString *v20; // r0
char *v21; // r0
int v22; // r3
__int16 *v23; // r2
cocos2d::CCString *v24; // r0
char *v25; // r0
const char *v26; // r8
cocos2d::CCString *v27; // r0
size_t v28; // r0
char *v29; // r1
size_t v30; // r2
int v31; // r9
size_t v32; // r0
char **v33; // r6
int v34; // [sp+Ch] [bp-38h] BYREF
int v35; // [sp+10h] [bp-34h]
int v36; // [sp+14h] [bp-30h]
int v37[2]; // [sp+18h] [bp-2Ch] BYREF
char *v38; // [sp+20h] [bp-24h]
int v39[3]; // [sp+24h] [bp-20h] BYREF
int v40[3]; // [sp+30h] [bp-14h] BYREF
v2 = (char *)this;
result = MessageThreadsPage::selectedCount(this);
v4 = (const char *)result;
if ( result && *((_DWORD *)v2 + 147) )
{
v5 = 0;
v6 = nullptr;
v7 = nullptr;
v8 = nullptr;
v9 = nullptr;
while ( v5 < cocos2d::CCArray::count(*((cocos2d::CCArray **)v2 + 147)) )
{
v10 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)v2 + 147), v5);
if ( *(_BYTE *)(v10 + 208) )
{
if ( *(_BYTE *)(v10 + 168) )
{
if ( *(_BYTE *)(v10 + 169) )
++v8;
else
++v9;
}
else if ( *(_DWORD *)(v10 + 172) == 8 )
{
++v6;
}
else
{
++v7;
}
}
++v5;
}
v34 = 0;
v35 = 0;
v36 = 0;
if ( v9 )
{
if ( v9 == (_BYTE *)&dword_0 + 1 )
v11 = (__int16 *)&unk_B6B226;
else
v11 = &a1i2r3e45s789g[8];
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i DM%s will be cleared. Your message history will be perman"
"ently deleted.",
v9,
v11);
CString = (char *)cocos2d::CCString::getCString(v12);
std::string::append(&v34, CString);
}
if ( v8 )
{
if ( (v34 & 1) != 0 )
v14 = v35;
else
v14 = (int)(unsigned __int8)v34 >> 1;
if ( v14 )
std::string::append(&v34, "\n");
if ( v8 == (_BYTE *)&dword_0 + 1 )
v15 = (__int16 *)&unk_B6B226;
else
v15 = &a1i2r3e45s789g[8];
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i pending request%s will be cancelled.",
v8,
v15);
v17 = (char *)cocos2d::CCString::getCString(v16);
std::string::append(&v34, v17);
}
if ( v7 )
{
if ( (v34 & 1) != 0 )
v18 = v35;
else
v18 = (int)(unsigned __int8)v34 >> 1;
if ( v18 )
std::string::append(&v34, "\n");
if ( v7 == (_BYTE *)&dword_0 + 1 )
v19 = (__int16 *)&unk_B6B226;
else
v19 = &a1i2r3e45s789g[8];
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"You will leave %i group chat%s. You can only rejoin if you a"
"re invited back.",
v7,
v19);
v21 = (char *)cocos2d::CCString::getCString(v20);
std::string::append(&v34, v21);
}
if ( v6 )
{
if ( (v34 & 1) != 0 )
v22 = v35;
else
v22 = (int)(unsigned __int8)v34 >> 1;
if ( v22 )
std::string::append(&v34, "\n");
if ( v6 == (_BYTE *)&dword_0 + 1 )
v23 = (__int16 *)&unk_B6B226;
else
v23 = &a1i2r3e45s789g[8];
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i group chat%s you were removed from will disappear from yo"
"ur inbox. You will no longer be able to read or report them.",
v6,
v23);
v25 = (char *)cocos2d::CCString::getCString(v24);
std::string::append(&v34, v25);
}
if ( v4 == (_BYTE *)&dword_0 + 1 )
{
v26 = "Delete this conversation?";
}
else
{
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Delete %i conversations?",
v4);
v26 = (const char *)cocos2d::CCString::getCString(v27);
}
v37[0] = 0;
v37[1] = 0;
v38 = nullptr;
v28 = strlen(v26);
std::string::__init(v37, v26, v28);
std::operator+(v39, "\n", (unsigned __int8 *)&v34);
if ( (v39[0] & 1) != 0 )
{
v29 = (char *)v39[2];
v30 = v39[1];
}
else
{
v30 = (int)LOBYTE(v39[0]) >> 1;
v29 = (char *)v39 + 1;
}
std::string::append(v37, v29, v30);
v31 = (int)(v2 + 524);
std::string::~string((int)v39);
if ( (v37[0] & 1) == 0 )
v2 = (char *)v37 + 1;
v40[0] = 0;
if ( (v37[0] & 1) != 0 )
v2 = v38;
v40[1] = 0;
v40[2] = 0;
v32 = strlen(v2);
std::string::__init(v40, v2, v32);
v33 = (char **)FLAlertLayer::create(
v31,
(cocos2d::CCLabelBMFont *)"Delete",
(int)v40,
(ButtonSprite *)"Back",
(ButtonSprite *)"Delete",
300.0);
std::string::~string((int)v40);
ButtonSprite::updateBGImage(v33[121], "GJ_button_06.png");
(*((void (__fastcall **)(char **, int))*v33 + 9))(v33, 2);
(*((void (__fastcall **)(char **))*v33 + 164))(v33);
std::string::~string((int)v37);
return std::string::~string((int)&v34);
}
return result;
}