{"type": "func", "start": 3674456, "end": 3674626, "name": "EditorUI::onTargetIDChange", "pseudocode": "// \n// EditorUI::onTargetIDChange from 0x381158 to 0x381202 (170 bytes)\n// \n// 1 xrefs:\n// > EditorUI::keyDown @ 0x3a7762\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 EditorUI::onTargetIDChange(EditorUI *a1, int a2)\n{\n  GameObject *m_selectedObject; // r0\n  cocos2d::CCArray *m_selectedObjects; // r4\n  unsigned int i; // r5\n  GameObject *v7; // r0\n  unsigned int j; // r6\n  EffectGameObject *v9; // r5\n  int m_targetGroupID; // r1\n  int v11; // r7\n  cocos2d::CCString *v12; // r0\n  const char *CString; // r0\n\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n    m_selectedObjects = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(\n                                              (cocos2d::CCArray *)m_selectedObject,\n                                              (cocos2d::CCObject *)a2);\n  else\n    m_selectedObjects = a1->m_selectedObjects;\n  if ( cocos2d::CCArray::count(m_selectedObjects) )\n  {\n    for ( i = 0; i < cocos2d::CCArray::count(m_selectedObjects); ++i )\n    {\n      v7 = (GameObject *)cocos2d::CCArray::objectAtIndex(m_selectedObjects, i);\n      if ( !GameObject::isTrigger(v7) )\n        return;\n    }\n    for ( j = 0; j < cocos2d::CCArray::count(m_selectedObjects); ++j )\n    {\n      v9 = (EffectGameObject *)cocos2d::CCArray::objectAtIndex(m_selectedObjects, j);\n      if ( GameObject::isTrigger(v9) )\n      {\n        m_targetGroupID = v9->m_targetGroupID;\n        if ( m_targetGroupID > 0 )\n        {\n          EffectGameObject::setTargetID(v9, m_targetGroupID + a2);\n          v11 = (int)v9->getChildByTag(v9, 999);\n          if ( v11 )\n          {\n            v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                         (cocos2d::CCString *)\"%i\",\n                                         (const char *)v9->m_targetGroupID);\n            CString = cocos2d::CCString::getCString(v12);\n            (*(void (__fastcall **)(int, const char *))(*(_DWORD *)v11 + 456))(v11, CString);\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; EditorUI::onTargetIDChange from 0x381158 to 0x381202 (170 bytes)\n; \n; 1 xrefs:\n; > EditorUI::keyDown @ 0x3a7762\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.W          {R3-R9,LR}                                             ; +0x0, 0x381158\nMOV             R3, R0                                                 ; +0x4, 0x38115c\nLDR.W           R0, [R0,#0x374]; this                                  ; +0x6, 0x38115e\nMOV             R8, R1                                                 ; +0xa, 0x381162\nCBZ             R0, loc_38116E                                         ; +0xc, 0x381164\nBL              _ZN7cocos2d7CCArray16createWithObjectEPNS_8CCObjectE; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0xe, 0x381166\nMOV             R4, R0                                                 ; +0x12, 0x38116a\nB               loc_381172                                             ; +0x14, 0x38116c\nLDR.W           R4, [R3,#0x260]                                        ; +0x16, 0x38116e\nMOV             R0, R4; this                                           ; +0x1a, 0x381172\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1c, 0x381174\nCBNZ            R0, loc_38117E                                         ; +0x20, 0x381178\nPOP.W           {R3-R9,PC}                                             ; +0x22, 0x38117a\nMOVS            R5, #0                                                 ; +0x26, 0x38117e\nMOV             R0, R4; this                                           ; +0x28, 0x381180\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2a, 0x381182\nCMP             R5, R0                                                 ; +0x2e, 0x381186\nBCS             loc_38119C                                             ; +0x30, 0x381188\nMOV             R1, R5; unsigned int                                   ; +0x32, 0x38118a\nMOV             R0, R4; this                                           ; +0x34, 0x38118c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x36, 0x38118e\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x3a, 0x381192\nCBZ             R0, locret_3811FE                                      ; +0x3e, 0x381196\nADDS            R5, #1                                                 ; +0x40, 0x381198\nB               loc_381180                                             ; +0x42, 0x38119a\nLDR.W           R9, =(aI - 0x3811A6); \"%i\"                             ; +0x44, 0x38119c\nMOVS            R6, #0                                                 ; +0x48, 0x3811a0\nADD             R9, PC; \"%i\"                                           ; +0x4a, 0x3811a2\nMOV             R0, R4; this                                           ; +0x4c, 0x3811a4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4e, 0x3811a6\nCMP             R6, R0                                                 ; +0x52, 0x3811aa\nBCS             locret_3811FE                                          ; +0x54, 0x3811ac\nMOV             R0, R4; this                                           ; +0x56, 0x3811ae\nMOV             R1, R6; unsigned int                                   ; +0x58, 0x3811b0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x5a, 0x3811b2\nMOV             R5, R0                                                 ; +0x5e, 0x3811b6\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x60, 0x3811b8\nCBZ             R0, loc_3811FA                                         ; +0x64, 0x3811bc\nLDR.W           R1, [R5,#0x4FC]                                        ; +0x66, 0x3811be\nCMP             R1, #0                                                 ; +0x6a, 0x3811c2\nBLE             loc_3811FA                                             ; +0x6c, 0x3811c4\nMOV             R0, R5; this                                           ; +0x6e, 0x3811c6\nADD             R1, R8; int                                            ; +0x70, 0x3811c8\nBL              _ZN16EffectGameObject11setTargetIDEi; EffectGameObject::setTargetID(int) ; +0x72, 0x3811ca\nLDR             R3, [R5]                                               ; +0x76, 0x3811ce\nMOV             R0, R5                                                 ; +0x78, 0x3811d0\nMOVW            R1, #0x3E7                                             ; +0x7a, 0x3811d2\nLDR.W           R3, [R3,#0xE8]                                         ; +0x7e, 0x3811d6\nBLX             R3                                                     ; +0x82, 0x3811da\nMOV             R7, R0                                                 ; +0x84, 0x3811dc\nCBZ             R0, loc_3811FA                                         ; +0x86, 0x3811de\nLDR.W           R1, [R5,#0x4FC]; char *                                ; +0x88, 0x3811e0\nMOV             R0, R9; this                                           ; +0x8c, 0x3811e4\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x8e, 0x3811e6\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x92, 0x3811ea\nLDR             R3, [R7]                                               ; +0x96, 0x3811ee\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x98, 0x3811f0\nMOV             R1, R0                                                 ; +0x9c, 0x3811f4\nMOV             R0, R7                                                 ; +0x9e, 0x3811f6\nBLX             R3                                                     ; +0xa0, 0x3811f8\nADDS            R6, #1                                                 ; +0xa2, 0x3811fa\nB               loc_3811A4                                             ; +0xa4, 0x3811fc\nPOP.W           {R3-R9,PC}                                             ; +0xa6, 0x3811fe", "xrefs": ["EditorUI::keyDown @ 0x3a7762"], "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"}