// // sub_100667780 from 0x100667780 to 0x10066783b (187 bytes) // // 2 xrefs: // > cocos2d::CCNode::addChild @ 0x100272f9c // > cocos2d::CCNode::insertChild @ 0x10027308d // // 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 // __int64 __fastcall sub_100667780(unsigned int *a1, cocos2d::CCObject *a2) { unsigned int v4; // esi void *v5; // rax __int64 v6; // rsi __int64 v7; // rax __int64 v8; // rcx __int64 v9; // rdx int v10; // esi __int64 v11; // rdi __int64 v12; // rcx __int64 result; // rax v4 = a1[1]; if ( v4 < *a1 + 1 ) { v5 = *((void **)a1 + 2); do { v6 = 2 * v4; a1[1] = v6; v5 = realloc(v5, 8 * v6); *((_QWORD *)a1 + 2) = v5; v4 = a1[1]; } while ( v4 < *a1 + 1 ); } v7 = a1[2]; if ( v7 != 0xFFFFFFFFLL ) { if ( (int)v7 > 0 ) { v8 = *((_QWORD *)a1 + 2); v9 = 0; v10 = 0; do { v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) { if ( v10 > 0 ) { *(_QWORD *)(v8 - 8LL * v10 + 8 * v9) = v11; *(_DWORD *)(v11 + 36) = v9 - v10; } } else { ++v10; } ++v9; } while ( v7 != v9 ); } a1[2] = -1; } cocos2d::CCObject::retain(a2); v12 = *a1; *(_QWORD *)(*((_QWORD *)a1 + 2) + 8 * v12) = a2; a2->m_uUnknown = v12; result = (unsigned int)(v12 + 1); *a1 = result; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source