{"type": "func", "start": 5373262304, "end": 5373262443, "name": "SetupSmartBlockLayer::onReferenceOnly", "pseudocode": "// \n// SetupSmartBlockLayer::onReferenceOnly from 0x1404579e0 to 0x140457a6b (139 bytes)\n// \n// 4 xrefs:\n// > SetupSmartBlockLayer::init @ 0x14045741a\n// > <???> @ 0x1406a3678\n// > <???> @ 0x1406a3688\n// > <???> @ 0x1406da9b8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid SetupSmartBlockLayer::onReferenceOnly(SetupSmartBlockLayer *a1, cocos2d::CCObject *a2)\n{\n  bool v3; // cl\n  SmartGameObject *m_gameObject; // rax\n  cocos2d::CCArray *m_gameObjects; // rcx\n  unsigned int v6; // edi\n  struct cocos2d::CCObject *v7; // rax\n\n  v3 = !a1->m_referenceOnly;\n  a1->m_referenceOnly = v3;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_referenceOnly = v3;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects )\n    {\n      v6 = 0;\n      if ( cocos2d::CCArray::count(m_gameObjects) )\n      {\n        do\n        {\n          v7 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v6++);\n          LOBYTE(v7[24].m_nTag) = a1->m_referenceOnly;\n        }\n        while ( v6 < cocos2d::CCArray::count(a1->m_gameObjects) );\n      }\n    }\n  }\n}", "assembly": "; \n; SetupSmartBlockLayer::onReferenceOnly from 0x1404579e0 to 0x140457a6b (139 bytes)\n; \n; 4 xrefs:\n; > SetupSmartBlockLayer::init @ 0x14045741a\n; > <???> @ 0x1406a3678\n; > <???> @ 0x1406a3688\n; > <???> @ 0x1406da9b8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rbx                                                            ; +0x0, 0x1404579e0\nsub     rsp, 20h                                                       ; +0x2, 0x1404579e2\ncmp     byte ptr [rcx+288h], 0                                         ; +0x6, 0x1404579e6\nmov     rbx, rcx                                                       ; +0xd, 0x1404579ed\nsetz    al                                                             ; +0x10, 0x1404579f0\nmovzx   ecx, al                                                        ; +0x13, 0x1404579f3\nmov     [rbx+288h], al                                                 ; +0x16, 0x1404579f6\nmov     rax, [rbx+298h]                                                ; +0x1c, 0x1404579fc\ntest    rax, rax                                                       ; +0x23, 0x140457a03\njz      short loc_140457A14                                            ; +0x26, 0x140457a06\nmov     [rax+550h], cl                                                 ; +0x28, 0x140457a08\nadd     rsp, 20h                                                       ; +0x2e, 0x140457a0e\npop     rbx                                                            ; +0x32, 0x140457a12\nretn                                                                   ; +0x33, 0x140457a13\nmov     rcx, [rbx+2A0h]                                                ; +0x34, 0x140457a14\ntest    rcx, rcx                                                       ; +0x3b, 0x140457a1b\njz      short loc_140457A65                                            ; +0x3e, 0x140457a1e\nmov     [rsp+28h+arg_0], rdi                                           ; +0x40, 0x140457a20\nxor     edi, edi                                                       ; +0x45, 0x140457a25\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x47, 0x140457a27\ntest    eax, eax                                                       ; +0x4d, 0x140457a2d\njz      short loc_140457A60                                            ; +0x4f, 0x140457a2f\nmov     rcx, [rbx+2A0h]                                                ; +0x51, 0x140457a31\nmov     edx, edi                                                       ; +0x58, 0x140457a38\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x5a, 0x140457a3a\nmovzx   ecx, byte ptr [rbx+288h]                                       ; +0x60, 0x140457a40\ninc     edi                                                            ; +0x67, 0x140457a47\nmov     [rax+550h], cl                                                 ; +0x69, 0x140457a49\nmov     rcx, [rbx+2A0h]                                                ; +0x6f, 0x140457a4f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x76, 0x140457a56\ncmp     edi, eax                                                       ; +0x7c, 0x140457a5c\njb      short loc_140457A31                                            ; +0x7e, 0x140457a5e\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x80, 0x140457a60\nadd     rsp, 20h                                                       ; +0x85, 0x140457a65\npop     rbx                                                            ; +0x89, 0x140457a69\nretn                                                                   ; +0x8a, 0x140457a6a", "xrefs": ["SetupSmartBlockLayer::init @ 0x14045741a", "<???> @ 0x1406a3678", "<???> @ 0x1406a3688", "<???> @ 0x1406da9b8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}