{"type": "func", "start": 4736344, "end": 4736514, "name": "EditorUI::onTargetIDChange", "pseudocode": "// \n// EditorUI::onTargetIDChange from 0x484558 to 0x484602 (170 bytes)\n// \n// 2 xrefs:\n// > EditorUI::handleEditorAction @ 0x6f2120\n// > EditorUI::handleEditorAction @ 0x6f2132\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:49:24 +0000\n// \n\nunsigned int __fastcall EditorUI::onTargetIDChange(EditorUI *this, cocos2d::CCObject *a2)\n{\n  cocos2d::CCArray *v3; // r0\n  cocos2d::CCArray *v5; // r4\n  unsigned int result; // r0\n  unsigned int i; // r5\n  GameObject *v8; // r0\n  unsigned int j; // r6\n  const char **v10; // r5\n  int v11; // r1\n  int v12; // r7\n  cocos2d::CCString *v13; // r0\n  int CString; // r0\n\n  v3 = *((cocos2d::CCArray **)this + 249);\n  if ( v3 )\n    v5 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(v3, a2);\n  else\n    v5 = *((cocos2d::CCArray **)this + 167);\n  result = cocos2d::CCArray::count(v5);\n  if ( result )\n  {\n    for ( i = 0; i < cocos2d::CCArray::count(v5); ++i )\n    {\n      v8 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, i);\n      result = GameObject::isTrigger(v8);\n      if ( !result )\n        return result;\n    }\n    for ( j = 0; ; ++j )\n    {\n      result = cocos2d::CCArray::count(v5);\n      if ( j >= result )\n        break;\n      v10 = (const char **)cocos2d::CCArray::objectAtIndex(v5, j);\n      if ( GameObject::isTrigger((GameObject *)v10) )\n      {\n        v11 = (int)v10[321];\n        if ( v11 > 0 )\n        {\n          EffectGameObject::setTargetID((EffectGameObject *)v10, (int)a2 + v11);\n          v12 = (*((int (__fastcall **)(const char **, int))*v10 + 60))(v10, 999);\n          if ( v12 )\n          {\n            v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", v10[321]);\n            CString = cocos2d::CCString::getCString(v13);\n            (*(void (__fastcall **)(int, int))(*(_DWORD *)v12 + 464))(v12, CString);\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::onTargetIDChange from 0x484558 to 0x484602 (170 bytes)\n; \n; 2 xrefs:\n; > EditorUI::handleEditorAction @ 0x6f2120\n; > EditorUI::handleEditorAction @ 0x6f2132\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:49:24 +0000\n; \nPUSH.W          {R3-R9,LR}                                             ; +0x0, 0x484558\nMOV             R3, R0                                                 ; +0x4, 0x48455c\nLDR.W           R0, [R0,#0x3E4]; this                                  ; +0x6, 0x48455e\nMOV             R8, R1                                                 ; +0xa, 0x484562\nCBZ             R0, loc_48456E                                         ; +0xc, 0x484564\nBL              _ZN7cocos2d7CCArray16createWithObjectEPNS_8CCObjectE; cocos2d::CCArray::createWithObject(cocos2d::CCObject *) ; +0xe, 0x484566\nMOV             R4, R0                                                 ; +0x12, 0x48456a\nB               loc_484572                                             ; +0x14, 0x48456c\nLDR.W           R4, [R3,#0x29C]                                        ; +0x16, 0x48456e\nMOV             R0, R4; this                                           ; +0x1a, 0x484572\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1c, 0x484574\nCBNZ            R0, loc_48457E                                         ; +0x20, 0x484578\nPOP.W           {R3-R9,PC}                                             ; +0x22, 0x48457a\nMOVS            R5, #0                                                 ; +0x26, 0x48457e\nMOV             R0, R4; this                                           ; +0x28, 0x484580\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x2a, 0x484582\nCMP             R5, R0                                                 ; +0x2e, 0x484586\nBCS             loc_48459C                                             ; +0x30, 0x484588\nMOV             R1, R5; unsigned int                                   ; +0x32, 0x48458a\nMOV             R0, R4; this                                           ; +0x34, 0x48458c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x36, 0x48458e\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x3a, 0x484592\nCBZ             R0, locret_4845FE                                      ; +0x3e, 0x484596\nADDS            R5, #1                                                 ; +0x40, 0x484598\nB               loc_484580                                             ; +0x42, 0x48459a\nLDR.W           R9, =(aI - 0x4845A6); \"%i\"                             ; +0x44, 0x48459c\nMOVS            R6, #0                                                 ; +0x48, 0x4845a0\nADD             R9, PC; \"%i\"                                           ; +0x4a, 0x4845a2\nMOV             R0, R4; this                                           ; +0x4c, 0x4845a4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x4e, 0x4845a6\nCMP             R6, R0                                                 ; +0x52, 0x4845aa\nBCS             locret_4845FE                                          ; +0x54, 0x4845ac\nMOV             R0, R4; this                                           ; +0x56, 0x4845ae\nMOV             R1, R6; unsigned int                                   ; +0x58, 0x4845b0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x5a, 0x4845b2\nMOV             R5, R0                                                 ; +0x5e, 0x4845b6\nBL              _ZN10GameObject9isTriggerEv; GameObject::isTrigger(void) ; +0x60, 0x4845b8\nCBZ             R0, loc_4845FA                                         ; +0x64, 0x4845bc\nLDR.W           R1, [R5,#0x504]                                        ; +0x66, 0x4845be\nCMP             R1, #0                                                 ; +0x6a, 0x4845c2\nBLE             loc_4845FA                                             ; +0x6c, 0x4845c4\nMOV             R0, R5; this                                           ; +0x6e, 0x4845c6\nADD             R1, R8; int                                            ; +0x70, 0x4845c8\nBL              _ZN16EffectGameObject11setTargetIDEi; EffectGameObject::setTargetID(int) ; +0x72, 0x4845ca\nLDR             R3, [R5]                                               ; +0x76, 0x4845ce\nMOV             R0, R5                                                 ; +0x78, 0x4845d0\nMOVW            R1, #0x3E7                                             ; +0x7a, 0x4845d2\nLDR.W           R3, [R3,#0xF0]                                         ; +0x7e, 0x4845d6\nBLX             R3                                                     ; +0x82, 0x4845da\nMOV             R7, R0                                                 ; +0x84, 0x4845dc\nCBZ             R0, loc_4845FA                                         ; +0x86, 0x4845de\nLDR.W           R1, [R5,#0x504]; char *                                ; +0x88, 0x4845e0\nMOV             R0, R9; this                                           ; +0x8c, 0x4845e4\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x8e, 0x4845e6\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x92, 0x4845ea\nLDR             R3, [R7]                                               ; +0x96, 0x4845ee\nLDR.W           R3, [R3,#0x1D0]                                        ; +0x98, 0x4845f0\nMOV             R1, R0                                                 ; +0x9c, 0x4845f4\nMOV             R0, R7                                                 ; +0x9e, 0x4845f6\nBLX             R3                                                     ; +0xa0, 0x4845f8\nADDS            R6, #1                                                 ; +0xa2, 0x4845fa\nB               loc_4845A4                                             ; +0xa4, 0x4845fc\nPOP.W           {R3-R9,PC}                                             ; +0xa6, 0x4845fe", "xrefs": ["EditorUI::handleEditorAction @ 0x6f2120", "EditorUI::handleEditorAction @ 0x6f2132"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}