{"type": "func", "start": 5370500080, "end": 5370500435, "name": "EditorUI::onGoToLayer", "pseudocode": "// \n// EditorUI::onGoToLayer from 0x1401b53f0 to 0x1401b5553 (355 bytes)\n// \n// 5 xrefs:\n// > EditorUI::handleEditorAction @ 0x1401c37d9\n// > EditorUI::init @ 0x1401abb5a\n// > <???> @ 0x1408a1b40\n// > <???> @ 0x1408a1b78\n// > <???> @ 0x14091a198\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:27:57 +0000\n// \n\nunsigned int __fastcall EditorUI::onGoToLayer(__int64 a1)\n{\n  unsigned int result; // eax\n  int v3; // r12d\n  __int64 v4; // rax\n  int v5; // ebx\n  int v6; // edi\n  cocos2d::CCArray *v7; // r14\n  int v8; // esi\n  unsigned int v9; // ebp\n  int v10; // ecx\n  cocos2d::CCArray *v11; // r14\n  unsigned int v12; // ebp\n  int v13; // ecx\n\n  if ( *(_QWORD *)(a1 + 1568) || (result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944))) != 0 )\n  {\n    v3 = *(__int16 *)(*(_QWORD *)(a1 + 1512) + 14866LL);\n    v4 = *(_QWORD *)(a1 + 1568);\n    if ( v4 )\n    {\n      v5 = *(__int16 *)(v4 + 1210);\n      v6 = *(__int16 *)(v4 + 1212);\n    }\n    else\n    {\n      v7 = *(cocos2d::CCArray **)(a1 + 944);\n      v6 = 0;\n      v8 = -1;\n      if ( !v7 )\n        goto LABEL_12;\n      v5 = -1;\n      v9 = 0;\n      if ( !cocos2d::CCArray::count(v7) )\n        goto LABEL_12;\n      do\n      {\n        v10 = *((__int16 *)cocos2d::CCArray::objectAtIndex(v7, v9) + 605);\n        if ( v5 == -1 )\n        {\n          v5 = v10;\n        }\n        else if ( v5 != v10 )\n        {\n          goto LABEL_12;\n        }\n        ++v9;\n      }\n      while ( v9 < cocos2d::CCArray::count(v7) );\n      if ( v5 == -1 )\nLABEL_12:\n        v5 = 0;\n      v11 = *(cocos2d::CCArray **)(a1 + 944);\n      if ( v11 )\n      {\n        v12 = 0;\n        if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )\n        {\n          do\n          {\n            v13 = *((__int16 *)cocos2d::CCArray::objectAtIndex(v11, v12) + 606);\n            if ( v8 == -1 )\n            {\n              v8 = v13;\n            }\n            else if ( v8 != v13 )\n            {\n              goto LABEL_21;\n            }\n            ++v12;\n          }\n          while ( v12 < cocos2d::CCArray::count(v11) );\n          if ( v8 != -1 )\n            v6 = v8;\n        }\n      }\n    }\nLABEL_21:\n    if ( v6 )\n    {\n      if ( v5 )\n      {\n        if ( v3 != v6 )\n        {\nLABEL_26:\n          *(_WORD *)(*(_QWORD *)(a1 + 1512) + 14866LL) = v6;\n          return EditorUI::updateGroupIDLabel(a1);\n        }\n      }\n      else\n      {\n        LOWORD(v5) = v6;\n      }\n    }\n    LOWORD(v6) = v5;\n    goto LABEL_26;\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::onGoToLayer from 0x1401b53f0 to 0x1401b5553 (355 bytes)\n; \n; 5 xrefs:\n; > EditorUI::handleEditorAction @ 0x1401c37d9\n; > EditorUI::init @ 0x1401abb5a\n; > <???> @ 0x1408a1b40\n; > <???> @ 0x1408a1b78\n; > <???> @ 0x14091a198\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:27:57 +0000\n; \npush    r14                                                            ; +0x0, 0x1401b53f0\npush    r15                                                            ; +0x2, 0x1401b53f2\nsub     rsp, 28h                                                       ; +0x4, 0x1401b53f4\ncmp     qword ptr [rcx+620h], 0                                        ; +0x8, 0x1401b53f8\nmov     r15, rcx                                                       ; +0x10, 0x1401b5400\njnz     short loc_1401B541A                                            ; +0x13, 0x1401b5403\nmov     rcx, [rcx+3B0h]                                                ; +0x15, 0x1401b5405\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1c, 0x1401b540c\ntest    eax, eax                                                       ; +0x22, 0x1401b5412\njz      loc_1401B554A                                                  ; +0x24, 0x1401b5414\nmov     rax, [r15+5E8h]                                                ; +0x2a, 0x1401b541a\nmov     [rsp+38h+arg_0], rbx                                           ; +0x31, 0x1401b5421\nmov     [rsp+38h+arg_18], rdi                                          ; +0x36, 0x1401b5426\nmov     [rsp+38h+var_18], r12                                          ; +0x3b, 0x1401b542b\nmovsx   r12d, word ptr [rax+3A12h]                                     ; +0x40, 0x1401b5430\nmov     rax, [r15+620h]                                                ; +0x48, 0x1401b5438\ntest    rax, rax                                                       ; +0x4f, 0x1401b543f\njz      short loc_1401B5457                                            ; +0x52, 0x1401b5442\nmovsx   ebx, word ptr [rax+4BAh]                                       ; +0x54, 0x1401b5444\nmovsx   edi, word ptr [rax+4BCh]                                       ; +0x5b, 0x1401b544b\njmp     loc_1401B5512                                                  ; +0x62, 0x1401b5452\nmov     r14, [r15+3B0h]                                                ; +0x67, 0x1401b5457\nxor     edi, edi                                                       ; +0x6e, 0x1401b545e\nmov     [rsp+38h+arg_8], rbp                                           ; +0x70, 0x1401b5460\nmov     [rsp+38h+arg_10], rsi                                          ; +0x75, 0x1401b5465\nmov     esi, 0FFFFFFFFh                                                ; +0x7a, 0x1401b546a\ntest    r14, r14                                                       ; +0x7f, 0x1401b546f\njz      short loc_1401B54B6                                            ; +0x82, 0x1401b5472\nmov     rcx, r14                                                       ; +0x84, 0x1401b5474\nmov     ebx, esi                                                       ; +0x87, 0x1401b5477\nmov     ebp, edi                                                       ; +0x89, 0x1401b5479\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x8b, 0x1401b547b\ntest    eax, eax                                                       ; +0x91, 0x1401b5481\njz      short loc_1401B54B6                                            ; +0x93, 0x1401b5483\nmov     edx, ebp                                                       ; +0x95, 0x1401b5485\nmov     rcx, r14                                                       ; +0x97, 0x1401b5487\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x9a, 0x1401b548a\nmovsx   ecx, word ptr [rax+4BAh]                                       ; +0xa0, 0x1401b5490\ncmp     ebx, esi                                                       ; +0xa7, 0x1401b5497\njnz     short loc_1401B549F                                            ; +0xa9, 0x1401b5499\nmov     ebx, ecx                                                       ; +0xab, 0x1401b549b\njmp     short loc_1401B54A3                                            ; +0xad, 0x1401b549d\ncmp     ebx, ecx                                                       ; +0xaf, 0x1401b549f\njnz     short loc_1401B54B6                                            ; +0xb1, 0x1401b54a1\nmov     rcx, r14                                                       ; +0xb3, 0x1401b54a3\ninc     ebp                                                            ; +0xb6, 0x1401b54a6\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xb8, 0x1401b54a8\ncmp     ebp, eax                                                       ; +0xbe, 0x1401b54ae\njb      short loc_1401B5485                                            ; +0xc0, 0x1401b54b0\ncmp     ebx, esi                                                       ; +0xc2, 0x1401b54b2\njnz     short loc_1401B54B8                                            ; +0xc4, 0x1401b54b4\nmov     ebx, edi                                                       ; +0xc6, 0x1401b54b6\nmov     r14, [r15+3B0h]                                                ; +0xc8, 0x1401b54b8\ntest    r14, r14                                                       ; +0xcf, 0x1401b54bf\njz      short loc_1401B5508                                            ; +0xd2, 0x1401b54c2\nmov     rcx, r14                                                       ; +0xd4, 0x1401b54c4\nmov     ebp, edi                                                       ; +0xd7, 0x1401b54c7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xd9, 0x1401b54c9\ntest    eax, eax                                                       ; +0xdf, 0x1401b54cf\njz      short loc_1401B5508                                            ; +0xe1, 0x1401b54d1\nmov     edx, ebp                                                       ; +0xe3, 0x1401b54d3\nmov     rcx, r14                                                       ; +0xe5, 0x1401b54d5\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xe8, 0x1401b54d8\nmovsx   ecx, word ptr [rax+4BCh]                                       ; +0xee, 0x1401b54de\ncmp     esi, 0FFFFFFFFh                                                ; +0xf5, 0x1401b54e5\njnz     short loc_1401B54EE                                            ; +0xf8, 0x1401b54e8\nmov     esi, ecx                                                       ; +0xfa, 0x1401b54ea\njmp     short loc_1401B54F2                                            ; +0xfc, 0x1401b54ec\ncmp     esi, ecx                                                       ; +0xfe, 0x1401b54ee\njnz     short loc_1401B5508                                            ; +0x100, 0x1401b54f0\nmov     rcx, r14                                                       ; +0x102, 0x1401b54f2\ninc     ebp                                                            ; +0x105, 0x1401b54f5\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x107, 0x1401b54f7\ncmp     ebp, eax                                                       ; +0x10d, 0x1401b54fd\njb      short loc_1401B54D3                                            ; +0x10f, 0x1401b54ff\ncmp     esi, 0FFFFFFFFh                                                ; +0x111, 0x1401b5501\njz      short loc_1401B5508                                            ; +0x114, 0x1401b5504\nmov     edi, esi                                                       ; +0x116, 0x1401b5506\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x118, 0x1401b5508\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x11d, 0x1401b550d\ntest    edi, edi                                                       ; +0x122, 0x1401b5512\njz      short loc_1401B5523                                            ; +0x124, 0x1401b5514\ntest    ebx, ebx                                                       ; +0x126, 0x1401b5516\njnz     short loc_1401B551E                                            ; +0x128, 0x1401b5518\nmov     ebx, edi                                                       ; +0x12a, 0x1401b551a\njmp     short loc_1401B5523                                            ; +0x12c, 0x1401b551c\ncmp     r12d, edi                                                      ; +0x12e, 0x1401b551e\njnz     short loc_1401B5525                                            ; +0x131, 0x1401b5521\nmov     edi, ebx                                                       ; +0x133, 0x1401b5523\nmov     rax, [r15+5E8h]                                                ; +0x135, 0x1401b5525\nmov     rcx, r15                                                       ; +0x13c, 0x1401b552c\nmov     [rax+3A12h], di                                                ; +0x13f, 0x1401b552f\ncall    EditorUI__updateGroupIDLabel                                   ; +0x146, 0x1401b5536\nmov     r12, [rsp+38h+var_18]                                          ; +0x14b, 0x1401b553b\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x150, 0x1401b5540\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x155, 0x1401b5545\nadd     rsp, 28h                                                       ; +0x15a, 0x1401b554a\npop     r15                                                            ; +0x15e, 0x1401b554e\npop     r14                                                            ; +0x160, 0x1401b5550\nretn                                                                   ; +0x162, 0x1401b5552", "xrefs": ["EditorUI::handleEditorAction @ 0x1401c37d9", "EditorUI::init @ 0x1401abb5a", "<???> @ 0x1408a1b40", "<???> @ 0x1408a1b78", "<???> @ 0x14091a198"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}