{"type": "func", "start": 3662832, "end": 3663206, "name": "EditorUI::replaceGroupID", "pseudocode": "// \n// EditorUI::replaceGroupID from 0x37e3f0 to 0x37e566 (374 bytes)\n// \n// 1 xrefs:\n// > EditorUI::dynamicGroupUpdate @ 0x3a6316\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::replaceGroupID(EditorUI *a1, GameObject *a2, int a3, int a4)\n{\n  int i; // r7\n  float b; // r8\n  float ty; // r3\n  bool v10; // zf\n  int m_objectID; // r3\n  cocos2d::CCNode *v12; // r0\n  cocos2d::CCNode *v13; // r7\n  const char *v14; // r0\n  int v15; // r0\n  float v16; // r1\n  int v17; // r3\n  float m_fTextureLeft; // r3\n  float m_fTextureRight; // r3\n  float m_fTextureBottom; // r3\n  cocos2d::CCString *v21; // r0\n  const char *CString; // r0\n\n  for ( i = 0; i < a2->m_groupCount; ++i )\n  {\n    if ( GameObject::getGroupID(a2, i) == a3 )\n    {\n      a2->removeFromGroup(a2, a3);\n      a2->addToGroup(a2, a4);\n      break;\n    }\n  }\n  if ( a2->m_classType == Effect )\n  {\n    b = a2[1].m_sAdditionalTransform.b;\n    if ( LODWORD(b) == a3 )\n      EffectGameObject::setTargetID((EffectGameObject *)a2, a4);\n    if ( LODWORD(a2[1].m_sAdditionalTransform.c) == a3 )\n      EffectGameObject::setTargetID2((EffectGameObject *)a2, a4);\n    ty = a2[1].m_transformToBatch.ty;\n    if ( a2[1].m_pobTexture == (cocos2d::CCTexture2D *)a3 )\n      a2[1].m_pobTexture = (cocos2d::CCTexture2D *)a4;\n    v10 = LODWORD(ty) == a3;\n    m_objectID = a2->m_objectID;\n    if ( v10 )\n      LODWORD(a2[1].m_transformToBatch.ty) = a4;\n    if ( m_objectID != 1615 && m_objectID != 899 )\n    {\n      v12 = a2->getChildByTag(a2, 999);\n      v13 = v12;\n      if ( v12 )\n      {\n        v14 = (const char *)((int (__fastcall *)(cocos2d::CCNode *))v12->__vftable[1].encodeWithCoder)(v12);\n        v15 = atoi(v14);\n        v16 = a2[1].m_sAdditionalTransform.b;\n        if ( v15 == LODWORD(b) && LODWORD(v16) != LODWORD(b) )\n        {\n          v21 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                       (cocos2d::CCString *)\"%i\",\n                                       (const char *)LODWORD(v16));\n          CString = cocos2d::CCString::getCString(v21);\n          v13->__vftable[1].acceptVisitor(v13, (cocos2d::CCDataVisitor *)CString);\n        }\n      }\n    }\n    v17 = a2->m_objectID;\n    if ( v17 == 1268 )\n    {\n      SpawnTriggerGameObject::changeRemap((SpawnTriggerGameObject *)a2, a3, a4, 0);\n      SpawnTriggerGameObject::changeRemap((SpawnTriggerGameObject *)a2, a3, a4, 1);\n    }\n    else if ( v17 > 1268 )\n    {\n      if ( v17 == 2068 )\n      {\n        ChanceTriggerGameObject::editChanceObject((ChanceTriggerGameObject *)a2, a3, a4);\n      }\n      else if ( v17 == 2903 )\n      {\n        m_fTextureLeft = a2[1].m_fTextureLeft;\n        if ( LODWORD(a2[1].m_fBrVertexMod) == a3 )\n          LODWORD(a2[1].m_fBrVertexMod) = a4;\n        v10 = LODWORD(m_fTextureLeft) == a3;\n        m_fTextureRight = a2[1].m_fTextureRight;\n        if ( v10 )\n          LODWORD(a2[1].m_fTextureLeft) = a4;\n        v10 = LODWORD(m_fTextureRight) == a3;\n        m_fTextureBottom = a2[1].m_fTextureBottom;\n        if ( v10 )\n          LODWORD(a2[1].m_fTextureRight) = a4;\n        if ( LODWORD(m_fTextureBottom) == a3 )\n          LODWORD(a2[1].m_fTextureBottom) = a4;\n      }\n    }\n    else if ( v17 == 901 && LODWORD(a2[1].m_sInverse.ty) == a3 )\n    {\n      LODWORD(a2[1].m_sInverse.ty) = a4;\n    }\n  }\n}", "assembly": "; \n; EditorUI::replaceGroupID from 0x37e3f0 to 0x37e566 (374 bytes)\n; \n; 1 xrefs:\n; > EditorUI::dynamicGroupUpdate @ 0x3a6316\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          {R4-R8,LR}                                             ; +0x0, 0x37e3f0\nMOV             R4, R1                                                 ; +0x4, 0x37e3f4\nMOV             R5, R2                                                 ; +0x6, 0x37e3f6\nMOV             R6, R3                                                 ; +0x8, 0x37e3f8\nMOVS            R7, #0                                                 ; +0xa, 0x37e3fa\nLDRSH.W         R3, [R4,#0x3F4]                                        ; +0xc, 0x37e3fc\nCMP             R7, R3                                                 ; +0x10, 0x37e400\nBGE             loc_37E42C                                             ; +0x12, 0x37e402\nMOV             R0, R4; this                                           ; +0x14, 0x37e404\nMOV             R1, R7; int                                            ; +0x16, 0x37e406\nBL              _ZN10GameObject10getGroupIDEi; GameObject::getGroupID(int) ; +0x18, 0x37e408\nCMP             R0, R5                                                 ; +0x1c, 0x37e40c\nBEQ             loc_37E414                                             ; +0x1e, 0x37e40e\nADDS            R7, #1                                                 ; +0x20, 0x37e410\nB               loc_37E3FC                                             ; +0x22, 0x37e412\nLDR             R3, [R4]                                               ; +0x24, 0x37e414\nMOV             R0, R4                                                 ; +0x26, 0x37e416\nMOV             R1, R5                                                 ; +0x28, 0x37e418\nLDR.W           R3, [R3,#0x31C]                                        ; +0x2a, 0x37e41a\nBLX             R3                                                     ; +0x2e, 0x37e41e\nLDR             R3, [R4]                                               ; +0x30, 0x37e420\nMOV             R0, R4                                                 ; +0x32, 0x37e422\nMOV             R1, R6                                                 ; +0x34, 0x37e424\nLDR.W           R3, [R3,#0x318]                                        ; +0x36, 0x37e426\nBLX             R3                                                     ; +0x3a, 0x37e42a\nLDR.W           R3, [R4,#0x434]                                        ; +0x3c, 0x37e42c\nCMP             R3, #1                                                 ; +0x40, 0x37e430\nBNE.W           locret_37E562                                          ; +0x42, 0x37e432\nLDR.W           R8, [R4,#0x4FC]                                        ; +0x46, 0x37e436\nCMP             R8, R5                                                 ; +0x4a, 0x37e43a\nBNE             loc_37E446                                             ; +0x4c, 0x37e43c\nMOV             R0, R4; this                                           ; +0x4e, 0x37e43e\nMOV             R1, R6; int                                            ; +0x50, 0x37e440\nBL              _ZN16EffectGameObject11setTargetIDEi; EffectGameObject::setTargetID(int) ; +0x52, 0x37e442\nLDR.W           R3, [R4,#0x500]                                        ; +0x56, 0x37e446\nCMP             R3, R5                                                 ; +0x5a, 0x37e44a\nBNE             loc_37E456                                             ; +0x5c, 0x37e44c\nMOV             R0, R4; this                                           ; +0x5e, 0x37e44e\nMOV             R1, R6; int                                            ; +0x60, 0x37e450\nBL              _ZN16EffectGameObject12setTargetID2Ei; EffectGameObject::setTargetID2(int) ; +0x62, 0x37e452\nLDR.W           R3, [R4,#0x5D4]                                        ; +0x66, 0x37e456\nMOVW            R2, #0x64F                                             ; +0x6a, 0x37e45a\nCMP             R3, R5                                                 ; +0x6e, 0x37e45e\nLDR.W           R3, [R4,#0x5C8]                                        ; +0x70, 0x37e460\nIT EQ                                                                  ; +0x74, 0x37e464\nSTREQ.W         R6, [R4,#0x5D4]                                        ; +0x76, 0x37e466\nCMP             R3, R5                                                 ; +0x7a, 0x37e46a\nLDR.W           R3, [R4,#0x374]                                        ; +0x7c, 0x37e46c\nIT EQ                                                                  ; +0x80, 0x37e470\nSTREQ.W         R6, [R4,#0x5C8]                                        ; +0x82, 0x37e472\nCMP             R3, R2                                                 ; +0x86, 0x37e476\nBEQ             loc_37E4A8                                             ; +0x88, 0x37e478\nMOVW            R2, #0x383                                             ; +0x8a, 0x37e47a\nCMP             R3, R2                                                 ; +0x8e, 0x37e47e\nBEQ             loc_37E4A8                                             ; +0x90, 0x37e480\nLDR             R3, [R4]                                               ; +0x92, 0x37e482\nMOV             R0, R4                                                 ; +0x94, 0x37e484\nMOVW            R1, #0x3E7                                             ; +0x96, 0x37e486\nLDR.W           R3, [R3,#0xE8]                                         ; +0x9a, 0x37e48a\nBLX             R3                                                     ; +0x9e, 0x37e48e\nMOV             R7, R0                                                 ; +0xa0, 0x37e490\nCBZ             R0, loc_37E4A8                                         ; +0xa2, 0x37e492\nLDR             R3, [R7]                                               ; +0xa4, 0x37e494\nLDR.W           R3, [R3,#0x1D0]                                        ; +0xa6, 0x37e496\nBLX             R3                                                     ; +0xaa, 0x37e49a\nBLX             atoi                                                   ; +0xac, 0x37e49c\nLDR.W           R1, [R4,#0x4FC]; char *                                ; +0xb0, 0x37e4a0\nCMP             R0, R8                                                 ; +0xb4, 0x37e4a4\nBEQ             loc_37E544                                             ; +0xb6, 0x37e4a6\nLDR.W           R3, [R4,#0x374]                                        ; +0xb8, 0x37e4a8\nMOVW            R2, #0x4F4                                             ; +0xbc, 0x37e4ac\nCMP             R3, R2                                                 ; +0xc0, 0x37e4b0\nBEQ             loc_37E4E6                                             ; +0xc2, 0x37e4b2\nBGT             loc_37E4C2                                             ; +0xc4, 0x37e4b4\nMOVW            R2, #0x385                                             ; +0xc6, 0x37e4b6\nCMP             R3, R2                                                 ; +0xca, 0x37e4ba\nBEQ             loc_37E4D6                                             ; +0xcc, 0x37e4bc\nPOP.W           {R4-R8,PC}                                             ; +0xce, 0x37e4be\nMOVW            R2, #0x814                                             ; +0xd2, 0x37e4c2\nCMP             R3, R2                                                 ; +0xd6, 0x37e4c6\nBEQ             loc_37E502                                             ; +0xd8, 0x37e4c8\nMOVW            R2, #0xB57                                             ; +0xda, 0x37e4ca\nCMP             R3, R2                                                 ; +0xde, 0x37e4ce\nBEQ             loc_37E510                                             ; +0xe0, 0x37e4d0\nPOP.W           {R4-R8,PC}                                             ; +0xe2, 0x37e4d2\nLDR.W           R3, [R4,#0x53C]                                        ; +0xe6, 0x37e4d6\nCMP             R3, R5                                                 ; +0xea, 0x37e4da\nBNE             locret_37E562                                          ; +0xec, 0x37e4dc\nSTR.W           R6, [R4,#0x53C]                                        ; +0xee, 0x37e4de\nPOP.W           {R4-R8,PC}                                             ; +0xf2, 0x37e4e2\nMOV             R0, R4; this                                           ; +0xf6, 0x37e4e6\nMOV             R1, R5; int                                            ; +0xf8, 0x37e4e8\nMOV             R2, R6; int                                            ; +0xfa, 0x37e4ea\nMOVS            R3, #0; bool                                           ; +0xfc, 0x37e4ec\nBL              _ZN22SpawnTriggerGameObject11changeRemapEiib; SpawnTriggerGameObject::changeRemap(int,int,bool) ; +0xfe, 0x37e4ee\nMOV             R0, R4; this                                           ; +0x102, 0x37e4f2\nMOV             R1, R5; int                                            ; +0x104, 0x37e4f4\nMOV             R2, R6; int                                            ; +0x106, 0x37e4f6\nMOVS            R3, #1; bool                                           ; +0x108, 0x37e4f8\nPOP.W           {R4-R8,LR}                                             ; +0x10a, 0x37e4fa\nB.W             _ZN22SpawnTriggerGameObject11changeRemapEiib; SpawnTriggerGameObject::changeRemap(int,int,bool) ; +0x10e, 0x37e4fe\nMOV             R0, R4; this                                           ; +0x112, 0x37e502\nMOV             R1, R5; int                                            ; +0x114, 0x37e504\nMOV             R2, R6; int                                            ; +0x116, 0x37e506\nPOP.W           {R4-R8,LR}                                             ; +0x118, 0x37e508\nB.W             _ZN23ChanceTriggerGameObject16editChanceObjectEii; ChanceTriggerGameObject::editChanceObject(int,int) ; +0x11c, 0x37e50c\nLDR.W           R3, [R4,#0x670]                                        ; +0x120, 0x37e510\nCMP             R3, R5                                                 ; +0x124, 0x37e514\nLDR.W           R3, [R4,#0x674]                                        ; +0x126, 0x37e516\nIT EQ                                                                  ; +0x12a, 0x37e51a\nSTREQ.W         R6, [R4,#0x670]                                        ; +0x12c, 0x37e51c\nCMP             R3, R5                                                 ; +0x130, 0x37e520\nLDR.W           R3, [R4,#0x678]                                        ; +0x132, 0x37e522\nIT EQ                                                                  ; +0x136, 0x37e526\nSTREQ.W         R6, [R4,#0x674]                                        ; +0x138, 0x37e528\nCMP             R3, R5                                                 ; +0x13c, 0x37e52c\nLDR.W           R3, [R4,#0x67C]                                        ; +0x13e, 0x37e52e\nIT EQ                                                                  ; +0x142, 0x37e532\nSTREQ.W         R6, [R4,#0x678]                                        ; +0x144, 0x37e534\nCMP             R3, R5                                                 ; +0x148, 0x37e538\nBNE             locret_37E562                                          ; +0x14a, 0x37e53a\nSTR.W           R6, [R4,#0x67C]                                        ; +0x14c, 0x37e53c\nPOP.W           {R4-R8,PC}                                             ; +0x150, 0x37e540\nCMP             R1, R8                                                 ; +0x154, 0x37e544\nBEQ             loc_37E4A8                                             ; +0x156, 0x37e546\nLDR             R0, =(aI - 0x37E54E); \"%i\"                             ; +0x158, 0x37e548\nADD             R0, PC; \"%i\"                                           ; +0x15a, 0x37e54a\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x15c, 0x37e54c\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x160, 0x37e550\nLDR             R3, [R7]                                               ; +0x164, 0x37e554\nLDR.W           R3, [R3,#0x1C8]                                        ; +0x166, 0x37e556\nMOV             R1, R0                                                 ; +0x16a, 0x37e55a\nMOV             R0, R7                                                 ; +0x16c, 0x37e55c\nBLX             R3                                                     ; +0x16e, 0x37e55e\nB               loc_37E4A8                                             ; +0x170, 0x37e560\nPOP.W           {R4-R8,PC}                                             ; +0x172, 0x37e562", "xrefs": ["EditorUI::dynamicGroupUpdate @ 0x3a6316"], "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"}