{"type": "func", "start": 5720748, "end": 5720888, "name": "CCCounterLabel::updateCounter", "pseudocode": "// \n// CCCounterLabel::updateCounter from 0x574aac to 0x574b38 (140 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x88e60\n// > CCCounterLabel::enableCounter @ 0x574890\n// > <???> @ 0x122ca40\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::updateCounter(CCCounterLabel *a1, float a2)\n{\n  int m_currentCount; // w1\n  int m_targetCount; // w3\n  float v4; // s0\n  float m_stepSize; // s1\n\n  if ( a1->m_counterEnabled )\n  {\n    m_currentCount = a1->m_currentCount;\n    m_targetCount = a1->m_targetCount;\n    if ( m_currentCount < m_targetCount )\n    {\n      v4 = (float)(m_targetCount - m_currentCount);\n      m_stepSize = (float)a1->m_stepSize;\n      if ( v4 > m_stepSize )\n        goto LABEL_5;\n      goto LABEL_8;\n    }\n    if ( m_currentCount > m_targetCount )\n    {\n      v4 = (float)(m_targetCount - m_currentCount);\n      m_stepSize = (float)a1->m_stepSize;\n      if ( v4 < m_stepSize )\n      {\nLABEL_5:\n        a1->m_currentCount = (int)(float)((float)m_currentCount + m_stepSize);\nLABEL_6:\n        CCCounterLabel::updateString(a1);\n        return;\n      }\nLABEL_8:\n      a1->m_currentCount = (int)(float)((float)m_currentCount + v4);\n      goto LABEL_6;\n    }\n    CCCounterLabel::disableCounter(a1);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateCounter from 0x574aac to 0x574b38 (140 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x88e60\n; > CCCounterLabel::enableCounter @ 0x574890\n; > <???> @ 0x122ca40\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            W1, [X0,#0x1F0]                                        ; +0x0, 0x574aac\nMOV             X2, X0                                                 ; +0x4, 0x574ab0\nCBZ             W1, locret_574B30                                      ; +0x8, 0x574ab4\nLDR             W1, [X0,#0x1EC]                                        ; +0xc, 0x574ab8\nLDR             W3, [X0,#0x1E8]                                        ; +0x10, 0x574abc\nCMP             W1, W3                                                 ; +0x14, 0x574ac0\nB.LT            loc_574AFC                                             ; +0x18, 0x574ac4\nB.LE            loc_574B34                                             ; +0x1c, 0x574ac8\nLDR             W0, [X0,#0x1E4]                                        ; +0x20, 0x574acc\nSUB             W3, W3, W1                                             ; +0x24, 0x574ad0\nSCVTF           S0, W3                                                 ; +0x28, 0x574ad4\nSCVTF           S1, W0                                                 ; +0x2c, 0x574ad8\nFCMPE           S0, S1                                                 ; +0x30, 0x574adc\nB.PL            loc_574B14                                             ; +0x34, 0x574ae0\nSCVTF           S0, W1                                                 ; +0x38, 0x574ae4\nMOV             X0, X2; this                                           ; +0x3c, 0x574ae8\nFADD            S0, S0, S1                                             ; +0x40, 0x574aec\nFCVTZS          W1, S0                                                 ; +0x44, 0x574af0\nSTR             W1, [X2,#0x1EC]                                        ; +0x48, 0x574af4\nB               _ZN14CCCounterLabel12updateStringEv; CCCounterLabel::updateString(void) ; +0x4c, 0x574af8\nLDR             W0, [X0,#0x1E4]                                        ; +0x50, 0x574afc\nSUB             W3, W3, W1                                             ; +0x54, 0x574b00\nSCVTF           S0, W3                                                 ; +0x58, 0x574b04\nSCVTF           S1, W0                                                 ; +0x5c, 0x574b08\nFCMPE           S0, S1                                                 ; +0x60, 0x574b0c\nB.GT            loc_574AE4                                             ; +0x64, 0x574b10\nFMOV            S1, S0                                                 ; +0x68, 0x574b14\nMOV             X0, X2; this                                           ; +0x6c, 0x574b18\nSCVTF           S0, W1                                                 ; +0x70, 0x574b1c\nFADD            S0, S0, S1                                             ; +0x74, 0x574b20\nFCVTZS          W1, S0                                                 ; +0x78, 0x574b24\nSTR             W1, [X2,#0x1EC]                                        ; +0x7c, 0x574b28\nB               _ZN14CCCounterLabel12updateStringEv; CCCounterLabel::updateString(void) ; +0x80, 0x574b2c\nRET                                                                    ; +0x84, 0x574b30\nB               _ZN14CCCounterLabel14disableCounterEv; CCCounterLabel::disableCounter(void) ; +0x88, 0x574b34", "xrefs": ["<???> @ 0x88e60", "CCCounterLabel::enableCounter @ 0x574890", "<???> @ 0x122ca40"], "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"}