{"type": "func", "start": 4295270032, "end": 4295270319, "name": "EditorUI::showLiveColorSelectForModeSpecial", "pseudocode": "// \n// EditorUI::showLiveColorSelectForModeSpecial from 0x100049e90 to 0x100049faf (287 bytes)\n// \n// 1 xrefs:\n// > CustomizeObjectLayer::onLiveEdit @ 0x1001f7dbe\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::showLiveColorSelectForModeSpecial(EditorUI *a1, int a2)\n{\n  GameObject *m_selectedObject; // rdi\n  ColorSelectLiveOverlay *m_colorOverlay; // rdi\n  HSVLiveOverlay *m_hsvOverlay; // rdi\n  GameManager *v6; // rax\n  ColorAction *ColorAction; // rax\n  ColorSelectLiveOverlay *v8; // rax\n  cocos2d::CCArray *m_selectedObjects; // rax\n  cocos2d::ccArray *data; // rax\n  GameObject **arr; // r15\n  unsigned __int64 v12; // r12\n\n  m_selectedObject = a1->m_selectedObject;\n  if ( m_selectedObject )\n  {\n    GameObject::deselectObject(m_selectedObject);\n  }\n  else if ( (unsigned int)sub_100720070(a1->m_selectedObjects) )\n  {\n    m_selectedObjects = a1->m_selectedObjects;\n    if ( m_selectedObjects )\n    {\n      data = m_selectedObjects->data;\n      if ( data->num )\n      {\n        arr = (GameObject **)data->arr;\n        v12 = (unsigned __int64)&arr[data->num - 1];\n        do\n        {\n          if ( !*arr )\n            break;\n          GameObject::deselectObject(*arr++);\n        }\n        while ( (unsigned __int64)arr <= v12 );\n      }\n    }\n  }\n  m_colorOverlay = a1->m_colorOverlay;\n  if ( m_colorOverlay )\n  {\n    ColorSelectLiveOverlay::closeColorSelect(m_colorOverlay, nullptr);\n    a1->m_colorOverlay = nullptr;\n  }\n  m_hsvOverlay = a1->m_hsvOverlay;\n  if ( m_hsvOverlay )\n  {\n    HSVLiveOverlay::closeColorSelect(m_hsvOverlay, nullptr);\n    a1->m_hsvOverlay = nullptr;\n  }\n  v6 = GameManager::sharedState();\n  ColorAction = GJEffectManager::getColorAction(v6->m_levelEditorLayer->m_levelSettings->m_effectManager, a2);\n  v8 = ColorSelectLiveOverlay::createWithActions(ColorAction, nullptr);\n  a1->m_colorOverlay = v8;\n  v8->m_delegate = &a1->ColorSelectDelegate;\n  v8->m_scene = a1;\n  ((void (__fastcall *)(ColorSelectLiveOverlay *))v8->show)(v8);\n}", "assembly": "; \n; EditorUI::showLiveColorSelectForModeSpecial from 0x100049e90 to 0x100049faf (287 bytes)\n; \n; 1 xrefs:\n; > CustomizeObjectLayer::onLiveEdit @ 0x1001f7dbe\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, 0x100049e90\nmov     rbp, rsp                                                       ; +0x1, 0x100049e91\npush    r15                                                            ; +0x4, 0x100049e94\npush    r14                                                            ; +0x6, 0x100049e96\npush    r12                                                            ; +0x8, 0x100049e98\npush    rbx                                                            ; +0xa, 0x100049e9a\nmov     r14d, esi                                                      ; +0xb, 0x100049e9b\nmov     rbx, rdi                                                       ; +0xe, 0x100049e9e\nmov     rdi, [rdi+520h]                                                ; +0x11, 0x100049ea1\ntest    rdi, rdi                                                       ; +0x18, 0x100049ea8\njz      loc_100049F4E                                                  ; +0x1b, 0x100049eab\ncall    GameObject__deselectObject                                     ; +0x21, 0x100049eb1\nmov     rdi, [rbx+548h]                                                ; +0x26, 0x100049eb6\ntest    rdi, rdi                                                       ; +0x2d, 0x100049ebd\njz      short loc_100049ED4                                            ; +0x30, 0x100049ec0\nxor     esi, esi                                                       ; +0x32, 0x100049ec2\ncall    ColorSelectLiveOverlay__closeColorSelect                       ; +0x34, 0x100049ec4\nmov     qword ptr [rbx+548h], 0                                        ; +0x39, 0x100049ec9\nmov     rdi, [rbx+550h]                                                ; +0x44, 0x100049ed4\ntest    rdi, rdi                                                       ; +0x4b, 0x100049edb\njz      short loc_100049EF2                                            ; +0x4e, 0x100049ede\nxor     esi, esi                                                       ; +0x50, 0x100049ee0\ncall    HSVLiveOverlay__closeColorSelect                               ; +0x52, 0x100049ee2\nmov     qword ptr [rbx+550h], 0                                        ; +0x57, 0x100049ee7\ncall    GameManager__sharedState                                       ; +0x62, 0x100049ef2\nmov     rax, [rax+200h]                                                ; +0x67, 0x100049ef7\nmov     rax, [rax+0CB0h]                                               ; +0x6e, 0x100049efe\nmov     rdi, [rax+140h]                                                ; +0x75, 0x100049f05\nmov     esi, r14d                                                      ; +0x7c, 0x100049f0c\ncall    GJEffectManager__getColorAction                                ; +0x7f, 0x100049f0f\nmov     rdi, rax                                                       ; +0x84, 0x100049f14\nxor     esi, esi                                                       ; +0x87, 0x100049f17\ncall    ColorSelectLiveOverlay__createWithActions                      ; +0x89, 0x100049f19\nmov     [rbx+548h], rax                                                ; +0x8e, 0x100049f1e\nlea     rcx, [rbx+1A0h]                                                ; +0x95, 0x100049f25\nmov     [rax+2C0h], rcx                                                ; +0x9c, 0x100049f2c\nmov     [rax+230h], rbx                                                ; +0xa3, 0x100049f33\nmov     rcx, [rax]                                                     ; +0xaa, 0x100049f3a\nmov     rdi, rax                                                       ; +0xad, 0x100049f3d\npop     rbx                                                            ; +0xb0, 0x100049f40\npop     r12                                                            ; +0xb1, 0x100049f41\npop     r14                                                            ; +0xb3, 0x100049f43\npop     r15                                                            ; +0xb5, 0x100049f45\npop     rbp                                                            ; +0xb7, 0x100049f47\njmp     qword ptr [rcx+508h]                                           ; +0xb8, 0x100049f48\nmov     rdi, [rbx+328h]                                                ; +0xbe, 0x100049f4e\ncall    sub_100720070                                                  ; +0xc5, 0x100049f55\ntest    eax, eax                                                       ; +0xca, 0x100049f5a\njz      loc_100049EB6                                                  ; +0xcc, 0x100049f5c\nmov     rax, [rbx+328h]                                                ; +0xd2, 0x100049f62\ntest    rax, rax                                                       ; +0xd9, 0x100049f69\njz      loc_100049EB6                                                  ; +0xdc, 0x100049f6c\nmov     rax, [rax+38h]                                                 ; +0xe2, 0x100049f72\nmov     ecx, [rax]                                                     ; +0xe6, 0x100049f76\ntest    rcx, rcx                                                       ; +0xe8, 0x100049f78\njz      loc_100049EB6                                                  ; +0xeb, 0x100049f7b\nmov     r15, [rax+10h]                                                 ; +0xf1, 0x100049f81\nlea     r12, [r15+rcx*8]                                               ; +0xf5, 0x100049f85\nadd     r12, 0FFFFFFFFFFFFFFF8h                                        ; +0xf9, 0x100049f89\nnop     dword ptr [rax]                                                ; +0xfd, 0x100049f8d\nmov     rdi, [r15]                                                     ; +0x100, 0x100049f90\ntest    rdi, rdi                                                       ; +0x103, 0x100049f93\njz      loc_100049EB6                                                  ; +0x106, 0x100049f96\ncall    GameObject__deselectObject                                     ; +0x10c, 0x100049f9c\nadd     r15, 8                                                         ; +0x111, 0x100049fa1\ncmp     r15, r12                                                       ; +0x115, 0x100049fa5\njbe     short loc_100049F90                                            ; +0x118, 0x100049fa8\njmp     loc_100049EB6                                                  ; +0x11a, 0x100049faa", "xrefs": ["CustomizeObjectLayer::onLiveEdit @ 0x1001f7dbe"], "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"}