{"type": "func", "start": 7589932, "end": 7590408, "name": "ColorSelectPopup::updateCopyColorTextInputLabel", "pseudocode": "// \n// ColorSelectPopup::updateCopyColorTextInputLabel from 0x73d02c to 0x73d208 (476 bytes)\n// \n// 4 xrefs:\n// > ColorSelectPopup::init @ 0x73d7fc\n// > ColorSelectPopup::onUpdateCopyColor @ 0x73fdf8\n// > ColorSelectPopup::onToggleHSVMode @ 0x73fe24\n// > <???> @ 0xa6080\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 ColorSelectPopup::updateCopyColorTextInputLabel(ColorSelectPopup *a1)\n{\n  const char *m_copyColorID; // x1\n  cocos2d::CCString *v3; // x0\n  char *CString; // x1\n  CCTextInputNode *m_copyColorInput; // x22\n  void *v6; // x0\n  int v7; // w0\n  CCTextInputNode *v8; // x24\n  char *v9; // x0\n  void *v10; // x0\n  unsigned int *v11; // x21\n  int v12; // w1\n  unsigned int *v13; // x1\n  int v14; // w2\n  int v15[2]; // [xsp+50h] [xbp+50h] BYREF\n\n  m_copyColorID = (const char *)(unsigned int)a1->m_copyColorID;\n  a1->m_disableTextDelegate = 1;\n  v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", m_copyColorID);\n  CString = (char *)cocos2d::CCString::getCString(v3);\n  if ( a1->m_copyColorID > 999 )\n    CString = \"0\";\n  m_copyColorInput = a1->m_copyColorInput;\n  sub_D153B8((int)v15, CString);\n  CCTextInputNode::setString(m_copyColorInput, (const unsigned __int8 **)v15);\n  v6 = (void *)(*(_QWORD *)v15 - 24LL);\n  if ( (__int64 *)(*(_QWORD *)v15 - 24LL) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v13 = (unsigned int *)(*(_QWORD *)v15 - 8LL);\n      do\n        v14 = __ldaxr(v13);\n      while ( __stlxr(v14 - 1, v13) );\n    }\n    else\n    {\n      v14 = *(_DWORD *)(*(_QWORD *)v15 - 8LL);\n      *(_DWORD *)(*(_QWORD *)v15 - 8LL) = v14 - 1;\n    }\n    if ( v14 <= 0 )\n      operator delete(v6);\n  }\n  v7 = a1->m_copyColorID;\n  if ( v7 > 999 )\n  {\n    v8 = a1->m_copyColorInput;\n    v9 = (char *)GJSpecialColorSelect::textForColorIdx(v7);\n    sub_D153B8((int)v15, v9);\n    CCTextInputNode::updateLabel(v8, (const void **)v15);\n    v10 = (void *)(*(_QWORD *)v15 - 24LL);\n    if ( (__int64 *)(*(_QWORD *)v15 - 24LL) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v11 = (unsigned int *)(*(_QWORD *)v15 - 8LL);\n        do\n          v12 = __ldaxr(v11);\n        while ( __stlxr(v12 - 1, v11) );\n      }\n      else\n      {\n        v12 = *(_DWORD *)(*(_QWORD *)v15 - 8LL);\n        *(_DWORD *)(*(_QWORD *)v15 - 8LL) = v12 - 1;\n      }\n      if ( v12 <= 0 )\n        operator delete(v10);\n    }\n  }\n  a1->m_disableTextDelegate = 0;\n}", "assembly": "; \n; ColorSelectPopup::updateCopyColorTextInputLabel from 0x73d02c to 0x73d208 (476 bytes)\n; \n; 4 xrefs:\n; > ColorSelectPopup::init @ 0x73d7fc\n; > ColorSelectPopup::onUpdateCopyColor @ 0x73fdf8\n; > ColorSelectPopup::onToggleHSVMode @ 0x73fe24\n; > <???> @ 0xa6080\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0x73d02c\nMOV             W3, #1                                                 ; +0x4, 0x73d030\nMOV             X29, SP                                                ; +0x8, 0x73d034\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0xc, 0x73d038\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x73d03c\nMOV             X19, X0                                                ; +0x14, 0x73d040\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x18, 0x73d044\nSTP             X23, X24, [SP,#0x60+var_30]                            ; +0x1c, 0x73d048\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x73d04c\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x24, 0x73d050\nLDR             W1, [X19,#0x468]; char *                               ; +0x28, 0x73d054\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x2c, 0x73d058\nSTRB            W3, [X19,#0x2CC]                                       ; +0x30, 0x73d05c\nLDR             X2, [X2]                                               ; +0x34, 0x73d060\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x38, 0x73d064\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x3c, 0x73d068\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x40, 0x73d06c\nMOV             X1, X0                                                 ; +0x44, 0x73d070\nLDR             W0, [X19,#0x468]                                       ; +0x48, 0x73d074\nCMP             W0, #0x3E7                                             ; +0x4c, 0x73d078\nB.LE            loc_73D088                                             ; +0x50, 0x73d07c\nADRL            X1, (aAssertionFaile_0+0x48); char *                   ; +0x54, 0x73d080\nADD             X21, X29, #0x60+var_10                                 ; +0x5c, 0x73d088\nADD             X23, X29, #0x60+var_20                                 ; +0x60, 0x73d08c\nMOV             X0, X21; int                                           ; +0x64, 0x73d090\nMOV             X2, X23                                                ; +0x68, 0x73d094\nLDR             X22, [X19,#0x498]                                      ; +0x6c, 0x73d098\nBL              sub_D153B8                                             ; +0x70, 0x73d09c\nMOV             X0, X22                                                ; +0x74, 0x73d0a0\nMOV             X1, X21                                                ; +0x78, 0x73d0a4\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x7c, 0x73d0a8\nADRP            X22, #off_122EFE8@PAGE                                 ; +0x80, 0x73d0ac\nLDR             X1, [X29,#0x60+var_10]; int                            ; +0x84, 0x73d0b0\nSUB             X0, X1, #0x18; p                                       ; +0x88, 0x73d0b4\nLDR             X2, [X22,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x8c, 0x73d0b8\nCMP             X0, X2                                                 ; +0x90, 0x73d0bc\nB.NE            loc_73D168                                             ; +0x94, 0x73d0c0\nLDR             W0, [X19,#0x468]; this                                 ; +0x98, 0x73d0c4\nCMP             W0, #0x3E7                                             ; +0x9c, 0x73d0c8\nB.GT            loc_73D0FC                                             ; +0xa0, 0x73d0cc\nSTRB            WZR, [X19,#0x2CC]                                      ; +0xa4, 0x73d0d0\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xa8, 0x73d0d4\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xac, 0x73d0d8\nLDR             X0, [X20]                                              ; +0xb0, 0x73d0dc\nCMP             X1, X0                                                 ; +0xb4, 0x73d0e0\nB.NE            loc_73D1BC                                             ; +0xb8, 0x73d0e4\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xbc, 0x73d0e8\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xc0, 0x73d0ec\nLDP             X23, X24, [SP,#0x60+var_30]                            ; +0xc4, 0x73d0f0\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xc8, 0x73d0f4\nRET                                                                    ; +0xcc, 0x73d0f8\nLDR             X24, [X19,#0x498]                                      ; +0xd0, 0x73d0fc\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0xd4, 0x73d100\nMOV             X2, X23                                                ; +0xd8, 0x73d104\nMOV             X1, X0; char *                                         ; +0xdc, 0x73d108\nMOV             X0, X21; int                                           ; +0xe0, 0x73d10c\nBL              sub_D153B8                                             ; +0xe4, 0x73d110\nMOV             X0, X24                                                ; +0xe8, 0x73d114\nMOV             X1, X21                                                ; +0xec, 0x73d118\nBL              _ZN15CCTextInputNode11updateLabelESs; CCTextInputNode::updateLabel(std::string) ; +0xf0, 0x73d11c\nLDR             X21, [X29,#0x60+var_10]                                ; +0xf4, 0x73d120\nLDR             X22, [X22,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0xf8, 0x73d124\nSUB             X0, X21, #0x18; p                                      ; +0xfc, 0x73d128\nCMP             X0, X22                                                ; +0x100, 0x73d12c\nB.EQ            loc_73D0D0                                             ; +0x104, 0x73d130\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x108, 0x73d134\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x10c, 0x73d138\nCBZ             X1, loc_73D1AC                                         ; +0x110, 0x73d13c\nSUB             X21, X21, #8                                           ; +0x114, 0x73d140\nLDAXR           W1, [X21]                                              ; +0x118, 0x73d144\nSUB             W2, W1, #1                                             ; +0x11c, 0x73d148\nSTLXR           W3, W2, [X21]                                          ; +0x120, 0x73d14c\nCBNZ            W3, loc_73D144                                         ; +0x124, 0x73d150\nCMP             W1, WZR                                                ; +0x128, 0x73d154\nB.GT            loc_73D0D0                                             ; +0x12c, 0x73d158\nADD             X1, X29, #0x60+var_18                                  ; +0x130, 0x73d15c\nBL              j__ZdlPv; operator delete(void *)                      ; +0x134, 0x73d160\nB               loc_73D0D0                                             ; +0x138, 0x73d164\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x13c, 0x73d168\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x140, 0x73d16c\nCBZ             X2, loc_73D19C                                         ; +0x144, 0x73d170\nSUB             X1, X1, #8                                             ; +0x148, 0x73d174\nLDAXR           W2, [X1]                                               ; +0x14c, 0x73d178\nSUB             W3, W2, #1                                             ; +0x150, 0x73d17c\nSTLXR           W4, W3, [X1]                                           ; +0x154, 0x73d180\nCBNZ            W4, loc_73D178                                         ; +0x158, 0x73d184\nCMP             W2, WZR                                                ; +0x15c, 0x73d188\nB.GT            loc_73D0C4                                             ; +0x160, 0x73d18c\nADD             X1, X29, #0x60+var_18                                  ; +0x164, 0x73d190\nBL              j__ZdlPv; operator delete(void *)                      ; +0x168, 0x73d194\nB               loc_73D0C4                                             ; +0x16c, 0x73d198\nLDUR            W2, [X1,#-8]                                           ; +0x170, 0x73d19c\nSUB             W3, W2, #1                                             ; +0x174, 0x73d1a0\nSTUR            W3, [X1,#-8]                                           ; +0x178, 0x73d1a4\nB               loc_73D188                                             ; +0x17c, 0x73d1a8\nLDUR            W1, [X21,#-8]                                          ; +0x180, 0x73d1ac\nSUB             W2, W1, #1                                             ; +0x184, 0x73d1b0\nSTUR            W2, [X21,#-8]                                          ; +0x188, 0x73d1b4\nB               loc_73D154                                             ; +0x18c, 0x73d1b8\nBL              .__stack_chk_fail                                      ; +0x190, 0x73d1bc\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x194, 0x73d1c0\nMOV             X19, X0                                                ; +0x198, 0x73d1c4\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x19c, 0x73d1c8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x1a0, 0x73d1cc\nSUB             X0, X0, #0x18                                          ; +0x1a4, 0x73d1d0\nCMP             X0, X1                                                 ; +0x1a8, 0x73d1d4\nB.NE            loc_73D1FC                                             ; +0x1ac, 0x73d1d8\nMOV             X0, X19                                                ; +0x1b0, 0x73d1dc\nBL              _Unwind_Resume                                         ; +0x1b4, 0x73d1e0\nMOV             X19, X0                                                ; +0x1b8, 0x73d1e4\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x1bc, 0x73d1e8\nLDR             X22, [X22,#0xFE8]                                      ; +0x1c0, 0x73d1ec\nSUB             X0, X0, #0x18                                          ; +0x1c4, 0x73d1f0\nCMP             X0, X22                                                ; +0x1c8, 0x73d1f4\nB.EQ            loc_73D1DC                                             ; +0x1cc, 0x73d1f8\nADD             X1, X29, #0x60+var_18                                  ; +0x1d0, 0x73d1fc\nBL              sub_73BBC8                                             ; +0x1d4, 0x73d200\nB               loc_73D1DC                                             ; +0x1d8, 0x73d204", "xrefs": ["ColorSelectPopup::init @ 0x73d7fc", "ColorSelectPopup::onUpdateCopyColor @ 0x73fdf8", "ColorSelectPopup::onToggleHSVMode @ 0x73fe24", "<???> @ 0xa6080"], "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"}