//
// cocos2d::extension::CCHttpRequest::~CCHttpRequest from 0x6efe70 to 0x6f004c (476 bytes)
//
// 2 xrefs:
// > ??> @ 0x9c0a8
// > ??> @ 0x115df40
//
// 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::CCHttpRequest::~CCHttpRequest(cocos2d::extension::CCHttpRequest *this)
{
cocos2d::CCObject *pTarget; // x0
std::string *m_start; // x19
std::string *m_finish; // x21
stl::StringData::Internal *m_data; // x1
__int64 *v6; // x0
unsigned int *v7; // x1
int v8; // w2
stl::StringData::Internal *v9; // x1
char *v10; // x0
unsigned __int8 *v11; // x0
stl::StringData::Internal *v12; // x1
char *v13; // x0
unsigned int *v14; // x1
int v15; // w2
unsigned int *v16; // x1
int v17; // w2
pTarget = this->_pTarget;
this->__vftable = (cocos2d::extension::CCHttpRequest_vtbl *)&off_115DF30;
if ( pTarget )
cocos2d::CCObject::release(pTarget);
m_start = this->_headers.m_start;
m_finish = this->_headers.m_finish;
if ( m_start != m_finish )
{
do
{
while ( 1 )
{
m_data = m_start->m_data.m_data;
v6 = (__int64 *)((char *)m_start->m_data.m_data - 24);
if ( v6 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)((char *)m_data - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *((_DWORD *)m_data - 2);
*((_DWORD *)m_data - 2) = v8 - 1;
}
if ( v8 <= 0 )
break;
}
if ( m_finish == ++m_start )
goto LABEL_12;
}
++m_start;
operator delete(v6);
}
while ( m_finish != m_start );
LABEL_12:
m_finish = this->_headers.m_start;
}
if ( m_finish )
operator delete(m_finish);
v9 = this->_tag.m_data.m_data;
v10 = (char *)v9 - 24;
if ( (__int64 *)((char *)v9 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v14 = (unsigned int *)((char *)v9 - 8);
do
v15 = __ldaxr(v14);
while ( __stlxr(v15 - 1, v14) );
}
else
{
v15 = *((_DWORD *)v9 - 2);
*((_DWORD *)v9 - 2) = v15 - 1;
}
if ( v15 <= 0 )
operator delete(v10);
}
v11 = this->_requestData.m_start;
if ( v11 )
operator delete(v11);
v12 = this->_url.m_data.m_data;
v13 = (char *)v12 - 24;
if ( (__int64 *)((char *)v12 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v16 = (unsigned int *)((char *)v12 - 8);
do
v17 = __ldaxr(v16);
while ( __stlxr(v17 - 1, v16) );
}
else
{
v17 = *((_DWORD *)v12 - 2);
*((_DWORD *)v12 - 2) = v17 - 1;
}
if ( v17 <= 0 )
operator delete(v13);
}
cocos2d::CCObject::~CCObject(this);
operator delete(this);
}