{"type": "func", "start": 4039900, "end": 4040062, "name": "ColorSelectPopup::updateTextInputLabel", "pseudocode": "// \n// ColorSelectPopup::updateTextInputLabel from 0x3da4dc to 0x3da57e (162 bytes)\n// \n// 2 xrefs:\n// > ColorSelectPopup::onUpdateCustomColor @ 0x3da5dc\n// > ColorSelectPopup::init @ 0x3dbbca\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; // r1\n  cocos2d::CCString *v3; // r0\n  char *CString; // r1\n  CCTextInputNode *m_colorInput; // r8\n  char *v6; // r2\n  int v7; // r0\n  CCTextInputNode *v8; // r8\n  char *v9; // r0\n  char *v10; // [sp+8h] [bp-8h] BYREF\n\n  m_colorID = (const char *)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 >= 1000 )\n    CString = \"0\";\n  m_colorInput = a1->m_colorInput;\n  sub_776584((int)&v10, CString);\n  CCTextInputNode::setString((int)m_colorInput, (char *)&v10, v6);\n  sub_774008(&v10);\n  v7 = a1->m_colorID;\n  if ( v7 >= 1000 )\n  {\n    v8 = a1->m_colorInput;\n    v9 = (char *)GJSpecialColorSelect::textForColorIdx(v7);\n    sub_776584((int)&v10, v9);\n    CCTextInputNode::updateLabel((int)v8, &v10);\n    sub_774008(&v10);\n  }\n  a1->m_disableTextDelegate = 0;\n}", "assembly": "; \n; ColorSelectPopup::updateTextInputLabel from 0x3da4dc to 0x3da57e (162 bytes)\n; \n; 2 xrefs:\n; > ColorSelectPopup::onUpdateCustomColor @ 0x3da5dc\n; > ColorSelectPopup::init @ 0x3dbbca\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.W          {R0-R8,LR}                                             ; +0x0, 0x3da4dc\nMOV             R5, R0                                                 ; +0x4, 0x3da4e0\nLDR             R6, =(__stack_chk_guard_ptr - 0x3DA4EC)                ; +0x6, 0x3da4e2\nLDR.W           R1, [R5,#0x300]; char *                                ; +0x8, 0x3da4e4\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x3da4e8\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x3da4ea\nLDR             R3, [R6]                                               ; +0x10, 0x3da4ec\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x12, 0x3da4ee\nMOVS            R3, #1                                                 ; +0x14, 0x3da4f0\nSTRB.W          R3, [R0,#0x220]                                        ; +0x16, 0x3da4f2\nLDR             R0, =(aI - 0x3DA4FC); \"%i\"                             ; +0x1a, 0x3da4f6\nADD             R0, PC; \"%i\"                                           ; +0x1c, 0x3da4f8\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x1e, 0x3da4fa\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x22, 0x3da4fe\nLDR.W           R3, [R5,#0x300]                                        ; +0x26, 0x3da502\nCMP.W           R3, #0x3E8                                             ; +0x2a, 0x3da506\nMOV             R1, R0                                                 ; +0x2e, 0x3da50a\nBLT             loc_3DA512                                             ; +0x30, 0x3da50c\nLDR             R1, =(a0 - 0x3DA514); \"0\"                              ; +0x32, 0x3da50e\nADD             R1, PC; \"0\"                                            ; +0x34, 0x3da510\nLDR.W           R8, [R5,#0x2F4]                                        ; +0x36, 0x3da512\nADD             R4, SP, #0x10+var_8                                    ; +0x3a, 0x3da516\nADD             R7, SP, #0x10+var_C                                    ; +0x3c, 0x3da518\nMOV             R0, R4; int                                            ; +0x3e, 0x3da51a\nMOV             R2, R7                                                 ; +0x40, 0x3da51c\nBL              sub_776584                                             ; +0x42, 0x3da51e\nMOV             R0, R8                                                 ; +0x46, 0x3da522\nMOV             R1, R4                                                 ; +0x48, 0x3da524\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x4a, 0x3da526\nMOV             R0, R4                                                 ; +0x4e, 0x3da52a\nBL              sub_774008                                             ; +0x50, 0x3da52c\nLDR.W           R0, [R5,#0x300]; this                                  ; +0x54, 0x3da530\nCMP.W           R0, #0x3E8                                             ; +0x58, 0x3da534\nBLT             loc_3DA55A                                             ; +0x5c, 0x3da538\nLDR.W           R8, [R5,#0x2F4]                                        ; +0x5e, 0x3da53a\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x62, 0x3da53e\nMOV             R2, R7                                                 ; +0x66, 0x3da542\nMOV             R1, R0; char *                                         ; +0x68, 0x3da544\nMOV             R0, R4; int                                            ; +0x6a, 0x3da546\nBL              sub_776584                                             ; +0x6c, 0x3da548\nMOV             R0, R8                                                 ; +0x70, 0x3da54c\nMOV             R1, R4                                                 ; +0x72, 0x3da54e\nBL              _ZN15CCTextInputNode11updateLabelESs; CCTextInputNode::updateLabel(std::string) ; +0x74, 0x3da550\nMOV             R0, R4                                                 ; +0x78, 0x3da554\nBL              sub_774008                                             ; +0x7a, 0x3da556\nMOVS            R3, #0                                                 ; +0x7e, 0x3da55a\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x80, 0x3da55c\nSTRB.W          R3, [R5,#0x220]                                        ; +0x82, 0x3da55e\nLDR             R3, [R6]                                               ; +0x86, 0x3da562\nCMP             R2, R3                                                 ; +0x88, 0x3da564\nBEQ             loc_3DA578                                             ; +0x8a, 0x3da566\nBLX             __stack_chk_fail                                       ; +0x8c, 0x3da568\nB               loc_3DA56E                                             ; +0x90, 0x3da56c\nMOV             R0, R4                                                 ; +0x92, 0x3da56e\nBL              sub_774008                                             ; +0x94, 0x3da570\nBL              __cxa_end_cleanup                                      ; +0x98, 0x3da574\nADD             SP, SP, #0x10                                          ; +0x9c, 0x3da578\nPOP.W           {R4-R8,PC}                                             ; +0x9e, 0x3da57a", "xrefs": ["ColorSelectPopup::onUpdateCustomColor @ 0x3da5dc", "ColorSelectPopup::init @ 0x3dbbca"], "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"}