{"type": "func", "start": 5372891184, "end": 5372891340, "name": "SetGroupIDLayer::onNextFreeEditorLayer2", "pseudocode": "// \n// SetGroupIDLayer::onNextFreeEditorLayer2 from 0x1403fd030 to 0x1403fd0cc (156 bytes)\n// \n// 2 xrefs:\n// > SetGroupIDLayer::init @ 0x1403f8d83\n// > <???> @ 0x1406d8564\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 SetGroupIDLayer::onNextFreeEditorLayer2(SetGroupIDLayer *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // r8\n  __int64 v4; // rcx\n  std::unordered_set<int> v5; // [rsp+20h] [rbp-48h] BYREF\n  void *v6; // [rsp+70h] [rbp+8h] BYREF\n\n  LODWORD(v6) = 0;\n  sub_14005E660((__int64)&v5, &v6, v2);\n  v4 = qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v6 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00((__int64)v6);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v4 = qword_1406C2ED8;\n  }\n  a1->m_editorLayer2Value = LevelEditorLayer::getNextFreeEditorLayer(*(LevelEditorLayer **)(v4 + 528), &v5);\n  sub_14005D100((__int64)&v5._Vec);\n  sub_14005D870((void **)&v5._List._Mypair._Myval2._Myhead);\n  SetGroupIDLayer::updateEditorLayerID2(a1);\n  SetGroupIDLayer::updateEditorLabel2(a1);\n}", "assembly": "; \n; SetGroupIDLayer::onNextFreeEditorLayer2 from 0x1403fd030 to 0x1403fd0cc (156 bytes)\n; \n; 2 xrefs:\n; > SetGroupIDLayer::init @ 0x1403f8d83\n; > <???> @ 0x1406d8564\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    rbx                                                            ; +0x0, 0x1403fd030\nsub     rsp, 60h                                                       ; +0x2, 0x1403fd032\nmov     rbx, rcx                                                       ; +0x6, 0x1403fd036\nmov     dword ptr [rsp+68h+arg_0], 0                                   ; +0x9, 0x1403fd039\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x11, 0x1403fd041\nlea     rcx, [rsp+68h+var_48]                                          ; +0x16, 0x1403fd046\ncall    sub_14005E660                                                  ; +0x1b, 0x1403fd04b\nnop                                                                    ; +0x20, 0x1403fd050\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x21, 0x1403fd051\ntest    rcx, rcx                                                       ; +0x28, 0x1403fd058\njnz     short loc_1403FD08C                                            ; +0x2b, 0x1403fd05b\nmov     ecx, 668h; Size                                                ; +0x2d, 0x1403fd05d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x32, 0x1403fd062\nmov     [rsp+68h+arg_0], rax                                           ; +0x37, 0x1403fd067\nmov     rcx, rax                                                       ; +0x3c, 0x1403fd06c\ncall    sub_14017AB00                                                  ; +0x3f, 0x1403fd06f\nnop                                                                    ; +0x44, 0x1403fd074\nmov     cs:qword_1406C2ED8, rax                                        ; +0x45, 0x1403fd075\nmov     rdx, [rax]                                                     ; +0x4c, 0x1403fd07c\nmov     rcx, rax                                                       ; +0x4f, 0x1403fd07f\ncall    qword ptr [rdx+48h]                                            ; +0x52, 0x1403fd082\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x55, 0x1403fd085\nlea     rdx, [rsp+68h+var_48]                                          ; +0x5c, 0x1403fd08c\nmov     rcx, [rcx+210h]                                                ; +0x61, 0x1403fd091\ncall    LevelEditorLayer__getNextFreeEditorLayer                       ; +0x68, 0x1403fd098\nmov     [rbx+2ECh], eax                                                ; +0x6d, 0x1403fd09d\nlea     rcx, [rsp+68h+var_30]                                          ; +0x73, 0x1403fd0a3\ncall    sub_14005D100                                                  ; +0x78, 0x1403fd0a8\nlea     rcx, [rsp+68h+var_40]                                          ; +0x7d, 0x1403fd0ad\ncall    sub_14005D870                                                  ; +0x82, 0x1403fd0b2\nmov     rcx, rbx                                                       ; +0x87, 0x1403fd0b7\ncall    SetGroupIDLayer__updateEditorLayerID2                          ; +0x8a, 0x1403fd0ba\nmov     rcx, rbx                                                       ; +0x8f, 0x1403fd0bf\nadd     rsp, 60h                                                       ; +0x92, 0x1403fd0c2\npop     rbx                                                            ; +0x96, 0x1403fd0c6\njmp     SetGroupIDLayer__updateEditorLabel2                            ; +0x97, 0x1403fd0c7", "xrefs": ["SetGroupIDLayer::init @ 0x1403f8d83", "<???> @ 0x1406d8564"], "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"}