{"type": "func", "start": 4295207792, "end": 4295207908, "name": "CCCounterLabel::updateCounter", "pseudocode": "// \n// CCCounterLabel::updateCounter from 0x10003ab70 to 0x10003abe4 (116 bytes)\n// \n// 1 xrefs:\n// > CCCounterLabel::setTargetCount @ 0x10003ac3c\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 __fastcall CCCounterLabel::updateCounter(CCCounterLabel *a1, float a2)\n{\n  int m_currentCount; // w8\n  int m_targetCount; // w9\n  bool v4; // vf\n  int v5; // w9\n  float m_stepSize; // s0\n\n  if ( a1->m_counterEnabled )\n  {\n    m_currentCount = a1->m_currentCount;\n    m_targetCount = a1->m_targetCount;\n    v4 = __OFSUB__(m_targetCount, m_currentCount);\n    v5 = m_targetCount - m_currentCount;\n    if ( !((v5 < 0) ^ v4 | (v5 == 0)) )\n    {\n      m_stepSize = (float)v5;\n      if ( (float)v5 > (float)a1->m_stepSize )\n        m_stepSize = (float)a1->m_stepSize;\nLABEL_10:\n      a1->m_currentCount = (int)(float)(m_stepSize + (float)m_currentCount);\n      CCCounterLabel::updateString(a1);\n      return;\n    }\n    if ( v5 < 0 != v4 )\n    {\n      m_stepSize = (float)v5;\n      if ( (float)v5 < (float)a1->m_stepSize )\n        m_stepSize = (float)a1->m_stepSize;\n      goto LABEL_10;\n    }\n    a1->m_counterEnabled = 0;\n    if ( !a1->m_dontSchedule )\n      cocos2d::CCNode::unscheduleAllSelectors(a1);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateCounter from 0x10003ab70 to 0x10003abe4 (116 bytes)\n; \n; 1 xrefs:\n; > CCCounterLabel::setTargetCount @ 0x10003ac3c\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\nLDRB            W8, [X0,#0x210]                                        ; +0x0, 0x10003ab70\nCMP             W8, #1                                                 ; +0x4, 0x10003ab74\nB.NE            locret_10003ABDC                                       ; +0x8, 0x10003ab78\nLDR             W8, [X0,#0x20C]                                        ; +0xc, 0x10003ab7c\nLDR             W9, [X0,#0x208]                                        ; +0x10, 0x10003ab80\nSUBS            W9, W9, W8                                             ; +0x14, 0x10003ab84\nB.LE            loc_10003ABA4                                          ; +0x18, 0x10003ab88\nSCVTF           S0, W9                                                 ; +0x1c, 0x10003ab8c\nLDR             S1, [X0,#0x204]                                        ; +0x20, 0x10003ab90\nSCVTF           S1, S1                                                 ; +0x24, 0x10003ab94\nFCMP            S0, S1                                                 ; +0x28, 0x10003ab98\nFCSEL           S0, S1, S0, GT                                         ; +0x2c, 0x10003ab9c\nB               loc_10003ABBC                                          ; +0x30, 0x10003aba0\nB.GE            loc_10003ABD0                                          ; +0x34, 0x10003aba4\nSCVTF           S0, W9                                                 ; +0x38, 0x10003aba8\nLDR             S1, [X0,#0x204]                                        ; +0x3c, 0x10003abac\nSCVTF           S1, S1                                                 ; +0x40, 0x10003abb0\nFCMP            S0, S1                                                 ; +0x44, 0x10003abb4\nFCSEL           S0, S1, S0, MI                                         ; +0x48, 0x10003abb8\nSCVTF           S1, W8                                                 ; +0x4c, 0x10003abbc\nFADD            S0, S0, S1                                             ; +0x50, 0x10003abc0\nFCVTZS          W8, S0                                                 ; +0x54, 0x10003abc4\nSTR             W8, [X0,#0x20C]                                        ; +0x58, 0x10003abc8\nB               CCCounterLabel__updateString                           ; +0x5c, 0x10003abcc\nSTRB            WZR, [X0,#0x210]                                       ; +0x60, 0x10003abd0\nLDRB            W8, [X0,#0x218]                                        ; +0x64, 0x10003abd4\nTBZ             W8, #0, loc_10003ABE0                                  ; +0x68, 0x10003abd8\nRET                                                                    ; +0x6c, 0x10003abdc\nB               cocos2d__CCNode__unscheduleAllSelectors                ; +0x70, 0x10003abe0", "xrefs": ["CCCounterLabel::setTargetCount @ 0x10003ac3c"], "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"}