{"type": "func", "start": 5368984112, "end": 5368984239, "name": "CCCounterLabel::updateCounter", "pseudocode": "// \n// CCCounterLabel::updateCounter from 0x140043230 to 0x1400432af (127 bytes)\n// \n// 1 xrefs:\n// > CCCounterLabel::setTargetCount @ 0x140043212\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; // edx\n  int m_targetCount; // eax\n  float v4; // xmm2_4\n  bool v5; // zf\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 = fminf((float)(m_targetCount - m_currentCount), (float)a1->m_stepSize);\nLABEL_6:\n      a1->m_currentCount = (int)(float)(v4 + (float)m_currentCount);\n      CCCounterLabel::updateString(a1);\n      return;\n    }\n    if ( m_currentCount > m_targetCount )\n    {\n      v4 = fmaxf((float)(m_targetCount - m_currentCount), (float)a1->m_stepSize);\n      goto LABEL_6;\n    }\n    v5 = !a1->m_dontSchedule;\n    a1->m_counterEnabled = 0;\n    if ( v5 )\n      cocos2d::CCNode::unscheduleAllSelectors(a1);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateCounter from 0x140043230 to 0x1400432af (127 bytes)\n; \n; 1 xrefs:\n; > CCCounterLabel::setTargetCount @ 0x140043212\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\ncmp     byte ptr [rcx+224h], 0                                         ; +0x0, 0x140043230\njz      short locret_1400432AE                                         ; +0x7, 0x140043237\nmov     edx, [rcx+220h]                                                ; +0x9, 0x140043239\nmov     eax, [rcx+21Ch]                                                ; +0xf, 0x14004323f\ncmp     edx, eax                                                       ; +0x15, 0x140043245\njge     short loc_140043263                                            ; +0x17, 0x140043247\nmovd    xmm0, dword ptr [rcx+218h]                                     ; +0x19, 0x140043249\nsub     eax, edx                                                       ; +0x21, 0x140043251\ncvtdq2ps xmm0, xmm0                                                    ; +0x23, 0x140043253\nmovd    xmm2, eax                                                      ; +0x26, 0x140043256\ncvtdq2ps xmm2, xmm2                                                    ; +0x2a, 0x14004325a\nminss   xmm2, xmm0                                                     ; +0x2d, 0x14004325d\njmp     short loc_14004327D                                            ; +0x31, 0x140043261\njle     short loc_140043297                                            ; +0x33, 0x140043263\nmovd    xmm0, dword ptr [rcx+218h]                                     ; +0x35, 0x140043265\nsub     eax, edx                                                       ; +0x3d, 0x14004326d\ncvtdq2ps xmm0, xmm0                                                    ; +0x3f, 0x14004326f\nmovd    xmm2, eax                                                      ; +0x42, 0x140043272\ncvtdq2ps xmm2, xmm2                                                    ; +0x46, 0x140043276\nmaxss   xmm2, xmm0                                                     ; +0x49, 0x140043279\nmovd    xmm1, edx                                                      ; +0x4d, 0x14004327d\ncvtdq2ps xmm1, xmm1                                                    ; +0x51, 0x140043281\naddss   xmm2, xmm1                                                     ; +0x54, 0x140043284\ncvttss2si eax, xmm2                                                    ; +0x58, 0x140043288\nmov     [rcx+220h], eax                                                ; +0x5c, 0x14004328c\njmp     CCCounterLabel__updateString                                   ; +0x62, 0x140043292\ncmp     byte ptr [rcx+22Ch], 0                                         ; +0x67, 0x140043297\nmov     byte ptr [rcx+224h], 0                                         ; +0x6e, 0x14004329e\njnz     short locret_1400432AE                                         ; +0x75, 0x1400432a5\njmp     cs:?unscheduleAllSelectors@CCNode@cocos2d@@QEAAXXZ; cocos2d::CCNode::unscheduleAllSelectors(void) ; +0x77, 0x1400432a7\nretn                                                                   ; +0x7e, 0x1400432ae", "xrefs": ["CCCounterLabel::setTargetCount @ 0x140043212"], "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"}