// // cocos2d::CCPrettyPrinter::visit_1 from 0x1004b5b10 to 0x1004b5f1e (1038 bytes) // // 1 xrefs: // > @ 0x10094ac90 // // 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) { unsigned int v2; // edx cocos2d::CCPrettyPrinter_vtbl *v3; // rsi cocos2d::CCPrettyPrinter_vtbl *v4; // rdx int v5; // r12d bool v6; // zf std::string *v7; // r14 int i; // r13d void *m_pElements; // rbx char v10; // al const char *v11; // rdx int v12; // eax int v13; // r12d const std::string::value_type *v14; // rsi std::string::size_type v15; // rdx int v16; // r12d int v17; // r14d unsigned int v18; // edx const std::string::value_type *v19; // rsi cocos2d::CCPrettyPrinter_vtbl *v20; // rdx __int64 (__fastcall **v21)(); // [rsp+0h] [rbp-4A0h] BYREF int v22; // [rsp+8h] [rbp-498h] std::string v23[2]; // [rsp+10h] [rbp-490h] BYREF std::string::value_type v24[16]; // [rsp+40h] [rbp-460h] BYREF void *__p; // [rsp+50h] [rbp-450h] const cocos2d::CCDictionary *v26; // [rsp+60h] [rbp-440h] std::string *v27; // [rsp+68h] [rbp-438h] std::string::value_type *v28; // [rsp+70h] [rbp-430h] std::string *v29; // [rsp+78h] [rbp-428h] std::string::value_type __s[1008]; // [rsp+80h] [rbp-420h] BYREF v26 = a2; v29 = (std::string *)&a1[5]; std::string::append((std::string *)&a1[5], "\n"); v2 = LOBYTE(a1[2].__vftable); v3 = (cocos2d::CCPrettyPrinter_vtbl *)((char *)&a1[2].__vftable + 1); v28 = (char *)&a1[2].__vftable + 1; if ( (v2 & 1) != 0 ) { v3 = a1[4].__vftable; v4 = a1[3].__vftable; } else { v4 = (cocos2d::CCPrettyPrinter_vtbl *)(v2 >> 1); } std::string::append(v29, (const std::string::value_type *)v3, (std::string::size_type)v4); std::string::append(v29, "\n"); v5 = LODWORD(a1[1].__vftable) + 1; LODWORD(a1[1].__vftable) = v5; v6 = ((__int64)a1[2].__vftable & 1) == 0; v27 = (std::string *)&a1[2]; if ( v6 ) { *v28 = 0; LOBYTE(a1[2].__vftable) = 0; v7 = v27; if ( v5 <= 0 ) goto LABEL_10; } else { LOBYTE(a1[4].~CCPrettyPrinter) = 0; a1[3].__vftable = nullptr; v5 = (int)a1[1].__vftable; v7 = v27; if ( v5 <= 0 ) goto LABEL_10; } for ( i = 0; i < v5; ++i ) { std::string::append(v7, "\t"); v5 = (int)a1[1].__vftable; } LABEL_10: __bzero(__s, 1000); if ( v26 ) { m_pElements = v26->m_pElements; if ( m_pElements ) { v10 = 1; while ( 1 ) { v26 = *((const cocos2d::CCDictionary **)m_pElements + 36); if ( (v10 & 1) == 0 ) std::string::append(v29, "\n"); v11 = v28; if ( (*(_BYTE *)&v27->__r_.__value_.__s.0 & 1) != 0 ) v11 = (const char *)a1[4].__vftable; sprintf(__s, "%s%s: ", v11, (const char *)m_pElements); std::string::append(v29, __s); v12 = (int)a1[1].__vftable; v21 = &off_10094AC48; memset(v23, 0, sizeof(v23)); v22 = v12; if ( v12 > 0 ) { v13 = 0; do { std::string::append(v23, "\t"); ++v13; } while ( v13 < v22 ); } (*(void (__fastcall **)(_QWORD, __int64 (__fastcall ***)()))(**((_QWORD **)m_pElements + 33) + 32LL))( *((_QWORD *)m_pElements + 33), &v21); if ( (*(_BYTE *)&v23[1].__r_.__value_.__s.0 & 1) != 0 ) { sub_100006B70(v24, v23[1].__r_.__value_.__l.__data_, v23[1].__r_.__value_.__l.__size_, 0.0); } else { __p = v23[1].__r_.__value_.__l.__data_; *(_OWORD *)v24 = *(_OWORD *)&v23[1].__r_.__value_.__l.0; } if ( (v24[0] & 1) != 0 ) { v14 = (const std::string::value_type *)__p; v15 = *(_QWORD *)&v24[8]; } else { v15 = (unsigned __int8)v24[0] >> 1; v14 = &v24[1]; } std::string::append(v29, v14, v15); if ( (v24[0] & 1) != 0 ) { operator delete(__p); v21 = &off_10094AC48; if ( (*(_BYTE *)&v23[1].__r_.__value_.__s.0 & 1) == 0 ) { LABEL_29: if ( (*(_BYTE *)&v23[0].__r_.__value_.__s.0 & 1) != 0 ) goto LABEL_33; goto LABEL_13; } } else { v21 = &off_10094AC48; if ( (*(_BYTE *)&v23[1].__r_.__value_.__s.0 & 1) == 0 ) goto LABEL_29; } operator delete(v23[1].__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v23[0].__r_.__value_.__s.0 & 1) != 0 ) LABEL_33: operator delete(v23[0].__r_.__value_.__l.__data_); LABEL_13: v10 = 0; m_pElements = (void *)v26; if ( !v26 ) { v5 = (int)a1[1].__vftable; break; } } } } v16 = v5 - 1; LODWORD(a1[1].__vftable) = v16; if ( ((__int64)a1[2].__vftable & 1) != 0 ) { LOBYTE(a1[4].~CCPrettyPrinter) = 0; a1[3].__vftable = nullptr; if ( SLODWORD(a1[1].__vftable) <= 0 ) goto LABEL_41; LABEL_39: v17 = 0; do { std::string::append(v27, "\t"); ++v17; } while ( v17 < SLODWORD(a1[1].__vftable) ); goto LABEL_41; } *v28 = 0; v27->__r_.__value_.__s.0 = 0; if ( v16 > 0 ) goto LABEL_39; LABEL_41: std::string::append(v29, "\n"); v18 = LOBYTE(a1[2].__vftable); if ( (v18 & 1) != 0 ) { v19 = (const std::string::value_type *)a1[4].__vftable; v20 = a1[3].__vftable; } else { v20 = (cocos2d::CCPrettyPrinter_vtbl *)(v18 >> 1); v19 = v28; } std::string::append(v29, v19, (std::string::size_type)v20); std::string::append(v29, ""); }
GD Web Decomp Icon

GD Web Decomp

Raw Source