//
// InfoLayer::onBulkDelete from 0x1403d3bd0 to 0x1403d3e3e (622 bytes)
//
// 2 xrefs:
// > InfoLayer::setupBulkUI @ 0x1403d35b0
// > ??> @ 0x1409248a8
//
// 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 11:31:36 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall InfoLayer::onBulkDelete(__int64 a1)
{
int v2; // edx
const char *v3; // r8
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // r8
int v7; // edi
char *v8; // rax
void *v9; // rcx
void *v10; // rcx
void *v11; // rcx
void *Block[2]; // [rsp+40h] [rbp-29h] BYREF
char *v13; // [rsp+50h] [rbp-19h]
void *v14[2]; // [rsp+60h] [rbp-9h] BYREF
__m128i si128; // [rsp+70h] [rbp+7h]
void *v16[2]; // [rsp+80h] [rbp+17h] BYREF
__int128 v17; // [rsp+90h] [rbp+27h]
__m128i Src; // [rsp+A0h] [rbp+37h] BYREF
int v19; // [rsp+B0h] [rbp+47h]
v2 = *(_DWORD *)(a1 + 944);
if ( v2 > 0 )
{
v3 = (const char *)&unk_14070D03C;
if ( v2 == 1 )
v3 = &byte_1406ED6E0;
v4 = cocos2d::CCString::createWithFormat(
"Delete %i comment%s? Backups are kept for recovery, but they won't be visible in-game.",
v2,
v3);
CString = cocos2d::CCString::getCString(v4);
*(_OWORD *)v16 = 0;
v17 = 0;
v6 = -1;
do
++v6;
while ( CString[v6] );
sub_14003D230(v16, CString, v6);
*(_OWORD *)v14 = 0;
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(v14[0]) = 0;
v7 = a1 + 688;
if ( !a1 )
v7 = 0;
Src = _mm_load_si128((const __m128i *)&xmmword_140836780);
v19 = 7;
Block[0] = sub_14003D460(0x14u);
v13 = (char *)Block[0] + 20;
memmove(Block[0], &Src, 0x14u);
Block[1] = (char *)Block[0] + 20;
v8 = sub_1400A51F0(v7, 4, (int)"Bulk Delete", (__int64)v16, (__int64)"Delete", (__int64)Block, (__int64)v14);
(*(void (__fastcall **)(char *))(*(_QWORD *)v8 + 1064LL))(v8);
v9 = Block[0];
if ( Block[0] )
{
if ( ((v13 - (char *)Block[0]) & 0xFFFFFFFFFFFFFFFCuLL) >= 0x1000 )
{
v9 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
*(_OWORD *)Block = 0;
v13 = nullptr;
}
if ( si128.m128i_i64[1] > 0xFuLL )
{
v10 = v14[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v10 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v10 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v10);
}
if ( *((_QWORD *)&v17 + 1) > 0xFu )
{
v11 = v16[0];
if ( (unsigned __int64)(*((_QWORD *)&v17 + 1) + 1LL) >= 0x1000 )
{
v11 = *((void **)v16[0] - 1);
if ( (unsigned __int64)((char *)v16[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
}
}
}