//
// std::vector>::_M_erase from 0x898088 to 0x89834c (708 bytes)
//
// 7 xrefs:
// > GJBaseGameLayer::addCustomEnterEffect @ 0x898578
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x8988cc
// > GJBaseGameLayer::addAreaEffect @ 0x898bf4
// > GJBaseGameLayer::controlAreaEffectWithID @ 0x898e24
// > GJBaseGameLayer::controlAreaEffectWithID @ 0x898e5c
// > GJBaseGameLayer::controlAreaEffect @ 0x899188
// > ??> @ 0xa6458
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall std::vector::_M_erase(__int64 a1, __int64 a2)
{
__int64 v3; // x19
__int64 v5; // x0
__int64 v6; // x19
__int64 v7; // x22
__int64 v8; // x20
void *v9; // x0
__int64 v10; // x1
__int64 v11; // x3
__int64 v12; // x2
__int64 v13; // x0
int v14; // w12
int v15; // w11
int v16; // w10
int v17; // w9
int v18; // w8
int v19; // w7
int v20; // w6
int v21; // w5
int v22; // w4
int v23; // w3
int v24; // w2
int v25; // w17
int v26; // w16
int v27; // w15
int v28; // w14
int v29; // w1
__int64 v30; // x2
int v31; // w10
int v32; // w9
int v33; // w8
int v34; // w7
int v35; // w6
int v36; // w5
int v37; // w4
int v38; // w3
int v39; // w13
int v40; // w12
int v41; // w3
__int64 v42; // x4
__int64 v43; // x5
int v44; // w0
__int64 v45; // x3
__int64 v46; // x2
__int64 v47; // x1
int v48; // w10
int v49; // w9
int v50; // w8
void *v51; // x0
void *v52; // x0
__int64 v53; // x20
__int64 v54; // x19
void *v55; // x0
v3 = *(_QWORD *)(a1 + 8);
if ( v3 != a2 + 264 )
{
v5 = v3 - (a2 + 264);
if ( 0xF83E0F83E0F83E1LL * (v5 >> 3) > 0 )
{
v6 = a2 + 272;
v7 = a2 + v5 + 272;
do
{
v8 = *(_QWORD *)(v6 - 256);
while ( v8 )
{
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
v6 - 272,
*(_QWORD **)(v8 + 24));
v9 = (void *)v8;
v8 = *(_QWORD *)(v8 + 16);
operator delete(v9);
}
v10 = *(_QWORD *)(v6 + 8);
*(_QWORD *)(v6 - 256) = 0;
*(_QWORD *)(v6 - 248) = v6 - 264;
*(_QWORD *)(v6 - 240) = v6 - 264;
*(_QWORD *)(v6 - 232) = 0;
if ( v10 )
{
v11 = *(_QWORD *)(v6 + 16);
v12 = *(_QWORD *)(v6 + 24);
*(_QWORD *)(v6 - 256) = v10;
*(_QWORD *)(v6 - 248) = v11;
*(_QWORD *)(v6 - 240) = v12;
*(_QWORD *)(v10 + 8) = v6 - 264;
v13 = *(_QWORD *)(v6 + 32);
*(_QWORD *)(v6 + 8) = 0;
*(_QWORD *)(v6 + 16) = v6;
*(_QWORD *)(v6 + 24) = v6;
*(_QWORD *)(v6 - 232) = v13;
*(_QWORD *)(v6 + 32) = 0;
}
v14 = *(_DWORD *)(v6 + 60);
v15 = *(_DWORD *)(v6 + 64);
v16 = *(_DWORD *)(v6 + 68);
v17 = *(_DWORD *)(v6 + 72);
v18 = *(_DWORD *)(v6 + 76);
v19 = *(_DWORD *)(v6 + 80);
v20 = *(_DWORD *)(v6 + 84);
v21 = *(_DWORD *)(v6 + 88);
v22 = *(_DWORD *)(v6 + 92);
v23 = *(_DWORD *)(v6 + 96);
v24 = *(_DWORD *)(v6 + 100);
v25 = *(_DWORD *)(v6 + 40);
v26 = *(_DWORD *)(v6 + 44);
v27 = *(_DWORD *)(v6 + 48);
v28 = *(_DWORD *)(v6 + 52);
v29 = *(_DWORD *)(v6 + 104);
*(_DWORD *)(v6 - 208) = *(_DWORD *)(v6 + 56);
*(_DWORD *)(v6 - 204) = v14;
*(_DWORD *)(v6 - 200) = v15;
*(_DWORD *)(v6 - 196) = v16;
*(_DWORD *)(v6 - 192) = v17;
*(_DWORD *)(v6 - 188) = v18;
*(_DWORD *)(v6 - 184) = v19;
*(_DWORD *)(v6 - 180) = v20;
*(_DWORD *)(v6 - 176) = v21;
*(_DWORD *)(v6 - 172) = v22;
*(_DWORD *)(v6 - 168) = v23;
*(_DWORD *)(v6 - 164) = v24;
*(_DWORD *)(v6 - 224) = v25;
*(_DWORD *)(v6 - 220) = v26;
*(_DWORD *)(v6 - 216) = v27;
*(_DWORD *)(v6 - 212) = v28;
*(_DWORD *)(v6 - 160) = v29;
v30 = *(_QWORD *)(v6 + 184);
LOBYTE(v29) = *(_BYTE *)(v6 + 192);
v31 = *(_DWORD *)(v6 + 120);
v32 = *(_DWORD *)(v6 + 124);
v33 = *(_DWORD *)(v6 + 128);
v34 = *(_DWORD *)(v6 + 132);
v35 = *(_DWORD *)(v6 + 136);
v36 = *(_DWORD *)(v6 + 140);
v37 = *(_DWORD *)(v6 + 144);
v38 = *(_DWORD *)(v6 + 148);
v39 = *(_DWORD *)(v6 + 108);
v40 = *(_DWORD *)(v6 + 112);
*(_DWORD *)(v6 - 148) = *(_DWORD *)(v6 + 116);
*(_DWORD *)(v6 - 144) = v31;
*(_DWORD *)(v6 - 140) = v32;
*(_DWORD *)(v6 - 136) = v33;
*(_DWORD *)(v6 - 132) = v34;
*(_DWORD *)(v6 - 128) = v35;
*(_DWORD *)(v6 - 116) = v38;
*(_DWORD *)(v6 - 156) = v39;
v41 = *(_DWORD *)(v6 + 168);
*(_DWORD *)(v6 - 152) = v40;
*(_DWORD *)(v6 - 124) = v36;
*(_DWORD *)(v6 - 120) = v37;
v42 = *(_QWORD *)(v6 + 152);
v43 = *(_QWORD *)(v6 + 160);
v44 = *(_DWORD *)(v6 + 176);
*(_QWORD *)(v6 - 80) = v30;
LODWORD(v30) = *(_DWORD *)(v6 + 172);
*(_QWORD *)(v6 - 112) = v42;
*(_QWORD *)(v6 - 104) = v43;
*(_DWORD *)(v6 - 96) = v41;
*(_DWORD *)(v6 - 88) = v44;
*(_DWORD *)(v6 - 92) = v30;
*(_BYTE *)(v6 - 72) = v29;
v45 = *(_QWORD *)(v6 + 224);
v46 = *(_QWORD *)(v6 + 232);
v47 = *(_QWORD *)(v6 + 240);
v48 = *(_DWORD *)(v6 + 200);
v49 = *(_DWORD *)(v6 + 204);
v50 = *(_DWORD *)(v6 + 208);
LOBYTE(v34) = *(_BYTE *)(v6 + 212);
LOBYTE(v35) = *(_BYTE *)(v6 + 213);
LOBYTE(v43) = *(_BYTE *)(v6 + 214);
LODWORD(v42) = *(_DWORD *)(v6 + 216);
v51 = *(void **)(v6 - 40);
*(_DWORD *)(v6 - 68) = *(_DWORD *)(v6 + 196);
*(_DWORD *)(v6 - 64) = v48;
*(_DWORD *)(v6 - 60) = v49;
*(_DWORD *)(v6 - 56) = v50;
*(_BYTE *)(v6 - 52) = v34;
*(_BYTE *)(v6 - 51) = v35;
*(_BYTE *)(v6 - 50) = v43;
*(_DWORD *)(v6 - 48) = v42;
*(_QWORD *)(v6 - 40) = v45;
*(_QWORD *)(v6 + 224) = 0;
*(_QWORD *)(v6 - 32) = v46;
*(_QWORD *)(v6 + 232) = 0;
*(_QWORD *)(v6 - 24) = v47;
*(_QWORD *)(v6 + 240) = 0;
if ( v51 )
operator delete(v51);
*(_DWORD *)(v6 - 16) = *(_DWORD *)(v6 + 248);
v6 += 264;
}
while ( v6 != v7 );
v3 = *(_QWORD *)(a1 + 8);
}
}
v52 = *(void **)(v3 - 32);
v53 = v3 - 264;
*(_QWORD *)(a1 + 8) = v3 - 264;
if ( v52 )
operator delete(v52);
v54 = *(_QWORD *)(v3 - 248);
while ( v54 )
{
std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase(
v53,
*(_QWORD **)(v54 + 24));
v55 = (void *)v54;
v54 = *(_QWORD *)(v54 + 16);
operator delete(v55);
}
return a2;
}