{"type": "func", "start": 5372891024, "end": 5372891180, "name": "SetGroupIDLayer::onNextFreeEditorLayer1", "pseudocode": "// \n// SetGroupIDLayer::onNextFreeEditorLayer1 from 0x1403fcf90 to 0x1403fd02c (156 bytes)\n// \n// 2 xrefs:\n// > SetGroupIDLayer::init @ 0x1403f8cdb\n// > <???> @ 0x1406d8558\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::onNextFreeEditorLayer1(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_editorLayerValue = LevelEditorLayer::getNextFreeEditorLayer(*(LevelEditorLayer **)(v4 + 528), &v5);\n  sub_14005D100((__int64)&v5._Vec);\n  sub_14005D870((void **)&v5._List._Mypair._Myval2._Myhead);\n  SetGroupIDLayer::updateEditorLayerID(a1);\n  SetGroupIDLayer::updateEditorLabel(a1);\n}", "assembly": "; \n; SetGroupIDLayer::onNextFreeEditorLayer1 from 0x1403fcf90 to 0x1403fd02c (156 bytes)\n; \n; 2 xrefs:\n; > SetGroupIDLayer::init @ 0x1403f8cdb\n; > <???> @ 0x1406d8558\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, 0x1403fcf90\nsub     rsp, 60h                                                       ; +0x2, 0x1403fcf92\nmov     rbx, rcx                                                       ; +0x6, 0x1403fcf96\nmov     dword ptr [rsp+68h+arg_0], 0                                   ; +0x9, 0x1403fcf99\nlea     rdx, [rsp+68h+arg_0]                                           ; +0x11, 0x1403fcfa1\nlea     rcx, [rsp+68h+var_48]                                          ; +0x16, 0x1403fcfa6\ncall    sub_14005E660                                                  ; +0x1b, 0x1403fcfab\nnop                                                                    ; +0x20, 0x1403fcfb0\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x21, 0x1403fcfb1\ntest    rcx, rcx                                                       ; +0x28, 0x1403fcfb8\njnz     short loc_1403FCFEC                                            ; +0x2b, 0x1403fcfbb\nmov     ecx, 668h; Size                                                ; +0x2d, 0x1403fcfbd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x32, 0x1403fcfc2\nmov     [rsp+68h+arg_0], rax                                           ; +0x37, 0x1403fcfc7\nmov     rcx, rax                                                       ; +0x3c, 0x1403fcfcc\ncall    sub_14017AB00                                                  ; +0x3f, 0x1403fcfcf\nnop                                                                    ; +0x44, 0x1403fcfd4\nmov     cs:qword_1406C2ED8, rax                                        ; +0x45, 0x1403fcfd5\nmov     rdx, [rax]                                                     ; +0x4c, 0x1403fcfdc\nmov     rcx, rax                                                       ; +0x4f, 0x1403fcfdf\ncall    qword ptr [rdx+48h]                                            ; +0x52, 0x1403fcfe2\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x55, 0x1403fcfe5\nlea     rdx, [rsp+68h+var_48]                                          ; +0x5c, 0x1403fcfec\nmov     rcx, [rcx+210h]                                                ; +0x61, 0x1403fcff1\ncall    LevelEditorLayer__getNextFreeEditorLayer                       ; +0x68, 0x1403fcff8\nmov     [rbx+2E8h], eax                                                ; +0x6d, 0x1403fcffd\nlea     rcx, [rsp+68h+var_30]                                          ; +0x73, 0x1403fd003\ncall    sub_14005D100                                                  ; +0x78, 0x1403fd008\nlea     rcx, [rsp+68h+var_40]                                          ; +0x7d, 0x1403fd00d\ncall    sub_14005D870                                                  ; +0x82, 0x1403fd012\nmov     rcx, rbx                                                       ; +0x87, 0x1403fd017\ncall    SetGroupIDLayer__updateEditorLayerID                           ; +0x8a, 0x1403fd01a\nmov     rcx, rbx                                                       ; +0x8f, 0x1403fd01f\nadd     rsp, 60h                                                       ; +0x92, 0x1403fd022\npop     rbx                                                            ; +0x96, 0x1403fd026\njmp     SetGroupIDLayer__updateEditorLabel                             ; +0x97, 0x1403fd027", "xrefs": ["SetGroupIDLayer::init @ 0x1403f8cdb", "<???> @ 0x1406d8558"], "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"}