{"type": "func", "start": 3037324, "end": 3037456, "name": "CCCounterLabel::updateString", "pseudocode": "// \n// CCCounterLabel::updateString from 0x2e588c to 0x2e5910 (132 bytes)\n// \n// 2 xrefs:\n// > CCCounterLabel::updateCounter @ 0x2e598a\n// > CCCounterLabel::fastUpdateCounter @ 0x2e599c\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 CCCounterLabel::updateString(CCCounterLabel *a1)\n{\n  const char *v1; // r1\n  cocos2d::CCString *v3; // r0\n  void (__fastcall *setString)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r6\n  const char *CString; // r0\n  void (__fastcall *v6)(cocos2d::CCLabelBMFont *__hidden, const unsigned __int8 *); // r7\n  CCCounterLabel *v7; // [sp+0h] [bp-Ch] BYREF\n\n  v7 = a1;\n  if ( a1->m_formatterType == 1 )\n  {\n    v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"%.2f\",\n                                v1,\n                                (float)((float)a1->m_currentCount / 100.0));\n    setString = a1->setString;\n    CString = cocos2d::CCString::getCString(v3);\n    setString(a1, (const unsigned __int8 *)CString);\n  }\n  else\n  {\n    v6 = a1->setString;\n    GameToolbox::intToString((GameToolbox *)&v7, a1->m_currentCount);\n    v6(a1, (const unsigned __int8 *)v7);\n    sub_774008(&v7);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateString from 0x2e588c to 0x2e5910 (132 bytes)\n; \n; 2 xrefs:\n; > CCCounterLabel::updateCounter @ 0x2e598a\n; > CCCounterLabel::fastUpdateCounter @ 0x2e599c\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x2E5894)                ; +0x0, 0x2e588c\nPUSH            {R0-R2,R4-R7,LR}                                       ; +0x2, 0x2e588e\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x2e5890\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x2e5892\nMOV             R4, R0                                                 ; +0x8, 0x2e5894\nLDR             R2, [R3]                                               ; +0xa, 0x2e5896\nMOV             R5, R3                                                 ; +0xc, 0x2e5898\nSTR             R2, [SP,#0xC+var_8]                                    ; +0xe, 0x2e589a\nLDR.W           R2, [R0,#0x184]                                        ; +0x10, 0x2e589c\nCMP             R2, #1                                                 ; +0x14, 0x2e58a0\nBNE             loc_2E58D6                                             ; +0x16, 0x2e58a2\nVLDR            S15, [R0,#0x174]                                       ; +0x18, 0x2e58a4\nLDR             R0, =(a2f - 0x2E58B2); \"%.2f\"                          ; +0x1c, 0x2e58a8\nVLDR            S14, =100.0                                            ; +0x1e, 0x2e58aa\nADD             R0, PC; \"%.2f\"                                         ; +0x22, 0x2e58ae\nVCVT.F32.S32    S15, S15                                               ; +0x24, 0x2e58b0\nVDIV.F32        S15, S15, S14                                          ; +0x28, 0x2e58b4\nVCVT.F64.F32    D7, S15                                                ; +0x2c, 0x2e58b8\nVMOV            R2, R3, D7                                             ; +0x30, 0x2e58bc\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x34, 0x2e58c0\nLDR             R3, [R4]                                               ; +0x38, 0x2e58c4\nLDR.W           R6, [R3,#0x1C8]                                        ; +0x3a, 0x2e58c6\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x3e, 0x2e58ca\nMOV             R1, R0                                                 ; +0x42, 0x2e58ce\nMOV             R0, R4                                                 ; +0x44, 0x2e58d0\nBLX             R6                                                     ; +0x46, 0x2e58d2\nB               loc_2E5900                                             ; +0x48, 0x2e58d4\nLDR             R3, [R0]                                               ; +0x4a, 0x2e58d6\nMOV             R0, SP; this                                           ; +0x4c, 0x2e58d8\nLDR.W           R1, [R4,#0x174]; int                                   ; +0x4e, 0x2e58da\nMOV             R6, SP                                                 ; +0x52, 0x2e58de\nLDR.W           R7, [R3,#0x1C8]                                        ; +0x54, 0x2e58e0\nBL              _ZN11GameToolbox11intToStringEi; GameToolbox::intToString(int) ; +0x58, 0x2e58e4\nMOV             R0, R4                                                 ; +0x5c, 0x2e58e8\nLDR             R1, [SP,#0xC+var_C]                                    ; +0x5e, 0x2e58ea\nBLX             R7                                                     ; +0x60, 0x2e58ec\nMOV             R0, SP                                                 ; +0x62, 0x2e58ee\nBL              sub_774008                                             ; +0x64, 0x2e58f0\nB               loc_2E5900                                             ; +0x68, 0x2e58f4\nMOV             R0, R6                                                 ; +0x6a, 0x2e58f6\nBL              sub_774008                                             ; +0x6c, 0x2e58f8\nBL              __cxa_end_cleanup                                      ; +0x70, 0x2e58fc\nLDR             R2, [SP,#0xC+var_8]                                    ; +0x74, 0x2e5900\nLDR             R3, [R5]                                               ; +0x76, 0x2e5902\nCMP             R2, R3                                                 ; +0x78, 0x2e5904\nBEQ             loc_2E590C                                             ; +0x7a, 0x2e5906\nBLX             __stack_chk_fail                                       ; +0x7c, 0x2e5908\nADD             SP, SP, #0xC                                           ; +0x80, 0x2e590c\nPOP             {R4-R7,PC}                                             ; +0x82, 0x2e590e", "xrefs": ["CCCounterLabel::updateCounter @ 0x2e598a", "CCCounterLabel::fastUpdateCounter @ 0x2e599c"], "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"}