{"type": "func", "start": 5373262784, "end": 5373262893, "name": "SetupSmartBlockLayer::onNearbyReference", "pseudocode": "// \n// SetupSmartBlockLayer::onNearbyReference from 0x140457bc0 to 0x140457c2d (109 bytes)\n// \n// 2 xrefs:\n// > SetupSmartBlockLayer::init @ 0x1404578ab\n// > <???> @ 0x1406da9f4\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\n// Hidden C++ exception states: #wind=1\nvoid SetupSmartBlockLayer::onNearbyReference(SetupSmartBlockLayer *a1, cocos2d::CCObject *a2)\n{\n  GameManager *v3; // rcx\n  void *v4; // [rsp+30h] [rbp+8h]\n\n  a1->m_useNearby = !a1->m_useNearby;\n  v3 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v4 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v4);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = (GameManager *)qword_1406C2ED8;\n  }\n  GameManager::setGameVariable(v3, \"0131\", a1->m_useNearby);\n}", "assembly": "; \n; SetupSmartBlockLayer::onNearbyReference from 0x140457bc0 to 0x140457c2d (109 bytes)\n; \n; 2 xrefs:\n; > SetupSmartBlockLayer::init @ 0x1404578ab\n; > <???> @ 0x1406da9f4\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, 0x140457bc0\nsub     rsp, 20h                                                       ; +0x2, 0x140457bc2\nmov     rbx, rcx                                                       ; +0x6, 0x140457bc6\ncmp     byte ptr [rcx+28Ch], 0                                         ; +0x9, 0x140457bc9\nsetz    al                                                             ; +0x10, 0x140457bd0\nmov     [rcx+28Ch], al                                                 ; +0x13, 0x140457bd3\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x19, 0x140457bd9\ntest    rcx, rcx                                                       ; +0x20, 0x140457be0\njnz     short loc_140457C14                                            ; +0x23, 0x140457be3\nmov     ecx, 668h; Size                                                ; +0x25, 0x140457be5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2a, 0x140457bea\nmov     [rsp+28h+arg_0], rax                                           ; +0x2f, 0x140457bef\nmov     rcx, rax                                                       ; +0x34, 0x140457bf4\ncall    sub_14017AB00                                                  ; +0x37, 0x140457bf7\nnop                                                                    ; +0x3c, 0x140457bfc\nmov     cs:qword_1406C2ED8, rax                                        ; +0x3d, 0x140457bfd\nmov     rdx, [rax]                                                     ; +0x44, 0x140457c04\nmov     rcx, rax                                                       ; +0x47, 0x140457c07\ncall    qword ptr [rdx+48h]                                            ; +0x4a, 0x140457c0a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x4d, 0x140457c0d\nmovzx   r8d, byte ptr [rbx+28Ch]                                       ; +0x54, 0x140457c14\nlea     rdx, a0131; \"0131\"                                             ; +0x5c, 0x140457c1c\nadd     rsp, 20h                                                       ; +0x63, 0x140457c23\npop     rbx                                                            ; +0x67, 0x140457c27\njmp     GameManager__setGameVariable                                   ; +0x68, 0x140457c28", "xrefs": ["SetupSmartBlockLayer::init @ 0x1404578ab", "<???> @ 0x1406da9f4"], "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"}