//
// cocos2d::extension::CCHttpResponse::~CCHttpResponse from 0x180018ef0 to 0x180019011 (289 bytes)
//
// 4 xrefs:
// > sub_180019020 @ 0x180019082
// > sub_180019020 @ 0x18001903c
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004aba8
//
// 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
//
void __fastcall cocos2d::extension::CCHttpResponse::~CCHttpResponse(cocos2d::extension::CCHttpResponse *this)
{
cocos2d::CCObject *v2; // rcx
unsigned __int64 v3; // rdx
_QWORD *v4; // rcx
_QWORD *v5; // rcx
void *v6; // rcx
*(_QWORD *)this = &cocos2d::extension::CCHttpResponse::`vftable';
v2 = *((cocos2d::CCObject **)this + 7);
if ( v2 )
cocos2d::CCObject::release(v2);
v3 = *((_QWORD *)this + 19);
if ( v3 > 0xF )
{
v4 = *((_QWORD **)this + 16);
if ( v3 + 1 >= 0x1000 )
{
if ( (unsigned __int64)v4 - *(v4 - 1) - 8 > 0x1F )
goto LABEL_19;
v4 = (_QWORD *)*(v4 - 1);
}
j_j_free(v4);
}
*((_QWORD *)this + 18) = 0;
*((_QWORD *)this + 19) = 15;
*((_BYTE *)this + 128) = 0;
v5 = *((_QWORD **)this + 12);
if ( v5 )
{
if ( *((_QWORD *)this + 14) - (_QWORD)v5 >= 0x1000u )
{
if ( (unsigned __int64)v5 - *(v5 - 1) - 8 > 0x1F )
goto LABEL_19;
v5 = (_QWORD *)*(v5 - 1);
}
j_j_free(v5);
*((_QWORD *)this + 12) = 0;
*((_QWORD *)this + 13) = 0;
*((_QWORD *)this + 14) = 0;
}
v6 = *((void **)this + 9);
if ( v6 )
{
if ( *((_QWORD *)this + 11) - (_QWORD)v6 < 0x1000u )
{
LABEL_17:
j_j_free(v6);
*((_QWORD *)this + 9) = 0;
*((_QWORD *)this + 10) = 0;
*((_QWORD *)this + 11) = 0;
goto LABEL_18;
}
if ( (unsigned __int64)v6 - *((_QWORD *)v6 - 1) - 8 <= 0x1F )
{
v6 = *((void **)v6 - 1);
goto LABEL_17;
}
LABEL_19:
invalid_parameter_noinfo_noreturn();
}
LABEL_18:
cocos2d::CCObject::~CCObject(this);
}