{"type": "func", "start": 5369824016, "end": 5369824552, "name": "EditorUI::canSelectObject", "pseudocode": "// \n// EditorUI::canSelectObject from 0x140110310 to 0x140110528 (536 bytes)\n// \n// 6 xrefs:\n// > EditorUI::onDelete @ 0x1400e5f45\n// > EditorUI::selectObject @ 0x140110545\n// > EditorUI::ccTouchEnded @ 0x140124e32\n// > EditorUI::ccTouchEnded @ 0x14012508e\n// > <???> @ 0x1406c8ea4\n// > <???> @ 0x1406c8eb0\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\n// Hidden C++ exception states: #wind=5\nbool EditorUI::canSelectObject(EditorUI *a1, GameObject *a2)\n{\n  GameManager *v3; // rcx\n  GameManager *v4; // rcx\n  GameManager *v5; // rcx\n  GameManager *v6; // rcx\n  int IntGameVariable; // r8d\n  __int64 v8; // rcx\n  std::array<short, 10> *i; // rdx\n  GameManager *v11; // rcx\n  int v12; // edx\n  GJSpriteColor *m_baseColor; // rcx\n  int m_defaultColorID; // eax\n  int m_colorID; // ecx\n  GJSpriteColor *m_detailColor; // rax\n  int v17; // ecx\n  int v18; // eax\n  void *v19; // [rsp+30h] [rbp+8h]\n  void *v20; // [rsp+30h] [rbp+8h]\n  void *v21; // [rsp+30h] [rbp+8h]\n  void *v22; // [rsp+30h] [rbp+8h]\n  void *v23; // [rsp+30h] [rbp+8h]\n\n  v3 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v19 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v19);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v3 = (GameManager *)qword_1406C2ED8;\n  }\n  if ( GameManager::getGameVariable(v3, \"0064\") )\n  {\n    v4 = (GameManager *)qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v20 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v20);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v4 = (GameManager *)qword_1406C2ED8;\n    }\n    if ( GameManager::getIntGameVariable(v4, \"0005\") == 3 )\n    {\n      v5 = (GameManager *)qword_1406C2ED8;\n      if ( !qword_1406C2ED8 )\n      {\n        v21 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00(v21);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v5 = (GameManager *)qword_1406C2ED8;\n      }\n      if ( a2->m_objectID != GameManager::getIntGameVariable(v5, \"0006\") )\n        return 0;\n    }\n  }\n  v6 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v22 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v22);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v6 = (GameManager *)qword_1406C2ED8;\n  }\n  IntGameVariable = GameManager::getIntGameVariable(v6, \"0133\");\n  if ( IntGameVariable )\n  {\n    if ( a2->m_groupCount <= 0 )\n      return 0;\n    v8 = 0;\n    for ( i = a2->m_groups; i->_Elems[0] != IntGameVariable; i = (std::array<short, 10> *)((char *)i + 2) )\n    {\n      if ( ++v8 >= a2->m_groupCount )\n        return 0;\n    }\n  }\n  v11 = (GameManager *)qword_1406C2ED8;\n  if ( !qword_1406C2ED8 )\n  {\n    v23 = operator new(0x668u);\n    qword_1406C2ED8 = sub_14017AB00(v23);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n    v11 = (GameManager *)qword_1406C2ED8;\n  }\n  v12 = GameManager::getIntGameVariable(v11, \"0139\");\n  if ( !v12 )\n    return 1;\n  m_baseColor = a2->m_baseColor;\n  if ( m_baseColor )\n  {\n    m_defaultColorID = m_baseColor->m_defaultColorID;\n    m_colorID = m_baseColor->m_colorID;\n    if ( m_defaultColorID == m_colorID || !m_colorID )\n      m_colorID = m_defaultColorID;\n    if ( m_colorID == v12 )\n      return 1;\n  }\n  m_detailColor = a2->m_detailColor;\n  if ( !m_detailColor )\n    return 0;\n  v17 = m_detailColor->m_defaultColorID;\n  v18 = m_detailColor->m_colorID;\n  if ( v17 == v18 || !v18 )\n    v18 = v17;\n  return v18 == v12;\n}", "assembly": "; \n; EditorUI::canSelectObject from 0x140110310 to 0x140110528 (536 bytes)\n; \n; 6 xrefs:\n; > EditorUI::onDelete @ 0x1400e5f45\n; > EditorUI::selectObject @ 0x140110545\n; > EditorUI::ccTouchEnded @ 0x140124e32\n; > EditorUI::ccTouchEnded @ 0x14012508e\n; > <???> @ 0x1406c8ea4\n; > <???> @ 0x1406c8eb0\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\nmov     [rsp+arg_0], rcx                                               ; +0x0, 0x140110310\npush    rbx                                                            ; +0x5, 0x140110315\nsub     rsp, 20h                                                       ; +0x6, 0x140110316\nmov     rbx, rdx                                                       ; +0xa, 0x14011031a\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xd, 0x14011031d\ntest    rcx, rcx                                                       ; +0x14, 0x140110324\njnz     short loc_140110358                                            ; +0x17, 0x140110327\nmov     ecx, 668h; Size                                                ; +0x19, 0x140110329\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1e, 0x14011032e\nmov     [rsp+28h+arg_0], rax                                           ; +0x23, 0x140110333\nmov     rcx, rax                                                       ; +0x28, 0x140110338\ncall    sub_14017AB00                                                  ; +0x2b, 0x14011033b\nnop                                                                    ; +0x30, 0x140110340\nmov     cs:qword_1406C2ED8, rax                                        ; +0x31, 0x140110341\nmov     rdx, [rax]                                                     ; +0x38, 0x140110348\nmov     rcx, rax                                                       ; +0x3b, 0x14011034b\ncall    qword ptr [rdx+48h]                                            ; +0x3e, 0x14011034e\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x41, 0x140110351\nlea     rdx, a0064; \"0064\"                                             ; +0x48, 0x140110358\ncall    GameManager__getGameVariable                                   ; +0x4f, 0x14011035f\ntest    al, al                                                         ; +0x54, 0x140110364\njz      loc_14011040B                                                  ; +0x56, 0x140110366\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x5c, 0x14011036c\ntest    rcx, rcx                                                       ; +0x63, 0x140110373\njnz     short loc_1401103A7                                            ; +0x66, 0x140110376\nmov     ecx, 668h; Size                                                ; +0x68, 0x140110378\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x6d, 0x14011037d\nmov     [rsp+28h+arg_0], rax                                           ; +0x72, 0x140110382\nmov     rcx, rax                                                       ; +0x77, 0x140110387\ncall    sub_14017AB00                                                  ; +0x7a, 0x14011038a\nnop                                                                    ; +0x7f, 0x14011038f\nmov     cs:qword_1406C2ED8, rax                                        ; +0x80, 0x140110390\nmov     rdx, [rax]                                                     ; +0x87, 0x140110397\nmov     rcx, rax                                                       ; +0x8a, 0x14011039a\ncall    qword ptr [rdx+48h]                                            ; +0x8d, 0x14011039d\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x90, 0x1401103a0\nlea     rdx, a0005; \"0005\"                                             ; +0x97, 0x1401103a7\ncall    GameManager__getIntGameVariable                                ; +0x9e, 0x1401103ae\ncmp     eax, 3                                                         ; +0xa3, 0x1401103b3\njnz     short loc_14011040B                                            ; +0xa6, 0x1401103b6\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xa8, 0x1401103b8\ntest    rcx, rcx                                                       ; +0xaf, 0x1401103bf\njnz     short loc_1401103F3                                            ; +0xb2, 0x1401103c2\nmov     ecx, 668h; Size                                                ; +0xb4, 0x1401103c4\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb9, 0x1401103c9\nmov     [rsp+28h+arg_0], rax                                           ; +0xbe, 0x1401103ce\nmov     rcx, rax                                                       ; +0xc3, 0x1401103d3\ncall    sub_14017AB00                                                  ; +0xc6, 0x1401103d6\nnop                                                                    ; +0xcb, 0x1401103db\nmov     cs:qword_1406C2ED8, rax                                        ; +0xcc, 0x1401103dc\nmov     rdx, [rax]                                                     ; +0xd3, 0x1401103e3\nmov     rcx, rax                                                       ; +0xd6, 0x1401103e6\ncall    qword ptr [rdx+48h]                                            ; +0xd9, 0x1401103e9\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xdc, 0x1401103ec\nlea     rdx, a0006; \"0006\"                                             ; +0xe3, 0x1401103f3\ncall    GameManager__getIntGameVariable                                ; +0xea, 0x1401103fa\ncmp     [rbx+40Ch], eax                                                ; +0xef, 0x1401103ff\njnz     loc_140110486                                                  ; +0xf5, 0x140110405\nmov     rcx, cs:qword_1406C2ED8                                        ; +0xfb, 0x14011040b\ntest    rcx, rcx                                                       ; +0x102, 0x140110412\njnz     short loc_140110446                                            ; +0x105, 0x140110415\nmov     ecx, 668h; Size                                                ; +0x107, 0x140110417\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10c, 0x14011041c\nmov     [rsp+28h+arg_0], rax                                           ; +0x111, 0x140110421\nmov     rcx, rax                                                       ; +0x116, 0x140110426\ncall    sub_14017AB00                                                  ; +0x119, 0x140110429\nnop                                                                    ; +0x11e, 0x14011042e\nmov     cs:qword_1406C2ED8, rax                                        ; +0x11f, 0x14011042f\nmov     rdx, [rax]                                                     ; +0x126, 0x140110436\nmov     rcx, rax                                                       ; +0x129, 0x140110439\ncall    qword ptr [rdx+48h]                                            ; +0x12c, 0x14011043c\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x12f, 0x14011043f\nlea     rdx, a0133; \"0133\"                                             ; +0x136, 0x140110446\ncall    GameManager__getIntGameVariable                                ; +0x13d, 0x14011044d\nmov     r8d, eax                                                       ; +0x142, 0x140110452\ntest    eax, eax                                                       ; +0x145, 0x140110455\njz      short loc_14011048E                                            ; +0x147, 0x140110457\nmovsx   rax, word ptr [rbx+498h]                                       ; +0x149, 0x140110459\ntest    ax, ax                                                         ; +0x151, 0x140110461\njle     short loc_140110486                                            ; +0x154, 0x140110464\nxor     ecx, ecx                                                       ; +0x156, 0x140110466\nmov     r9, rax                                                        ; +0x158, 0x140110468\nmov     rdx, [rbx+490h]                                                ; +0x15b, 0x14011046b\nmovsx   eax, word ptr [rdx]                                            ; +0x162, 0x140110472\ncmp     eax, r8d                                                       ; +0x165, 0x140110475\njz      short loc_14011048E                                            ; +0x168, 0x140110478\ninc     rcx                                                            ; +0x16a, 0x14011047a\nadd     rdx, 2                                                         ; +0x16d, 0x14011047d\ncmp     rcx, r9                                                        ; +0x171, 0x140110481\njl      short loc_140110472                                            ; +0x174, 0x140110484\nxor     al, al                                                         ; +0x176, 0x140110486\nadd     rsp, 20h                                                       ; +0x178, 0x140110488\npop     rbx                                                            ; +0x17c, 0x14011048c\nretn                                                                   ; +0x17d, 0x14011048d\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x17e, 0x14011048e\ntest    rcx, rcx                                                       ; +0x185, 0x140110495\njnz     short loc_1401104C9                                            ; +0x188, 0x140110498\nmov     ecx, 668h; Size                                                ; +0x18a, 0x14011049a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x18f, 0x14011049f\nmov     [rsp+28h+arg_0], rax                                           ; +0x194, 0x1401104a4\nmov     rcx, rax                                                       ; +0x199, 0x1401104a9\ncall    sub_14017AB00                                                  ; +0x19c, 0x1401104ac\nnop                                                                    ; +0x1a1, 0x1401104b1\nmov     cs:qword_1406C2ED8, rax                                        ; +0x1a2, 0x1401104b2\nmov     rdx, [rax]                                                     ; +0x1a9, 0x1401104b9\nmov     rcx, rax                                                       ; +0x1ac, 0x1401104bc\ncall    qword ptr [rdx+48h]                                            ; +0x1af, 0x1401104bf\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x1b2, 0x1401104c2\nlea     rdx, a0139; \"0139\"                                             ; +0x1b9, 0x1401104c9\ncall    GameManager__getIntGameVariable                                ; +0x1c0, 0x1401104d0\nmov     edx, eax                                                       ; +0x1c5, 0x1401104d5\ntest    eax, eax                                                       ; +0x1c7, 0x1401104d7\njz      short loc_140110520                                            ; +0x1c9, 0x1401104d9\nmov     rcx, [rbx+450h]                                                ; +0x1cb, 0x1401104db\ntest    rcx, rcx                                                       ; +0x1d2, 0x1401104e2\njz      short loc_1401104FA                                            ; +0x1d5, 0x1401104e5\nmov     eax, [rcx+4]                                                   ; +0x1d7, 0x1401104e7\nmov     ecx, [rcx]                                                     ; +0x1da, 0x1401104ea\ncmp     eax, ecx                                                       ; +0x1dc, 0x1401104ec\njz      short loc_1401104F4                                            ; +0x1de, 0x1401104ee\ntest    ecx, ecx                                                       ; +0x1e0, 0x1401104f0\njnz     short loc_1401104F6                                            ; +0x1e2, 0x1401104f2\nmov     ecx, eax                                                       ; +0x1e4, 0x1401104f4\ncmp     ecx, edx                                                       ; +0x1e6, 0x1401104f6\njz      short loc_140110520                                            ; +0x1e8, 0x1401104f8\nmov     rax, [rbx+458h]                                                ; +0x1ea, 0x1401104fa\ntest    rax, rax                                                       ; +0x1f1, 0x140110501\njz      short loc_140110486                                            ; +0x1f4, 0x140110504\nmov     ecx, [rax+4]                                                   ; +0x1f6, 0x140110506\nmov     eax, [rax]                                                     ; +0x1f9, 0x140110509\ncmp     ecx, eax                                                       ; +0x1fb, 0x14011050b\njz      short loc_140110513                                            ; +0x1fd, 0x14011050d\ntest    eax, eax                                                       ; +0x1ff, 0x14011050f\njnz     short loc_140110515                                            ; +0x201, 0x140110511\nmov     eax, ecx                                                       ; +0x203, 0x140110513\ncmp     eax, edx                                                       ; +0x205, 0x140110515\nsetz    al                                                             ; +0x207, 0x140110517\nadd     rsp, 20h                                                       ; +0x20a, 0x14011051a\npop     rbx                                                            ; +0x20e, 0x14011051e\nretn                                                                   ; +0x20f, 0x14011051f\nmov     al, 1                                                          ; +0x210, 0x140110520\nadd     rsp, 20h                                                       ; +0x212, 0x140110522\npop     rbx                                                            ; +0x216, 0x140110526\nretn                                                                   ; +0x217, 0x140110527", "xrefs": ["EditorUI::onDelete @ 0x1400e5f45", "EditorUI::selectObject @ 0x140110545", "EditorUI::ccTouchEnded @ 0x140124e32", "EditorUI::ccTouchEnded @ 0x14012508e", "<???> @ 0x1406c8ea4", "<???> @ 0x1406c8eb0"], "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"}