{"type": "func", "start": 4295148560, "end": 4295148992, "name": "EditorUI::onGoToLayer", "pseudocode": "// \n// EditorUI::onGoToLayer from 0x10002c410 to 0x10002c5c0 (432 bytes)\n// \n// 1 xrefs:\n// > EditorUI::init @ 0x10000af03\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 __fastcall EditorUI::onGoToLayer(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  GameObject *m_selectedObject; // rax\n  int m_currentLayer; // ecx\n  int m_editorLayer; // r13d\n  int m_editorLayer2; // r12d\n  __int16 v6; // ax\n  bool v7; // zf\n  __int16 v8; // cx\n  cocos2d::CCArray *m_selectedObjects; // rbx\n  unsigned int v10; // r14d\n  int v11; // eax\n  cocos2d::CCArray *v12; // rbx\n  unsigned int v13; // r14d\n  int v14; // r15d\n  int v15; // eax\n  int v16; // [rsp+14h] [rbp-2Ch]\n\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n  {\n    m_currentLayer = a1->m_editorLayer->m_currentLayer;\n  }\n  else\n  {\n    if ( !(unsigned int)sub_100720070(a1->m_selectedObjects) )\n      return;\n    m_selectedObject = a1->m_selectedObject;\n    m_currentLayer = a1->m_editorLayer->m_currentLayer;\n    if ( !m_selectedObject )\n    {\n      m_selectedObjects = a1->m_selectedObjects;\n      m_editorLayer2 = 0;\n      if ( m_selectedObjects )\n      {\n        v16 = a1->m_editorLayer->m_currentLayer;\n        if ( !(unsigned int)sub_100720070(m_selectedObjects) )\n          goto LABEL_27;\n        v10 = 0;\n        m_editorLayer = -1;\n        do\n        {\n          v11 = *(__int16 *)(sub_1007200C0(m_selectedObjects, v10) + 1202);\n          if ( m_editorLayer == -1 )\n          {\n            m_editorLayer = v11;\n          }\n          else if ( m_editorLayer != v11 )\n          {\n            goto LABEL_27;\n          }\n          ++v10;\n        }\n        while ( v10 < (unsigned int)sub_100720070(m_selectedObjects) );\n        if ( m_editorLayer == -1 )\nLABEL_27:\n          m_editorLayer = 0;\n        v12 = a1->m_selectedObjects;\n        if ( v12 && (unsigned int)sub_100720070(a1->m_selectedObjects) )\n        {\n          v13 = 0;\n          v14 = -1;\n          do\n          {\n            v15 = *(__int16 *)(sub_1007200C0(v12, v13) + 1204);\n            if ( v14 == -1 )\n            {\n              v14 = v15;\n            }\n            else if ( v14 != v15 )\n            {\n              goto LABEL_38;\n            }\n            ++v13;\n          }\n          while ( v13 < (unsigned int)sub_100720070(v12) );\n          if ( v14 != -1 )\n            m_editorLayer2 = v14;\n        }\nLABEL_38:\n        m_currentLayer = v16;\n      }\n      else\n      {\n        m_editorLayer = 0;\n      }\n      goto LABEL_4;\n    }\n  }\n  m_editorLayer = m_selectedObject->m_editorLayer;\n  m_editorLayer2 = m_selectedObject->m_editorLayer2;\nLABEL_4:\n  v6 = m_editorLayer;\n  if ( m_editorLayer2 )\n    v6 = m_editorLayer2;\n  if ( m_editorLayer )\n    v6 = m_editorLayer;\n  else\n    m_editorLayer2 = 0;\n  v7 = m_editorLayer2 == m_currentLayer;\n  v8 = m_editorLayer2;\n  if ( v7 )\n    v8 = v6;\n  if ( !m_editorLayer2 )\n    v8 = v6;\n  a1->m_editorLayer->m_currentLayer = v8;\n  EditorUI::updateGroupIDLabel(a1);\n}", "assembly": "; \n; EditorUI::onGoToLayer from 0x10002c410 to 0x10002c5c0 (432 bytes)\n; \n; 1 xrefs:\n; > EditorUI::init @ 0x10000af03\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    rbp                                                            ; +0x0, 0x10002c410\nmov     rbp, rsp                                                       ; +0x1, 0x10002c411\npush    r15                                                            ; +0x4, 0x10002c414\npush    r14                                                            ; +0x6, 0x10002c416\npush    r13                                                            ; +0x8, 0x10002c418\npush    r12                                                            ; +0xa, 0x10002c41a\npush    rbx                                                            ; +0xc, 0x10002c41c\nsub     rsp, 18h                                                       ; +0xd, 0x10002c41d\nmov     rax, [rdi+520h]                                                ; +0x11, 0x10002c421\ntest    rax, rax                                                       ; +0x18, 0x10002c428\njz      short loc_10002C490                                            ; +0x1b, 0x10002c42b\nmov     rcx, [rdi+4E8h]                                                ; +0x1d, 0x10002c42d\nmovsx   ecx, word ptr [rcx+364Ah]                                      ; +0x24, 0x10002c434\nmovsx   r13d, word ptr [rax+4B2h]                                      ; +0x2b, 0x10002c43b\nmovsx   r12d, word ptr [rax+4B4h]                                      ; +0x33, 0x10002c443\ntest    r12d, r12d                                                     ; +0x3b, 0x10002c44b\nmov     eax, r13d                                                      ; +0x3e, 0x10002c44e\ncmovnz  eax, r12d                                                      ; +0x41, 0x10002c451\ntest    r13d, r13d                                                     ; +0x45, 0x10002c455\ncmovz   r12d, r13d                                                     ; +0x48, 0x10002c458\ncmovnz  eax, r13d                                                      ; +0x4c, 0x10002c45c\ncmp     r12d, ecx                                                      ; +0x50, 0x10002c460\nmov     ecx, r12d                                                      ; +0x53, 0x10002c463\ncmovz   ecx, eax                                                       ; +0x56, 0x10002c466\ntest    r12d, r12d                                                     ; +0x59, 0x10002c469\nmov     rdx, [rdi+4E8h]                                                ; +0x5c, 0x10002c46c\ncmovz   ecx, eax                                                       ; +0x63, 0x10002c473\nmov     [rdx+364Ah], cx                                                ; +0x66, 0x10002c476\nadd     rsp, 18h                                                       ; +0x6d, 0x10002c47d\npop     rbx                                                            ; +0x71, 0x10002c481\npop     r12                                                            ; +0x72, 0x10002c482\npop     r13                                                            ; +0x74, 0x10002c484\npop     r14                                                            ; +0x76, 0x10002c486\npop     r15                                                            ; +0x78, 0x10002c488\npop     rbp                                                            ; +0x7a, 0x10002c48a\njmp     EditorUI__updateGroupIDLabel                                   ; +0x7b, 0x10002c48b\nmov     [rbp+var_38], rdi                                              ; +0x80, 0x10002c490\nmov     rdi, [rdi+328h]                                                ; +0x84, 0x10002c494\ncall    sub_100720070                                                  ; +0x8b, 0x10002c49b\ntest    eax, eax                                                       ; +0x90, 0x10002c4a0\njz      loc_10002C532                                                  ; +0x92, 0x10002c4a2\nmov     rdi, [rbp+var_38]                                              ; +0x98, 0x10002c4a8\nmov     rcx, [rdi+4E8h]                                                ; +0x9c, 0x10002c4ac\nmov     rax, [rdi+520h]                                                ; +0xa3, 0x10002c4b3\nmovsx   ecx, word ptr [rcx+364Ah]                                      ; +0xaa, 0x10002c4ba\ntest    rax, rax                                                       ; +0xb1, 0x10002c4c1\njnz     loc_10002C43B                                                  ; +0xb4, 0x10002c4c4\nmov     rbx, [rdi+328h]                                                ; +0xba, 0x10002c4ca\nxor     r12d, r12d                                                     ; +0xc1, 0x10002c4d1\ntest    rbx, rbx                                                       ; +0xc4, 0x10002c4d4\njz      short loc_10002C541                                            ; +0xc7, 0x10002c4d7\nmov     [rbp+var_2C], ecx                                              ; +0xc9, 0x10002c4d9\nmov     rdi, rbx                                                       ; +0xcc, 0x10002c4dc\ncall    sub_100720070                                                  ; +0xcf, 0x10002c4df\ntest    eax, eax                                                       ; +0xd4, 0x10002c4e4\njz      short loc_10002C54F                                            ; +0xd6, 0x10002c4e6\nxor     r14d, r14d                                                     ; +0xd8, 0x10002c4e8\nmov     r13d, 0FFFFFFFFh                                               ; +0xdb, 0x10002c4eb\njmp     short loc_10002C513                                            ; +0xe1, 0x10002c4f1\nalign 20h                                                              ; +0xe3, 0x10002c4f3\nmov     r13d, eax                                                      ; +0xf0, 0x10002c500\ninc     r14d                                                           ; +0xf3, 0x10002c503\nmov     rdi, rbx                                                       ; +0xf6, 0x10002c506\ncall    sub_100720070                                                  ; +0xf9, 0x10002c509\ncmp     r14d, eax                                                      ; +0xfe, 0x10002c50e\njnb     short loc_10002C549                                            ; +0x101, 0x10002c511\nmov     rdi, rbx                                                       ; +0x103, 0x10002c513\nmov     esi, r14d                                                      ; +0x106, 0x10002c516\ncall    sub_1007200C0                                                  ; +0x109, 0x10002c519\nmovsx   eax, word ptr [rax+4B2h]                                       ; +0x10e, 0x10002c51e\ncmp     r13d, 0FFFFFFFFh                                               ; +0x115, 0x10002c525\njz      short loc_10002C500                                            ; +0x119, 0x10002c529\ncmp     r13d, eax                                                      ; +0x11b, 0x10002c52b\njz      short loc_10002C503                                            ; +0x11e, 0x10002c52e\njmp     short loc_10002C54F                                            ; +0x120, 0x10002c530\nadd     rsp, 18h                                                       ; +0x122, 0x10002c532\npop     rbx                                                            ; +0x126, 0x10002c536\npop     r12                                                            ; +0x127, 0x10002c537\npop     r13                                                            ; +0x129, 0x10002c539\npop     r14                                                            ; +0x12b, 0x10002c53b\npop     r15                                                            ; +0x12d, 0x10002c53d\npop     rbp                                                            ; +0x12f, 0x10002c53f\nretn                                                                   ; +0x130, 0x10002c540\nxor     r13d, r13d                                                     ; +0x131, 0x10002c541\njmp     loc_10002C44B                                                  ; +0x134, 0x10002c544\ncmp     r13d, 0FFFFFFFFh                                               ; +0x139, 0x10002c549\njnz     short loc_10002C552                                            ; +0x13d, 0x10002c54d\nxor     r13d, r13d                                                     ; +0x13f, 0x10002c54f\nmov     rdi, [rbp+var_38]                                              ; +0x142, 0x10002c552\nmov     rbx, [rdi+328h]                                                ; +0x146, 0x10002c556\ntest    rbx, rbx                                                       ; +0x14d, 0x10002c55d\njz      short loc_10002C5B8                                            ; +0x150, 0x10002c560\nmov     rdi, rbx                                                       ; +0x152, 0x10002c562\ncall    sub_100720070                                                  ; +0x155, 0x10002c565\ntest    eax, eax                                                       ; +0x15a, 0x10002c56a\njz      short loc_10002C5B4                                            ; +0x15c, 0x10002c56c\nxor     r14d, r14d                                                     ; +0x15e, 0x10002c56e\nmov     r15d, 0FFFFFFFFh                                               ; +0x161, 0x10002c571\njmp     short loc_10002C58C                                            ; +0x167, 0x10002c577\nmov     r15d, eax                                                      ; +0x169, 0x10002c579\ninc     r14d                                                           ; +0x16c, 0x10002c57c\nmov     rdi, rbx                                                       ; +0x16f, 0x10002c57f\ncall    sub_100720070                                                  ; +0x172, 0x10002c582\ncmp     r14d, eax                                                      ; +0x177, 0x10002c587\njnb     short loc_10002C5AB                                            ; +0x17a, 0x10002c58a\nmov     rdi, rbx                                                       ; +0x17c, 0x10002c58c\nmov     esi, r14d                                                      ; +0x17f, 0x10002c58f\ncall    sub_1007200C0                                                  ; +0x182, 0x10002c592\nmovsx   eax, word ptr [rax+4B4h]                                       ; +0x187, 0x10002c597\ncmp     r15d, 0FFFFFFFFh                                               ; +0x18e, 0x10002c59e\njz      short loc_10002C579                                            ; +0x192, 0x10002c5a2\ncmp     r15d, eax                                                      ; +0x194, 0x10002c5a4\njz      short loc_10002C57C                                            ; +0x197, 0x10002c5a7\njmp     short loc_10002C5B4                                            ; +0x199, 0x10002c5a9\ncmp     r15d, 0FFFFFFFFh                                               ; +0x19b, 0x10002c5ab\njz      short loc_10002C5B4                                            ; +0x19f, 0x10002c5af\nmov     r12d, r15d                                                     ; +0x1a1, 0x10002c5b1\nmov     rdi, [rbp+var_38]                                              ; +0x1a4, 0x10002c5b4\nmov     ecx, [rbp+var_2C]                                              ; +0x1a8, 0x10002c5b8\njmp     loc_10002C44B                                                  ; +0x1ab, 0x10002c5bb", "xrefs": ["EditorUI::init @ 0x10000af03"], "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"}