{"type": "func", "start": 8152608, "end": 8152920, "name": "EditorUI::onTargetIDChange", "pseudocode": "// \n// EditorUI::onTargetIDChange from 0x7c6620 to 0x7c6758 (312 bytes)\n// \n// 3 xrefs:\n// > EditorUI::handleEditorAction @ 0xbd7e38\n// > EditorUI::handleEditorAction @ 0xbd7e50\n// > <???> @ 0xaf288\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:54:08 +0000\n// \n\n__int64 __fastcall EditorUI::onTargetIDChange(EditorUI *this, int a2)\n{\n  cocos2d::CCObject *v3; // x1\n  cocos2d::CCArray *v4; // x20\n  unsigned int v5; // w19\n  __int64 result; // x0\n  GameObject *v7; // x0\n  bool v8; // cf\n  unsigned int v9; // w1\n  unsigned int v10; // w19\n  unsigned int v11; // w1\n  GameObject *v12; // x21\n  int v13; // w2\n  __int64 v14; // x22\n  cocos2d::CCString *v15; // x0\n  __int64 CString; // x0\n\n  v3 = *((cocos2d::CCObject **)this + 187);\n  if ( v3 )\n    v4 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(*((cocos2d::CCArray **)this + 187), v3);\n  else\n    v4 = *((cocos2d::CCArray **)this + 112);\n  v5 = 0;\n  result = cocos2d::CCArray::count(v4);\n  if ( (_DWORD)result )\n  {\n    while ( 1 )\n    {\n      v8 = v5 >= (unsigned int)cocos2d::CCArray::count(v4);\n      v9 = v5++;\n      if ( v8 )\n        break;\n      v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(v4, v9);\n      result = GameObject::isTrigger(v7);\n      if ( !(_BYTE)result )\n        return result;\n    }\n    v10 = 0;\n    while ( 1 )\n    {\n      v8 = v10 >= (unsigned int)cocos2d::CCArray::count(v4);\n      v11 = v10;\n      result = (__int64)v4;\n      ++v10;\n      if ( v8 )\n        break;\n      while ( 1 )\n      {\n        v12 = (GameObject *)cocos2d::CCArray::objectAtIndex((cocos2d::CCArray *)result, v11);\n        if ( !GameObject::isTrigger(v12) )\n          break;\n        v13 = *((_DWORD *)v12 + 366);\n        if ( v13 <= 0 )\n          break;\n        EffectGameObject::setTargetID(v12, v13 + a2);\n        v14 = (*(__int64 (__fastcall **)(GameObject *, __int64))(*(_QWORD *)v12 + 480LL))(v12, 999);\n        if ( !v14 )\n          break;\n        v15 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                     (cocos2d::CCString *)\"%i\",\n                                     (const char *)*((unsigned int *)v12 + 366));\n        CString = cocos2d::CCString::getCString(v15);\n        (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v14 + 928LL))(v14, CString);\n        v8 = v10 >= (unsigned int)cocos2d::CCArray::count(v4);\n        v11 = v10;\n        result = (__int64)v4;\n        ++v10;\n        if ( v8 )\n          return result;\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::onTargetIDChange from 0x7c6620 to 0x7c6758 (312 bytes)\n; \n; 3 xrefs:\n; > EditorUI::handleEditorAction @ 0xbd7e38\n; > EditorUI::handleEditorAction @ 0xbd7e50\n; > <???> @ 0xaf288\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:54:08 +0000\n; \nSTP             X29, X30, [SP,#-0x40+var_s0]!                          ; +0x0, 0x7c6620\nMOV             X29, SP                                                ; +0x4, 0x7c6624\nSTP             X23, X24, [SP,#var_s30]                                ; +0x8, 0x7c6628\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x7c662c\nSTP             X21, X22, [SP,#var_s20]                                ; +0x10, 0x7c6630\nMOV             W23, W1                                                ; +0x14, 0x7c6634\nLDR             X1, [X0,#0x5D8]; cocos2d::CCObject *                   ; +0x18, 0x7c6638\nCBZ             X1, loc_7C6750                                         ; +0x1c, 0x7c663c\nMOV             X0, X1; this                                           ; +0x20, 0x7c6640\nBL              _ZN7cocos2d7CCArray16createWithObjectEPNS_8CCObjectE; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0x24, 0x7c6644\nMOV             X20, X0                                                ; +0x28, 0x7c6648\nMOV             X0, X20; this                                          ; +0x2c, 0x7c664c\nMOV             W19, #0                                                ; +0x30, 0x7c6650\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x34, 0x7c6654\nCBNZ            W0, loc_7C6670                                         ; +0x38, 0x7c6658\nB               loc_7C673C                                             ; +0x3c, 0x7c665c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x40, 0x7c6660\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x44, 0x7c6664\nUXTB            W0, W0                                                 ; +0x48, 0x7c6668\nCBZ             W0, loc_7C673C                                         ; +0x4c, 0x7c666c\nMOV             X0, X20; this                                          ; +0x50, 0x7c6670\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x54, 0x7c6674\nCMP             W19, W0                                                ; +0x58, 0x7c6678\nMOV             W1, W19; unsigned int                                  ; +0x5c, 0x7c667c\nMOV             X0, X20; this                                          ; +0x60, 0x7c6680\nADD             W19, W19, #1                                           ; +0x64, 0x7c6684\nB.CC            loc_7C6660                                             ; +0x68, 0x7c6688\nADRP            X24, #(aSongidI+8)@PAGE; \"%i\"                          ; +0x6c, 0x7c668c\nMOV             W19, #0                                                ; +0x70, 0x7c6690\nADD             X24, X24, #(aSongidI+8)@PAGEOFF; \"%i\"                  ; +0x74, 0x7c6694\nMOV             X0, X20; this                                          ; +0x78, 0x7c6698\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x7c, 0x7c669c\nCMP             W19, W0                                                ; +0x80, 0x7c66a0\nMOV             W1, W19; unsigned int                                  ; +0x84, 0x7c66a4\nMOV             X0, X20; this                                          ; +0x88, 0x7c66a8\nADD             W19, W19, #1                                           ; +0x8c, 0x7c66ac\nB.CS            loc_7C673C                                             ; +0x90, 0x7c66b0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x94, 0x7c66b4\nMOV             X21, X0                                                ; +0x98, 0x7c66b8\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x9c, 0x7c66bc\nUXTB            W0, W0                                                 ; +0xa0, 0x7c66c0\nCBZ             W0, loc_7C6698                                         ; +0xa4, 0x7c66c4\nLDR             W2, [X21,#0x5B8]                                       ; +0xa8, 0x7c66c8\nMOV             X0, X21; this                                          ; +0xac, 0x7c66cc\nCMP             W2, WZR                                                ; +0xb0, 0x7c66d0\nADD             W1, W2, W23; int                                       ; +0xb4, 0x7c66d4\nB.LE            loc_7C6698                                             ; +0xb8, 0x7c66d8\nBL              _ZN16EffectGameObject11setTargetIDEi; EffectGameObject::setTargetID(int) ; +0xbc, 0x7c66dc\nLDR             X2, [X21]                                              ; +0xc0, 0x7c66e0\nMOV             W1, #0x3E7                                             ; +0xc4, 0x7c66e4\nMOV             X0, X21                                                ; +0xc8, 0x7c66e8\nLDR             X2, [X2,#0x1E0]                                        ; +0xcc, 0x7c66ec\nBLR             X2                                                     ; +0xd0, 0x7c66f0\nMOV             X22, X0                                                ; +0xd4, 0x7c66f4\nMOV             X0, X24; this                                          ; +0xd8, 0x7c66f8\nCBZ             X22, loc_7C6698                                        ; +0xdc, 0x7c66fc\nLDR             W1, [X21,#0x5B8]; char *                               ; +0xe0, 0x7c6700\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0xe4, 0x7c6704\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0xe8, 0x7c6708\nMOV             X1, X0                                                 ; +0xec, 0x7c670c\nLDR             X2, [X22]                                              ; +0xf0, 0x7c6710\nMOV             X0, X22                                                ; +0xf4, 0x7c6714\nLDR             X2, [X2,#0x3A0]                                        ; +0xf8, 0x7c6718\nBLR             X2                                                     ; +0xfc, 0x7c671c\nMOV             X0, X20; this                                          ; +0x100, 0x7c6720\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x104, 0x7c6724\nCMP             W19, W0                                                ; +0x108, 0x7c6728\nMOV             W1, W19                                                ; +0x10c, 0x7c672c\nMOV             X0, X20                                                ; +0x110, 0x7c6730\nADD             W19, W19, #1                                           ; +0x114, 0x7c6734\nB.CC            loc_7C66B4                                             ; +0x118, 0x7c6738\nLDP             X19, X20, [SP,#var_s10]                                ; +0x11c, 0x7c673c\nLDP             X21, X22, [SP,#var_s20]                                ; +0x120, 0x7c6740\nLDP             X23, X24, [SP,#var_s30]                                ; +0x124, 0x7c6744\nLDP             X29, X30, [SP+var_s0],#0x40                            ; +0x128, 0x7c6748\nRET                                                                    ; +0x12c, 0x7c674c\nLDR             X20, [X0,#0x380]                                       ; +0x130, 0x7c6750\nB               loc_7C664C                                             ; +0x134, 0x7c6754", "xrefs": ["EditorUI::handleEditorAction @ 0xbd7e38", "EditorUI::handleEditorAction @ 0xbd7e50", "<???> @ 0xaf288"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}