//
// cocos2d::CCPrettyPrinter::visit_1 from 0x10024ecb4 to 0x10024eef4 (576 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007cea10
//
// 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::CCPrettyPrinter::visit_1(cocos2d::CCPrettyPrinter *a1, const cocos2d::CCDictionary *a2)
{
int v4; // w10
cocos2d::CCPrettyPrinter_vtbl *v5; // x1
std::string::size_type v6; // x2
cocos2d::CCDictElement *m_pElements; // x27
char v8; // w8
cocos2d::CCDictElement *next; // x26
cocos2d::CCPrettyPrinter_vtbl *v10; // x8
void **v11; // x1
std::string::size_type v12; // x2
int v13; // w9
cocos2d::CCPrettyPrinter_vtbl *v14; // x1
std::string::size_type v15; // x2
void *__p[2]; // [xsp+10h] [xbp-4A0h] BYREF
__int64 v17; // [xsp+20h] [xbp-490h]
_QWORD v18[4]; // [xsp+30h] [xbp-480h] BYREF
char v19; // [xsp+57h] [xbp-459h]
__int128 v20; // [xsp+58h] [xbp-458h]
__int64 v21; // [xsp+68h] [xbp-448h]
std::string::value_type __s[1000]; // [xsp+70h] [xbp-440h] BYREF
std::string::append((std::string *)&a1[5], "\n");
v4 = SHIBYTE(a1[4].__vftable);
if ( v4 >= 0 )
v5 = (cocos2d::CCPrettyPrinter_vtbl *)&a1[2];
else
v5 = a1[2].__vftable;
if ( v4 >= 0 )
v6 = HIBYTE(a1[4].__vftable);
else
v6 = (std::string::size_type)a1[3].__vftable;
std::string::append((std::string *)&a1[5], (const std::string::value_type *)v5, v6);
std::string::append((std::string *)&a1[5], "\n");
cocos2d::CCPrettyPrinter::setIndentLevel(a1, LODWORD(a1[1].__vftable) + 1);
bzero(__s, 0x3E8u);
if ( a2 )
{
m_pElements = a2->m_pElements;
if ( m_pElements )
{
v8 = 1;
do
{
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
if ( (v8 & 1) == 0 )
std::string::append((std::string *)&a1[5], "\n");
v10 = (cocos2d::CCPrettyPrinter_vtbl *)&a1[2];
if ( SHIBYTE(a1[4].__vftable) < 0 )
v10 = a1[2].__vftable;
sprintf(__s, "%s%s: ", (const char *)v10, m_pElements->m_szKey);
std::string::append((std::string *)&a1[5], __s);
cocos2d::CCPrettyPrinter::CCPrettyPrinter((__int64)v18, (int)a1[1].__vftable);
((void (__fastcall *)(cocos2d::CCObject *, _QWORD *))m_pElements->m_pObject->acceptVisitor)(
m_pElements->m_pObject,
v18);
if ( SHIBYTE(v21) < 0 )
{
sub_1000097D0(__p, (void *)v20, *((unsigned __int64 *)&v20 + 1));
}
else
{
*(_OWORD *)__p = v20;
v17 = v21;
}
if ( v17 >= 0 )
v11 = __p;
else
v11 = (void **)__p[0];
if ( v17 >= 0 )
v12 = HIBYTE(v17);
else
v12 = (std::string::size_type)__p[1];
std::string::append((std::string *)&a1[5], (const std::string::value_type *)v11, v12);
if ( SHIBYTE(v17) < 0 )
operator delete(__p[0]);
v18[0] = &off_1007CE9C8;
if ( SHIBYTE(v21) < 0 )
operator delete((void *)v20);
if ( v19 < 0 )
operator delete((void *)v18[2]);
v8 = 0;
m_pElements = next;
}
while ( next );
}
}
cocos2d::CCPrettyPrinter::setIndentLevel(a1, LODWORD(a1[1].__vftable) - 1);
std::string::append((std::string *)&a1[5], "\n");
v13 = SHIBYTE(a1[4].__vftable);
if ( v13 >= 0 )
v14 = (cocos2d::CCPrettyPrinter_vtbl *)&a1[2];
else
v14 = a1[2].__vftable;
if ( v13 >= 0 )
v15 = HIBYTE(a1[4].__vftable);
else
v15 = (std::string::size_type)a1[3].__vftable;
std::string::append((std::string *)&a1[5], (const std::string::value_type *)v14, v15);
std::string::append((std::string *)&a1[5], "");
}