{"type": "func", "start": 8655004, "end": 8655288, "name": "CustomizeObjectLayer::updateCustomColorLabels", "pseudocode": "// \n// CustomizeObjectLayer::updateCustomColorLabels from 0x84109c to 0x8411b8 (284 bytes)\n// \n// 6 xrefs:\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x841634\n// > CustomizeObjectLayer::colorSetupClosed @ 0x841858\n// > CustomizeObjectLayer::onNextColorChannel @ 0x8418e4\n// > CustomizeObjectLayer::updateCurrentSelection @ 0x841968\n// > CustomizeObjectLayer::init @ 0x842edc\n// > <???> @ 0x53d48\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 CustomizeObjectLayer::updateCustomColorLabels(CustomizeObjectLayer *a1)\n{\n  cocos2d::CCString *v2; // x0\n  char *CString; // x22\n  CCTextInputNode *m_customColorInput; // x21\n  unsigned __int8 *v5; // x0\n  unsigned int *v6; // x2\n  int v7; // w1\n  const unsigned __int8 *v8; // [xsp+40h] [xbp+40h] BYREF\n\n  v2 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                              (cocos2d::CCString *)\"%i\",\n                              (const char *)(unsigned int)a1->m_customColorChannel);\n  CString = (char *)cocos2d::CCString::getCString(v2);\n  ButtonSprite::setString(a1->m_customColorButtonSprite, CString);\n  m_customColorInput = a1->m_customColorInput;\n  sub_D153B8((int)&v8, CString);\n  CCTextInputNode::setString(m_customColorInput, &v8);\n  v5 = (unsigned __int8 *)(v8 - 24);\n  if ( v8 - 24 != (const unsigned __int8 *)&qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v6 = (unsigned int *)(v8 - 8);\n      do\n        v7 = __ldaxr(v6);\n      while ( __stlxr(v7 - 1, v6) );\n    }\n    else\n    {\n      v7 = *((_DWORD *)v8 - 2);\n      *((_DWORD *)v8 - 2) = v7 - 1;\n    }\n    if ( v7 <= 0 )\n      operator delete(v5);\n  }\n}", "assembly": "; \n; CustomizeObjectLayer::updateCustomColorLabels from 0x84109c to 0x8411b8 (284 bytes)\n; \n; 6 xrefs:\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x841634\n; > CustomizeObjectLayer::colorSetupClosed @ 0x841858\n; > CustomizeObjectLayer::onNextColorChannel @ 0x8418e4\n; > CustomizeObjectLayer::updateCurrentSelection @ 0x841968\n; > CustomizeObjectLayer::init @ 0x842edc\n; > <???> @ 0x53d48\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_50]!                                ; +0x0, 0x84109c\nMOV             X29, SP                                                ; +0x4, 0x8410a0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x8410a4\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8410a8\nADD             X20, X29, #0x50+var_10                                 ; +0x10, 0x8410ac\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x14, 0x8410b0\nMOV             X21, X0                                                ; +0x18, 0x8410b4\nADRP            X0, #(aSongidI+8)@PAGE; \"%i\"                           ; +0x1c, 0x8410b8\nLDR             X2, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0x8410bc\nADD             X0, X0, #(aSongidI+8)@PAGEOFF; this                    ; +0x24, 0x8410c0\nLDR             W1, [X21,#0x2D4]; char *                               ; +0x28, 0x8410c4\nLDR             X2, [X2]                                               ; +0x2c, 0x8410c8\nSTR             X2, [X29,#0x50+var_8]                                  ; +0x30, 0x8410cc\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x34, 0x8410d0\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x38, 0x8410d4\nMOV             X22, X0                                                ; +0x3c, 0x8410d8\nLDR             X0, [X21,#0x340]; this                                 ; +0x40, 0x8410dc\nMOV             X1, X22; char *                                        ; +0x44, 0x8410e0\nBL              _ZN12ButtonSprite9setStringEPKc; ButtonSprite::setString(char const*) ; +0x48, 0x8410e4\nLDR             X21, [X21,#0x318]                                      ; +0x4c, 0x8410e8\nMOV             X0, X20; int                                           ; +0x50, 0x8410ec\nMOV             X1, X22; char *                                        ; +0x54, 0x8410f0\nADD             X2, X29, #0x50+var_20                                  ; +0x58, 0x8410f4\nBL              sub_D153B8                                             ; +0x5c, 0x8410f8\nMOV             X0, X21                                                ; +0x60, 0x8410fc\nMOV             X1, X20                                                ; +0x64, 0x841100\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x68, 0x841104\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x6c, 0x841108\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x70, 0x84110c\nSUB             X0, X2, #0x18; p                                       ; +0x74, 0x841110\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x78, 0x841114\nCMP             X0, X1                                                 ; +0x7c, 0x841118\nB.NE            loc_841144                                             ; +0x80, 0x84111c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x84, 0x841120\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x88, 0x841124\nLDR             X0, [X19]                                              ; +0x8c, 0x841128\nCMP             X1, X0                                                 ; +0x90, 0x84112c\nB.NE            loc_841188                                             ; +0x94, 0x841130\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x98, 0x841134\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0x9c, 0x841138\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xa0, 0x84113c\nRET                                                                    ; +0xa4, 0x841140\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xa8, 0x841144\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xac, 0x841148\nCBZ             X1, loc_841178                                         ; +0xb0, 0x84114c\nSUB             X2, X2, #8                                             ; +0xb4, 0x841150\nLDAXR           W1, [X2]                                               ; +0xb8, 0x841154\nSUB             W3, W1, #1                                             ; +0xbc, 0x841158\nSTLXR           W4, W3, [X2]                                           ; +0xc0, 0x84115c\nCBNZ            W4, loc_841154                                         ; +0xc4, 0x841160\nCMP             W1, WZR                                                ; +0xc8, 0x841164\nB.GT            loc_841120                                             ; +0xcc, 0x841168\nADD             X1, X29, #0x50+var_18                                  ; +0xd0, 0x84116c\nBL              j__ZdlPv; operator delete(void *)                      ; +0xd4, 0x841170\nB               loc_841120                                             ; +0xd8, 0x841174\nLDUR            W1, [X2,#-8]                                           ; +0xdc, 0x841178\nSUB             W3, W1, #1                                             ; +0xe0, 0x84117c\nSTUR            W3, [X2,#-8]                                           ; +0xe4, 0x841180\nB               loc_841164                                             ; +0xe8, 0x841184\nBL              .__stack_chk_fail                                      ; +0xec, 0x841188\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xf0, 0x84118c\nMOV             X19, X0                                                ; +0xf4, 0x841190\nLDR             X0, [X29,#0x50+var_10]                                 ; +0xf8, 0x841194\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xfc, 0x841198\nSUB             X0, X0, #0x18                                          ; +0x100, 0x84119c\nCMP             X0, X1                                                 ; +0x104, 0x8411a0\nB.EQ            loc_8411B0                                             ; +0x108, 0x8411a4\nADD             X1, X29, #0x50+var_18                                  ; +0x10c, 0x8411a8\nBL              sub_4DC220                                             ; +0x110, 0x8411ac\nMOV             X0, X19                                                ; +0x114, 0x8411b0\nBL              _Unwind_Resume                                         ; +0x118, 0x8411b4", "xrefs": ["CustomizeObjectLayer::onUpdateCustomColor @ 0x841634", "CustomizeObjectLayer::colorSetupClosed @ 0x841858", "CustomizeObjectLayer::onNextColorChannel @ 0x8418e4", "CustomizeObjectLayer::updateCurrentSelection @ 0x841968", "CustomizeObjectLayer::init @ 0x842edc", "<???> @ 0x53d48"], "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"}