//
// cocos2d::CCPrettyPrinter::visit from 0xd47e0c to 0xd48094 (648 bytes)
//
// 2 xrefs:
// > ??> @ 0xeabf8
// > ??> @ 0x1516680
//
// This function is hookable on this platform (idp: arm, 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 13:07:36 +0000
//
__int64 __fastcall cocos2d::CCPrettyPrinter::visit(cocos2d::CCPrettyPrinter *this, const cocos2d::CCSet *a2)
{
char *v3; // x21
_BYTE *v5; // x24
char *v6; // x1
size_t v7; // x2
int v8; // w23
__int64 v9; // x28
char *v10; // x1
_QWORD *v11; // x0
char *v12; // x1
size_t v13; // x2
__int64 v15; // x1
__int64 v16; // x1
__int64 v17[2]; // [xsp+60h] [xbp+60h] BYREF
void *v18; // [xsp+70h] [xbp+70h]
_QWORD v19[2]; // [xsp+78h] [xbp+78h] BYREF
char v20; // [xsp+88h] [xbp+88h]
void *v21; // [xsp+98h] [xbp+98h]
char v22; // [xsp+A0h] [xbp+A0h]
void *v23; // [xsp+B0h] [xbp+B0h]
v3 = (char *)this + 40;
v5 = (char *)this + 16;
std::string::append((__int64)this + 40, &byte_11AAA48);
if ( (*((_BYTE *)this + 16) & 1) != 0 )
{
v6 = *((char **)this + 4);
v7 = *((_QWORD *)this + 3);
}
else
{
v6 = (char *)this + 17;
v7 = *((_BYTE *)this + 16) >> 1;
}
v8 = 0;
std::string::append((__int64)v3, v6, v7);
std::string::append((__int64)v3, "\n");
cocos2d::CCPrettyPrinter::setIndentLevel(this, *((_DWORD *)this + 2) + 1);
v9 = cocos2d::CCSet::begin(a2);
while ( v9 != cocos2d::CCSet::end(a2) )
{
if ( v8 )
std::string::append((__int64)v3, &byte_11AAA48);
v10 = (char *)this + 17;
if ( (*v5 & 1) != 0 )
v10 = *((char **)this + 4);
std::string::append((__int64)v3, v10);
cocos2d::CCPrettyPrinter::CCPrettyPrinter((cocos2d::CCPrettyPrinter *)v19, *((_DWORD *)this + 2));
(*(void (__fastcall **)(_QWORD, _QWORD *))(**(_QWORD **)(v9 + 32) + 32LL))(*(_QWORD *)(v9 + 32), v19);
cocos2d::CCPrettyPrinter::getResult((cocos2d::CCPrettyPrinter *)v19, v17);
if ( (v17[0] & 1) != 0 )
{
std::string::append((__int64)v3, v18, v17[1]);
if ( (v17[0] & 1) == 0 )
goto LABEL_10;
}
else
{
std::string::append((__int64)v3, (char *)v17 + 1, LOBYTE(v17[0]) >> 1);
if ( (v17[0] & 1) == 0 )
{
LABEL_10:
v19[0] = off_1516630;
if ( (v22 & 1) == 0 )
goto LABEL_11;
goto LABEL_23;
}
}
operator delete(v18);
v19[0] = off_1516630;
if ( (v22 & 1) == 0 )
{
LABEL_11:
if ( (v20 & 1) != 0 )
goto LABEL_24;
goto LABEL_12;
}
LABEL_23:
operator delete(v23);
if ( (v20 & 1) != 0 )
LABEL_24:
operator delete(v21);
LABEL_12:
v11 = *(_QWORD **)(v9 + 8);
if ( v11 )
{
do
{
v9 = (__int64)v11;
v11 = (_QWORD *)*v11;
}
while ( v11 );
}
else
{
do
{
v15 = v9;
v9 = *(_QWORD *)(v9 + 16);
if ( v15 == *(_QWORD *)v9 )
break;
v16 = v9;
v9 = *(_QWORD *)(v9 + 16);
}
while ( v16 != *(_QWORD *)v9 );
}
++v8;
}
cocos2d::CCPrettyPrinter::setIndentLevel(this, *((_DWORD *)this + 2) - 1);
std::string::append((__int64)v3, &byte_11AAA48);
if ( (*((_BYTE *)this + 16) & 1) != 0 )
{
v12 = *((char **)this + 4);
v13 = *((_QWORD *)this + 3);
}
else
{
v12 = (char *)this + 17;
v13 = *((_BYTE *)this + 16) >> 1;
}
std::string::append((__int64)v3, v12, v13);
std::string::append((__int64)v3, "\n");
return _stack_chk_guard;
}