{"type": "func", "start": 3954124, "end": 3954280, "name": "CCCounterLabel::updateString", "pseudocode": "// \n// CCCounterLabel::updateString from 0x3c55cc to 0x3c5668 (156 bytes)\n// \n// 2 xrefs:\n// > CCCounterLabel::updateCounter @ 0x3c56e2\n// > CCCounterLabel::fastUpdateCounter @ 0x3c56f4\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:46:34 +0000\n// \n\nvoid __fastcall CCCounterLabel::updateString(CCCounterLabel *this, const char *a2)\n{\n  cocos2d::CCString *v3; // r0\n  void (__fastcall *v4)(CCCounterLabel *, int); // r6\n  int CString; // r0\n  void (__fastcall *v6)(CCCounterLabel *, char *); // r7\n  char v7; // r6\n  char *v8; // r1\n  char v9; // [sp+0h] [bp-14h] BYREF\n  char v10; // [sp+1h] [bp-13h] BYREF\n  void *v11; // [sp+8h] [bp-Ch]\n\n  if ( *((_DWORD *)this + 101) == 1 )\n  {\n    v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"%.2f\",\n                                a2,\n                                (float)((float)*((int *)this + 97) / 100.0));\n    v4 = *(void (__fastcall **)(CCCounterLabel *, int))(*(_DWORD *)this + 464);\n    CString = cocos2d::CCString::getCString(v3);\n    v4(this, CString);\n  }\n  else\n  {\n    v6 = *(void (__fastcall **)(CCCounterLabel *, char *))(*(_DWORD *)this + 464);\n    GameToolbox::intToString((GameToolbox *)&v9, *((_DWORD *)this + 97));\n    v7 = v9;\n    if ( (v9 & 1) != 0 )\n      v8 = (char *)v11;\n    else\n      v8 = &v10;\n    v6(this, v8);\n    if ( (v7 & 1) != 0 )\n      operator delete(v11);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateString from 0x3c55cc to 0x3c5668 (156 bytes)\n; \n; 2 xrefs:\n; > CCCounterLabel::updateCounter @ 0x3c56e2\n; > CCCounterLabel::fastUpdateCounter @ 0x3c56f4\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:46:34 +0000\n; \nLDR             R3, =(__stack_chk_guard_ptr - 0x3C55D4)                ; +0x0, 0x3c55cc\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x3c55ce\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x3c55d0\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x3c55d2\nSUB             SP, SP, #0x14                                          ; +0x8, 0x3c55d4\nMOV             R4, R0                                                 ; +0xa, 0x3c55d6\nLDR             R2, [R3]                                               ; +0xc, 0x3c55d8\nMOV             R5, R3                                                 ; +0xe, 0x3c55da\nSTR             R2, [SP,#0x14+var_8]                                   ; +0x10, 0x3c55dc\nLDR.W           R2, [R0,#0x194]                                        ; +0x12, 0x3c55de\nCMP             R2, #1                                                 ; +0x16, 0x3c55e2\nBNE             loc_3C5618                                             ; +0x18, 0x3c55e4\nVLDR            S15, [R0,#0x184]                                       ; +0x1a, 0x3c55e6\nLDR             R0, =(a2f - 0x3C55F4); \"%.2f\"                          ; +0x1e, 0x3c55ea\nVLDR            S14, =100.0                                            ; +0x20, 0x3c55ec\nADD             R0, PC; \"%.2f\"                                         ; +0x24, 0x3c55f0\nVCVT.F32.S32    S15, S15                                               ; +0x26, 0x3c55f2\nVDIV.F32        S15, S15, S14                                          ; +0x2a, 0x3c55f6\nVCVT.F64.F32    D7, S15                                                ; +0x2e, 0x3c55fa\nVMOV            R2, R3, D7                                             ; +0x32, 0x3c55fe\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x36, 0x3c5602\nLDR             R3, [R4]                                               ; +0x3a, 0x3c5606\nLDR.W           R6, [R3,#0x1D0]                                        ; +0x3c, 0x3c5608\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x40, 0x3c560c\nMOV             R1, R0                                                 ; +0x44, 0x3c5610\nMOV             R0, R4                                                 ; +0x46, 0x3c5612\nBLX             R6                                                     ; +0x48, 0x3c5614\nB               loc_3C5658                                             ; +0x4a, 0x3c5616\nLDR             R3, [R0]                                               ; +0x4c, 0x3c5618\nMOV             R0, SP; this                                           ; +0x4e, 0x3c561a\nLDR.W           R1, [R4,#0x184]; int                                   ; +0x50, 0x3c561c\nLDR.W           R7, [R3,#0x1D0]                                        ; +0x54, 0x3c5620\nBL              _ZN11GameToolbox11intToStringEi; GameToolbox::intToString(int) ; +0x58, 0x3c5624\nLDRB.W          R3, [SP,#0x14+var_14]                                  ; +0x5c, 0x3c5628\nMOV             R0, R4                                                 ; +0x60, 0x3c562c\nLDRB.W          R6, [SP,#0x14+var_14]                                  ; +0x62, 0x3c562e\nLSLS            R1, R3, #0x1F                                          ; +0x66, 0x3c5632\nITE PL                                                                 ; +0x68, 0x3c5634\nADDPL.W         R1, SP, #0x14+var_13                                   ; +0x6a, 0x3c5636\nLDRMI           R1, [SP,#0x14+var_C]                                   ; +0x6e, 0x3c563a\nBLX             R7                                                     ; +0x70, 0x3c563c\nLSLS            R2, R6, #0x1F                                          ; +0x72, 0x3c563e\nBPL             loc_3C5658                                             ; +0x74, 0x3c5640\nLDR             R0, [SP,#0x14+var_C]; void *                           ; +0x76, 0x3c5642\nBL              _ZdlPv; operator delete(void *)                        ; +0x78, 0x3c5644\nB               loc_3C5658                                             ; +0x7c, 0x3c5648\nLSLS            R3, R6, #0x1F                                          ; +0x7e, 0x3c564a\nBPL             loc_3C5654                                             ; +0x80, 0x3c564c\nLDR             R0, [SP,#0x14+var_C]; void *                           ; +0x82, 0x3c564e\nBL              _ZdlPv; operator delete(void *)                        ; +0x84, 0x3c5650\nBL              __cxa_end_cleanup                                      ; +0x88, 0x3c5654\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x8c, 0x3c5658\nLDR             R3, [R5]                                               ; +0x8e, 0x3c565a\nCMP             R2, R3                                                 ; +0x90, 0x3c565c\nBEQ             loc_3C5664                                             ; +0x92, 0x3c565e\nBLX             __stack_chk_fail                                       ; +0x94, 0x3c5660\nADD             SP, SP, #0x14                                          ; +0x98, 0x3c5664\nPOP             {R4-R7,PC}                                             ; +0x9a, 0x3c5666", "xrefs": ["CCCounterLabel::updateCounter @ 0x3c56e2", "CCCounterLabel::fastUpdateCounter @ 0x3c56f4"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}