{"type": "func", "start": 4040756, "end": 4040918, "name": "ColorSelectPopup::updateCopyColorTextInputLabel", "pseudocode": "// \n// ColorSelectPopup::updateCopyColorTextInputLabel from 0x3da834 to 0x3da8d6 (162 bytes)\n// \n// 3 xrefs:\n// > ColorSelectPopup::init @ 0x3dc3ba\n// > ColorSelectPopup::onUpdateCopyColor @ 0x3dc704\n// > ColorSelectPopup::onToggleHSVMode @ 0x3dc71e\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; // r1\n  cocos2d::CCString *v3; // r0\n  char *CString; // r1\n  CCTextInputNode *m_copyColorInput; // 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_copyColorID = (const char *)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 >= 1000 )\n    CString = \"0\";\n  m_copyColorInput = a1->m_copyColorInput;\n  sub_776584((int)&v10, CString);\n  CCTextInputNode::setString((int)m_copyColorInput, (char *)&v10, v6);\n  sub_774008(&v10);\n  v7 = a1->m_copyColorID;\n  if ( v7 >= 1000 )\n  {\n    v8 = a1->m_copyColorInput;\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::updateCopyColorTextInputLabel from 0x3da834 to 0x3da8d6 (162 bytes)\n; \n; 3 xrefs:\n; > ColorSelectPopup::init @ 0x3dc3ba\n; > ColorSelectPopup::onUpdateCopyColor @ 0x3dc704\n; > ColorSelectPopup::onToggleHSVMode @ 0x3dc71e\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, 0x3da834\nMOV             R5, R0                                                 ; +0x4, 0x3da838\nLDR             R6, =(__stack_chk_guard_ptr - 0x3DA844)                ; +0x6, 0x3da83a\nLDR.W           R1, [R5,#0x308]; char *                                ; +0x8, 0x3da83c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xc, 0x3da840\nLDR             R6, [R6]; __stack_chk_guard                            ; +0xe, 0x3da842\nLDR             R3, [R6]                                               ; +0x10, 0x3da844\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x12, 0x3da846\nMOVS            R3, #1                                                 ; +0x14, 0x3da848\nSTRB.W          R3, [R0,#0x220]                                        ; +0x16, 0x3da84a\nLDR             R0, =(aI - 0x3DA854); \"%i\"                             ; +0x1a, 0x3da84e\nADD             R0, PC; \"%i\"                                           ; +0x1c, 0x3da850\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x1e, 0x3da852\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x22, 0x3da856\nLDR.W           R3, [R5,#0x308]                                        ; +0x26, 0x3da85a\nCMP.W           R3, #0x3E8                                             ; +0x2a, 0x3da85e\nMOV             R1, R0                                                 ; +0x2e, 0x3da862\nBLT             loc_3DA86A                                             ; +0x30, 0x3da864\nLDR             R1, =(a0 - 0x3DA86C); \"0\"                              ; +0x32, 0x3da866\nADD             R1, PC; \"0\"                                            ; +0x34, 0x3da868\nLDR.W           R8, [R5,#0x32C]                                        ; +0x36, 0x3da86a\nADD             R4, SP, #0x10+var_8                                    ; +0x3a, 0x3da86e\nADD             R7, SP, #0x10+var_C                                    ; +0x3c, 0x3da870\nMOV             R0, R4; int                                            ; +0x3e, 0x3da872\nMOV             R2, R7                                                 ; +0x40, 0x3da874\nBL              sub_776584                                             ; +0x42, 0x3da876\nMOV             R0, R8                                                 ; +0x46, 0x3da87a\nMOV             R1, R4                                                 ; +0x48, 0x3da87c\nBL              _ZN15CCTextInputNode9setStringESs; CCTextInputNode::setString(std::string) ; +0x4a, 0x3da87e\nMOV             R0, R4                                                 ; +0x4e, 0x3da882\nBL              sub_774008                                             ; +0x50, 0x3da884\nLDR.W           R0, [R5,#0x308]; this                                  ; +0x54, 0x3da888\nCMP.W           R0, #0x3E8                                             ; +0x58, 0x3da88c\nBLT             loc_3DA8B2                                             ; +0x5c, 0x3da890\nLDR.W           R8, [R5,#0x32C]                                        ; +0x5e, 0x3da892\nBL              _ZN20GJSpecialColorSelect15textForColorIdxEi; GJSpecialColorSelect::textForColorIdx(int) ; +0x62, 0x3da896\nMOV             R2, R7                                                 ; +0x66, 0x3da89a\nMOV             R1, R0; char *                                         ; +0x68, 0x3da89c\nMOV             R0, R4; int                                            ; +0x6a, 0x3da89e\nBL              sub_776584                                             ; +0x6c, 0x3da8a0\nMOV             R0, R8                                                 ; +0x70, 0x3da8a4\nMOV             R1, R4                                                 ; +0x72, 0x3da8a6\nBL              _ZN15CCTextInputNode11updateLabelESs; CCTextInputNode::updateLabel(std::string) ; +0x74, 0x3da8a8\nMOV             R0, R4                                                 ; +0x78, 0x3da8ac\nBL              sub_774008                                             ; +0x7a, 0x3da8ae\nMOVS            R3, #0                                                 ; +0x7e, 0x3da8b2\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x80, 0x3da8b4\nSTRB.W          R3, [R5,#0x220]                                        ; +0x82, 0x3da8b6\nLDR             R3, [R6]                                               ; +0x86, 0x3da8ba\nCMP             R2, R3                                                 ; +0x88, 0x3da8bc\nBEQ             loc_3DA8D0                                             ; +0x8a, 0x3da8be\nBLX             __stack_chk_fail                                       ; +0x8c, 0x3da8c0\nB               loc_3DA8C6                                             ; +0x90, 0x3da8c4\nMOV             R0, R4                                                 ; +0x92, 0x3da8c6\nBL              sub_774008                                             ; +0x94, 0x3da8c8\nBL              __cxa_end_cleanup                                      ; +0x98, 0x3da8cc\nADD             SP, SP, #0x10                                          ; +0x9c, 0x3da8d0\nPOP.W           {R4-R8,PC}                                             ; +0x9e, 0x3da8d2", "xrefs": ["ColorSelectPopup::init @ 0x3dc3ba", "ColorSelectPopup::onUpdateCopyColor @ 0x3dc704", "ColorSelectPopup::onToggleHSVMode @ 0x3dc71e"], "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"}