{"type": "func", "start": 4299294996, "end": 4299295368, "name": "ColorSelectPopup::colorSelectClosed", "pseudocode": "// \n// ColorSelectPopup::colorSelectClosed from 0x100420914 to 0x100420a88 (372 bytes)\n// \n// 2 xrefs:\n// > sub_100420AE4 @ 0x100420ae8\n// > <???> @ 0x100824278\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 ColorSelectPopup::colorSelectClosed(ColorSelectPopup *a1, GJSpecialColorSelect *a2, int a3)\n{\n  CCTextInputNode *m_colorInput; // x21\n  CCTextInputNode *v7; // x21\n  char *v8; // x0\n  bool *p_m_disableTextDelegate; // x20\n  CCTextInputNode *m_copyColorInput; // x21\n  CCTextInputNode *v11; // x21\n  char *v12; // x0\n  std::string v13; // [xsp+0h] [xbp-80h] BYREF\n  void *v14[2]; // [xsp+18h] [xbp-68h] BYREF\n  char v15; // [xsp+2Fh] [xbp-51h]\n  std::string __p; // [xsp+30h] [xbp-50h] BYREF\n  __int64 *v17[2]; // [xsp+48h] [xbp-38h] BYREF\n  char v18; // [xsp+5Fh] [xbp-21h]\n\n  if ( a3 >= 1000 )\n  {\n    if ( ((unsigned int (__fastcall *)(GJSpecialColorSelect *))a2->getTag)(a2) == 6 )\n    {\n      a1->m_colorID = a3;\n      a1->m_disableTextDelegate = 1;\n      m_colorInput = a1->m_colorInput;\n      sub_100009900(v17, \"0\");\n      CCTextInputNode::setString(m_colorInput, v17);\n      if ( v18 < 0 )\n        operator delete(v17[0]);\n      v7 = a1->m_colorInput;\n      v8 = (char *)GJSpecialColorSelect::textForColorIdx(a3);\n      sub_100009900(&__p, v8);\n      CCTextInputNode::updateLabel(v7, &__p);\n      p_m_disableTextDelegate = &a1->m_disableTextDelegate;\n      if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )\n        operator delete(__p.__r_.__value_.__l.__data_);\n      ColorSelectPopup::updateCustomColorIdx(a1);\n      SetupTriggerPopup::updateEditorLabel(a1);\n    }\n    else\n    {\n      if ( ((unsigned int (__fastcall *)(GJSpecialColorSelect *))a2->getTag)(a2) != 7 )\n        return;\n      a1->m_copyColorID = a3;\n      a1->m_disableTextDelegate = 1;\n      m_copyColorInput = a1->m_copyColorInput;\n      sub_100009900(v14, \"0\");\n      CCTextInputNode::setString(m_copyColorInput, (__int64 **)v14);\n      if ( v15 < 0 )\n        operator delete(v14[0]);\n      v11 = a1->m_copyColorInput;\n      v12 = (char *)GJSpecialColorSelect::textForColorIdx(a3);\n      sub_100009900(&v13, v12);\n      CCTextInputNode::updateLabel(v11, &v13);\n      p_m_disableTextDelegate = &a1->m_disableTextDelegate;\n      if ( SHIBYTE(v13.__r_.__value_.__r.__words[2]) < 0 )\n        operator delete(v13.__r_.__value_.__l.__data_);\n      ColorSelectPopup::updateCopyColor(a1);\n    }\n    *p_m_disableTextDelegate = 0;\n  }\n}", "assembly": "; \n; ColorSelectPopup::colorSelectClosed from 0x100420914 to 0x100420a88 (372 bytes)\n; \n; 2 xrefs:\n; > sub_100420AE4 @ 0x100420ae8\n; > <???> @ 0x100824278\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\nSUB             SP, SP, #0x90                                          ; +0x0, 0x100420914\nSTP             X22, X21, [SP,#0x80+var_20]                            ; +0x4, 0x100420918\nSTP             X20, X19, [SP,#0x80+var_10]                            ; +0x8, 0x10042091c\nSTP             X29, X30, [SP,#0x80+var_s0]                            ; +0xc, 0x100420920\nADD             X29, SP, #0x80                                         ; +0x10, 0x100420924\nCMP             W2, #0x3E8                                             ; +0x14, 0x100420928\nB.LT            loc_100420A74                                          ; +0x18, 0x10042092c\nMOV             X20, X2                                                ; +0x1c, 0x100420930\nMOV             X21, X1                                                ; +0x20, 0x100420934\nMOV             X19, X0                                                ; +0x24, 0x100420938\nLDR             X8, [X1]                                               ; +0x28, 0x10042093c\nLDR             X8, [X8,#0x40]                                         ; +0x2c, 0x100420940\nMOV             X0, X1                                                 ; +0x30, 0x100420944\nBLR             X8                                                     ; +0x34, 0x100420948\nCMP             W0, #6                                                 ; +0x38, 0x10042094c\nB.NE            loc_1004209DC                                          ; +0x3c, 0x100420950\nSTR             W20, [X19,#0x448]                                      ; +0x40, 0x100420954\nMOV             W8, #1                                                 ; +0x44, 0x100420958\nSTRB            W8, [X19,#0x2CC]                                       ; +0x48, 0x10042095c\nLDR             X21, [X19,#0x438]                                      ; +0x4c, 0x100420960\nADRL            X1, a0; \"0\"                                            ; +0x50, 0x100420964\nSUB             X0, X29, #-var_38; int                                 ; +0x58, 0x10042096c\nBL              sub_100009900                                          ; +0x5c, 0x100420970\nSUB             X1, X29, #-var_38                                      ; +0x60, 0x100420974\nMOV             X0, X21                                                ; +0x64, 0x100420978\nBL              CCTextInputNode__setString                             ; +0x68, 0x10042097c\nLDURSB          W8, [X29,#var_21]                                      ; +0x6c, 0x100420980\nTBZ             W8, #0x1F, loc_100420990                               ; +0x70, 0x100420984\nLDUR            X0, [X29,#var_38]; __p                                 ; +0x74, 0x100420988\nBL              __ZdlPv; operator delete(void *)                       ; +0x78, 0x10042098c\nLDR             X21, [X19,#0x438]                                      ; +0x7c, 0x100420990\nMOV             X0, X20                                                ; +0x80, 0x100420994\nBL              GJSpecialColorSelect__textForColorIdx                  ; +0x84, 0x100420998\nMOV             X1, X0; __s                                            ; +0x88, 0x10042099c\nADD             X0, SP, #0x80+__p; int                                 ; +0x8c, 0x1004209a0\nBL              sub_100009900                                          ; +0x90, 0x1004209a4\nADD             X1, SP, #0x80+__p                                      ; +0x94, 0x1004209a8\nMOV             X0, X21                                                ; +0x98, 0x1004209ac\nBL              CCTextInputNode__updateLabel                           ; +0x9c, 0x1004209b0\nADD             X20, X19, #0x2CC                                       ; +0xa0, 0x1004209b4\nLDRSB           W8, [SP,#0x80+var_39]                                  ; +0xa4, 0x1004209b8\nTBZ             W8, #0x1F, loc_1004209C8                               ; +0xa8, 0x1004209bc\nLDR             X0, [SP,#0x80+__p]; __p                                ; +0xac, 0x1004209c0\nBL              __ZdlPv; operator delete(void *)                       ; +0xb0, 0x1004209c4\nMOV             X0, X19                                                ; +0xb4, 0x1004209c8\nBL              ColorSelectPopup__updateCustomColorIdx                 ; +0xb8, 0x1004209cc\nMOV             X0, X19                                                ; +0xbc, 0x1004209d0\nBL              SetupTriggerPopup__updateEditorLabel                   ; +0xc0, 0x1004209d4\nB               loc_100420A70                                          ; +0xc4, 0x1004209d8\nLDR             X8, [X21]                                              ; +0xc8, 0x1004209dc\nLDR             X8, [X8,#0x40]                                         ; +0xcc, 0x1004209e0\nMOV             X0, X21                                                ; +0xd0, 0x1004209e4\nBLR             X8                                                     ; +0xd4, 0x1004209e8\nCMP             W0, #7                                                 ; +0xd8, 0x1004209ec\nB.NE            loc_100420A74                                          ; +0xdc, 0x1004209f0\nSTR             W20, [X19,#0x450]                                      ; +0xe0, 0x1004209f4\nMOV             W8, #1                                                 ; +0xe4, 0x1004209f8\nSTRB            W8, [X19,#0x2CC]                                       ; +0xe8, 0x1004209fc\nLDR             X21, [X19,#0x480]                                      ; +0xec, 0x100420a00\nADRL            X1, a0; \"0\"                                            ; +0xf0, 0x100420a04\nADD             X0, SP, #0x80+var_68; int                              ; +0xf8, 0x100420a0c\nBL              sub_100009900                                          ; +0xfc, 0x100420a10\nADD             X1, SP, #0x80+var_68                                   ; +0x100, 0x100420a14\nMOV             X0, X21                                                ; +0x104, 0x100420a18\nBL              CCTextInputNode__setString                             ; +0x108, 0x100420a1c\nLDRSB           W8, [SP,#0x80+var_51]                                  ; +0x10c, 0x100420a20\nTBZ             W8, #0x1F, loc_100420A30                               ; +0x110, 0x100420a24\nLDR             X0, [SP,#0x80+var_68]; __p                             ; +0x114, 0x100420a28\nBL              __ZdlPv; operator delete(void *)                       ; +0x118, 0x100420a2c\nLDR             X21, [X19,#0x480]                                      ; +0x11c, 0x100420a30\nMOV             X0, X20                                                ; +0x120, 0x100420a34\nBL              GJSpecialColorSelect__textForColorIdx                  ; +0x124, 0x100420a38\nMOV             X1, X0; __s                                            ; +0x128, 0x100420a3c\nMOV             X0, SP; int                                            ; +0x12c, 0x100420a40\nBL              sub_100009900                                          ; +0x130, 0x100420a44\nMOV             X1, SP                                                 ; +0x134, 0x100420a48\nMOV             X0, X21                                                ; +0x138, 0x100420a4c\nBL              CCTextInputNode__updateLabel                           ; +0x13c, 0x100420a50\nADD             X20, X19, #0x2CC                                       ; +0x140, 0x100420a54\nLDRSB           W8, [SP,#0x80+var_69]                                  ; +0x144, 0x100420a58\nTBZ             W8, #0x1F, loc_100420A68                               ; +0x148, 0x100420a5c\nLDR             X0, [SP,#0x80+var_80]; __p                             ; +0x14c, 0x100420a60\nBL              __ZdlPv; operator delete(void *)                       ; +0x150, 0x100420a64\nMOV             X0, X19                                                ; +0x154, 0x100420a68\nBL              ColorSelectPopup__updateCopyColor                      ; +0x158, 0x100420a6c\nSTRB            WZR, [X20]                                             ; +0x15c, 0x100420a70\nLDP             X29, X30, [SP,#0x80+var_s0]                            ; +0x160, 0x100420a74\nLDP             X20, X19, [SP,#0x80+var_10]                            ; +0x164, 0x100420a78\nLDP             X22, X21, [SP,#0x80+var_20]                            ; +0x168, 0x100420a7c\nADD             SP, SP, #0x90                                          ; +0x16c, 0x100420a80\nRET                                                                    ; +0x170, 0x100420a84", "xrefs": ["sub_100420AE4 @ 0x100420ae8", "<???> @ 0x100824278"], "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"}