{"type": "func", "start": 4740956, "end": 4741114, "name": "EditorUI::editGroup", "pseudocode": "// \n// EditorUI::editGroup from 0x48575c to 0x4857fa (158 bytes)\n// \n// 1 xrefs:\n// > EditorUI::handleEditorAction @ 0x6f23e4\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:25 +0000\n// \n\nint __fastcall EditorUI::editGroup(EditorUI *this, cocos2d::CCObject *a2)\n{\n  int result; // r0\n  EditorBuildStats *v4; // r0\n  EditorSFXManager *v5; // r0\n  EditorSFXManager *v6; // r0\n  cocos2d::CCArray *v7; // r2\n  int *v8; // r0\n  int *v9; // r6\n  int NextFreeGroupID; // r7\n  int v11; // r3\n  _DWORD v12[5]; // [sp+0h] [bp-1Ch] BYREF\n\n  if ( *((_DWORD *)this + 249) || (result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 167))) != 0 )\n  {\n    v4 = (EditorBuildStats *)(*((_DWORD *)this + 236) + 12104);\n    *((_DWORD *)v4 + 4) = *(_DWORD *)(*((_DWORD *)this + 236) + 12120) + 1;\n    v5 = (EditorSFXManager *)EditorBuildStats::noteAction(v4);\n    v6 = (EditorSFXManager *)EditorSFXManager::sharedState(v5);\n    EditorSFXManager::playAction(v6, 108, 107);\n    v8 = (int *)SetGroupIDLayer::create(*((SetGroupIDLayer **)this + 249), *((GameObject **)this + 167), v7);\n    memset(v12, 0, 16);\n    v12[4] = 1065353216;\n    v9 = v8;\n    NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(*((LevelEditorLayer **)this + 236), (int)v12);\n    std::__hash_table<int,std::hash<int>,std::equal_to<int>,std::allocator<int>>::~__hash_table((int)v12);\n    v11 = *v9;\n    v9[155] = NextFreeGroupID;\n    return (*(int (__fastcall **)(int *))(v11 + 656))(v9);\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::editGroup from 0x48575c to 0x4857fa (158 bytes)\n; \n; 1 xrefs:\n; > EditorUI::handleEditorAction @ 0x6f23e4\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:25 +0000\n; \nLDR             R2, =(__stack_chk_guard_ptr - 0x485764)                ; +0x0, 0x48575c\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x48575e\nADD             R2, PC; __stack_chk_guard_ptr                          ; +0x4, 0x485760\nLDR             R2, [R2]; __stack_chk_guard                            ; +0x6, 0x485762\nSUB             SP, SP, #0x1C                                          ; +0x8, 0x485764\nMOV             R4, R0                                                 ; +0xa, 0x485766\nLDR             R3, [R2]                                               ; +0xc, 0x485768\nMOV             R5, R2                                                 ; +0xe, 0x48576a\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x10, 0x48576c\nLDR.W           R3, [R0,#0x3E4]                                        ; +0x12, 0x48576e\nCBNZ            R3, loc_48577E                                         ; +0x16, 0x485772\nLDR.W           R0, [R0,#0x29C]; this                                  ; +0x18, 0x485774\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1c, 0x485778\nCBZ             R0, loc_4857EA                                         ; +0x20, 0x48577c\nLDR.W           R0, [R4,#0x3B0]                                        ; +0x22, 0x48577e\nADD.W           R0, R0, #0x2F40                                        ; +0x26, 0x485782\nADDS            R0, #8; this                                           ; +0x2a, 0x485786\nLDR             R3, [R0,#0x10]                                         ; +0x2c, 0x485788\nADDS            R3, #1                                                 ; +0x2e, 0x48578a\nSTR             R3, [R0,#0x10]                                         ; +0x30, 0x48578c\nBL              _ZN16EditorBuildStats10noteActionEv; EditorBuildStats::noteAction(void) ; +0x32, 0x48578e\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x36, 0x485792\nMOVS            R1, #0x6C ; 'l'; int                                   ; +0x3a, 0x485796\nMOVS            R2, #0x6B ; 'k'; int                                   ; +0x3c, 0x485798\nBL              _ZN16EditorSFXManager10playActionEii; EditorSFXManager::playAction(int,int) ; +0x3e, 0x48579a\nLDR.W           R1, [R4,#0x29C]; GameObject *                          ; +0x42, 0x48579e\nLDR.W           R0, [R4,#0x3E4]; this                                  ; +0x46, 0x4857a2\nBL              _ZN15SetGroupIDLayer6createEP10GameObjectPN7cocos2d7CCArrayE; SetGroupIDLayer::create(GameObject *,cocos2d::CCArray *) ; +0x4a, 0x4857a6\nMOV             R1, SP                                                 ; +0x4e, 0x4857aa\nMOVS            R3, #0                                                 ; +0x50, 0x4857ac\nSTR             R3, [SP,#0x1C+var_1C]                                  ; +0x52, 0x4857ae\nSTR             R3, [SP,#0x1C+var_18]                                  ; +0x54, 0x4857b0\nSTR             R3, [SP,#0x1C+var_14]                                  ; +0x56, 0x4857b2\nSTR             R3, [SP,#0x1C+var_10]                                  ; +0x58, 0x4857b4\nMOV.W           R3, #0x3F800000                                        ; +0x5a, 0x4857b6\nSTR             R3, [SP,#0x1C+var_C]                                   ; +0x5e, 0x4857ba\nMOV             R6, R0                                                 ; +0x60, 0x4857bc\nLDR.W           R0, [R4,#0x3B0]                                        ; +0x62, 0x4857be\nMOV             R4, SP                                                 ; +0x66, 0x4857c2\nBL              _ZN16LevelEditorLayer18getNextFreeGroupIDERKNSt6__ndk113unordered_setIiNS0_4hashIiEENS0_8equal_toIiEENS0_9allocatorIiEEEE; LevelEditorLayer::getNextFreeGroupID(std::unordered_set<int> const&) ; +0x68, 0x4857c4\nMOV             R7, R0                                                 ; +0x6c, 0x4857c8\nMOV             R0, SP                                                 ; +0x6e, 0x4857ca\nBL              _ZNSt6__ndk112__hash_tableIiNS_4hashIiEENS_8equal_toIiEENS_9allocatorIiEEED2Ev; std::__hash_table<int,std::hash<int>,std::equal_to<int>,std::allocator<int>>::~__hash_table() ; +0x70, 0x4857cc\nLDR             R3, [R6]                                               ; +0x74, 0x4857d0\nSTR.W           R7, [R6,#0x26C]                                        ; +0x76, 0x4857d2\nMOV             R0, R6                                                 ; +0x7a, 0x4857d6\nLDR.W           R3, [R3,#0x290]                                        ; +0x7c, 0x4857d8\nBLX             R3                                                     ; +0x80, 0x4857dc\nB               loc_4857EA                                             ; +0x82, 0x4857de\nMOV             R0, R4                                                 ; +0x84, 0x4857e0\nBL              _ZNSt6__ndk112__hash_tableIiNS_4hashIiEENS_8equal_toIiEENS_9allocatorIiEEED2Ev; std::__hash_table<int,std::hash<int>,std::equal_to<int>,std::allocator<int>>::~__hash_table() ; +0x86, 0x4857e2\nBL              __cxa_end_cleanup                                      ; +0x8a, 0x4857e6\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0x8e, 0x4857ea\nLDR             R3, [R5]                                               ; +0x90, 0x4857ec\nCMP             R2, R3                                                 ; +0x92, 0x4857ee\nBEQ             loc_4857F6                                             ; +0x94, 0x4857f0\nBLX             __stack_chk_fail                                       ; +0x96, 0x4857f2\nADD             SP, SP, #0x1C                                          ; +0x9a, 0x4857f6\nPOP             {R4-R7,PC}                                             ; +0x9c, 0x4857f8", "xrefs": ["EditorUI::handleEditorAction @ 0x6f23e4"], "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"}