{"type": "func", "start": 7587988, "end": 7588464, "name": "ColorSelectPopup::updateTextInputLabel", "pseudocode": "// \n// ColorSelectPopup::updateTextInputLabel from 0x73c894 to 0x73ca70 (476 bytes)\n// \n// 3 xrefs:\n// > ColorSelectPopup::onUpdateCustomColor @ 0x73cae4\n// > ColorSelectPopup::init @ 0x73eb8c\n// > <???> @ 0x72408\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::updateTextInputLabel(ColorSelectPopup *a1)\n{\n  const char *m_colorID; // x1\n  cocos2d::CCString *v3; // x0\n  char *CString; // x1\n  CCTextInputNode *m_colorInput; // 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_colorID = (const char *)(unsigned int)a1->m_colorID;\n  a1->m_disableTextDelegate = 1;\n  v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)\"%i\", m_colorID);\n  CString = (char *)cocos2d::CCString::getCString(v3);\n  if ( a1->m_colorID > 999 )\n    CString = \"0\";\n  m_colorInput = a1->m_colorInput;\n  sub_D153B8((int)v15, CString);\n  CCTextInputNode::setString(m_colorInput, (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_colorID;\n  if ( v7 > 999 )\n  {\n    v8 = a1->m_colorInput;\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::updateTextInputLabel from 0x73c894 to 0x73ca70 (476 bytes)\n; \n; 3 xrefs:\n; > ColorSelectPopup::onUpdateCustomColor @ 0x73cae4\n; > ColorSelectPopup::init @ 0x73eb8c\n; > <???> @ 0x72408\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, 0x73c894\nMOV             W3, #1                                                 ; +0x4, 0x73c898\nMOV             X29, SP                                                ; +0x8, 0x73c89c\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0xc, 0x73c8a0\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x73c8a4\nMOV             X19, X0                                                ; +0x14, 0x73c8a8\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x18, 0x73c8ac\nSTP             X23, X24, [SP,#0x60+var_30]                            ; +0x1c, 0x73c8b0\nLDR             X2, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x73c8b4\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x24, 0x73c8b8\nLDR             W1, [X19,#0x460]; char *                               ; +0x28, 0x73c8bc\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x2c, 0x73c8c0\nSTRB            W3, [X19,#0x2CC]                                       ; +0x30, 0x73c8c4\nLDR             X2, [X2]                                               ; +0x34, 0x73c8c8\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x38, 0x73c8cc\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x3c, 0x73c8d0\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x40, 0x73c8d4\nMOV             X1, X0                                                 ; +0x44, 0x73c8d8\nLDR             W0, [X19,#0x460]                                       ; +0x48, 0x73c8dc\nCMP             W0, #0x3E7                                             ; +0x4c, 0x73c8e0\nB.LE            loc_73C8F0                                             ; +0x50, 0x73c8e4\nADRL            X1, (aAssertionFaile_0+0x48); char *                   ; +0x54, 0x73c8e8\nADD             X21, X29, #0x60+var_10                                 ; +0x5c, 0x73c8f0\nADD             X23, X29, #0x60+var_20                                 ; +0x60, 0x73c8f4\nMOV             X0, X21; int                                           ; +0x64, 0x73c8f8\nMOV             X2, X23                                                ; +0x68, 0x73c8fc\nLDR             X22, [X19,#0x450]                                      ; +0x6c, 0x73c900\nBL              sub_D153B8                                             ; +0x70, 0x73c904\nMOV             X0, X22                                                ; +0x74, 0x73c908\nMOV             X1, X21                                                ; +0x78, 0x73c90c\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x7c, 0x73c910\nADRP            X22, #off_122EFE8@PAGE                                 ; +0x80, 0x73c914\nLDR             X1, [X29,#0x60+var_10]; int                            ; +0x84, 0x73c918\nSUB             X0, X1, #0x18; p                                       ; +0x88, 0x73c91c\nLDR             X2, [X22,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0x8c, 0x73c920\nCMP             X0, X2                                                 ; +0x90, 0x73c924\nB.NE            loc_73C9D0                                             ; +0x94, 0x73c928\nLDR             W0, [X19,#0x460]; this                                 ; +0x98, 0x73c92c\nCMP             W0, #0x3E7                                             ; +0x9c, 0x73c930\nB.GT            loc_73C964                                             ; +0xa0, 0x73c934\nSTRB            WZR, [X19,#0x2CC]                                      ; +0xa4, 0x73c938\nLDR             X1, [X29,#0x60+var_8]                                  ; +0xa8, 0x73c93c\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xac, 0x73c940\nLDR             X0, [X20]                                              ; +0xb0, 0x73c944\nCMP             X1, X0                                                 ; +0xb4, 0x73c948\nB.NE            loc_73CA24                                             ; +0xb8, 0x73c94c\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xbc, 0x73c950\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xc0, 0x73c954\nLDP             X23, X24, [SP,#0x60+var_30]                            ; +0xc4, 0x73c958\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xc8, 0x73c95c\nRET                                                                    ; +0xcc, 0x73c960\nLDR             X24, [X19,#0x450]                                      ; +0xd0, 0x73c964\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0xd4, 0x73c968\nMOV             X2, X23                                                ; +0xd8, 0x73c96c\nMOV             X1, X0; char *                                         ; +0xdc, 0x73c970\nMOV             X0, X21; int                                           ; +0xe0, 0x73c974\nBL              sub_D153B8                                             ; +0xe4, 0x73c978\nMOV             X0, X24                                                ; +0xe8, 0x73c97c\nMOV             X1, X21                                                ; +0xec, 0x73c980\nBL              _ZN15CCTextInputNode11updateLabelESs; CCTextInputNode::updateLabel(std::string) ; +0xf0, 0x73c984\nLDR             X21, [X29,#0x60+var_10]                                ; +0xf4, 0x73c988\nLDR             X22, [X22,#off_122EFE8@PAGEOFF]; qword_124B6B0         ; +0xf8, 0x73c98c\nSUB             X0, X21, #0x18; p                                      ; +0xfc, 0x73c990\nCMP             X0, X22                                                ; +0x100, 0x73c994\nB.EQ            loc_73C938                                             ; +0x104, 0x73c998\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x108, 0x73c99c\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x10c, 0x73c9a0\nCBZ             X1, loc_73CA14                                         ; +0x110, 0x73c9a4\nSUB             X21, X21, #8                                           ; +0x114, 0x73c9a8\nLDAXR           W1, [X21]                                              ; +0x118, 0x73c9ac\nSUB             W2, W1, #1                                             ; +0x11c, 0x73c9b0\nSTLXR           W3, W2, [X21]                                          ; +0x120, 0x73c9b4\nCBNZ            W3, loc_73C9AC                                         ; +0x124, 0x73c9b8\nCMP             W1, WZR                                                ; +0x128, 0x73c9bc\nB.GT            loc_73C938                                             ; +0x12c, 0x73c9c0\nADD             X1, X29, #0x60+var_18                                  ; +0x130, 0x73c9c4\nBL              j__ZdlPv; operator delete(void *)                      ; +0x134, 0x73c9c8\nB               loc_73C938                                             ; +0x138, 0x73c9cc\nADRP            X2, #pthread_create_ptr_0@PAGE                         ; +0x13c, 0x73c9d0\nLDR             X2, [X2,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x140, 0x73c9d4\nCBZ             X2, loc_73CA04                                         ; +0x144, 0x73c9d8\nSUB             X1, X1, #8                                             ; +0x148, 0x73c9dc\nLDAXR           W2, [X1]                                               ; +0x14c, 0x73c9e0\nSUB             W3, W2, #1                                             ; +0x150, 0x73c9e4\nSTLXR           W4, W3, [X1]                                           ; +0x154, 0x73c9e8\nCBNZ            W4, loc_73C9E0                                         ; +0x158, 0x73c9ec\nCMP             W2, WZR                                                ; +0x15c, 0x73c9f0\nB.GT            loc_73C92C                                             ; +0x160, 0x73c9f4\nADD             X1, X29, #0x60+var_18                                  ; +0x164, 0x73c9f8\nBL              j__ZdlPv; operator delete(void *)                      ; +0x168, 0x73c9fc\nB               loc_73C92C                                             ; +0x16c, 0x73ca00\nLDUR            W2, [X1,#-8]                                           ; +0x170, 0x73ca04\nSUB             W3, W2, #1                                             ; +0x174, 0x73ca08\nSTUR            W3, [X1,#-8]                                           ; +0x178, 0x73ca0c\nB               loc_73C9F0                                             ; +0x17c, 0x73ca10\nLDUR            W1, [X21,#-8]                                          ; +0x180, 0x73ca14\nSUB             W2, W1, #1                                             ; +0x184, 0x73ca18\nSTUR            W2, [X21,#-8]                                          ; +0x188, 0x73ca1c\nB               loc_73C9BC                                             ; +0x18c, 0x73ca20\nBL              .__stack_chk_fail                                      ; +0x190, 0x73ca24\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x194, 0x73ca28\nMOV             X19, X0                                                ; +0x198, 0x73ca2c\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x19c, 0x73ca30\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x1a0, 0x73ca34\nSUB             X0, X0, #0x18                                          ; +0x1a4, 0x73ca38\nCMP             X0, X1                                                 ; +0x1a8, 0x73ca3c\nB.NE            loc_73CA64                                             ; +0x1ac, 0x73ca40\nMOV             X0, X19                                                ; +0x1b0, 0x73ca44\nBL              _Unwind_Resume                                         ; +0x1b4, 0x73ca48\nMOV             X19, X0                                                ; +0x1b8, 0x73ca4c\nLDR             X0, [X29,#0x60+var_10]                                 ; +0x1bc, 0x73ca50\nLDR             X22, [X22,#0xFE8]                                      ; +0x1c0, 0x73ca54\nSUB             X0, X0, #0x18                                          ; +0x1c4, 0x73ca58\nCMP             X0, X22                                                ; +0x1c8, 0x73ca5c\nB.EQ            loc_73CA44                                             ; +0x1cc, 0x73ca60\nADD             X1, X29, #0x60+var_18                                  ; +0x1d0, 0x73ca64\nBL              sub_73BBC8                                             ; +0x1d4, 0x73ca68\nB               loc_73CA44                                             ; +0x1d8, 0x73ca6c", "xrefs": ["ColorSelectPopup::onUpdateCustomColor @ 0x73cae4", "ColorSelectPopup::init @ 0x73eb8c", "<???> @ 0x72408"], "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"}