{"type": "func", "start": 4300281824, "end": 4300281940, "name": "CCCounterLabel::updateCounter", "pseudocode": "// \n// CCCounterLabel::updateCounter from 0x1005117e0 to 0x100511854 (116 bytes)\n// \n// 2 xrefs:\n// > CCCounterLabel::enableCounter @ 0x1005117bf\n// > CCCounterLabel::setTargetCount @ 0x1005118f8\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_targetCount; // ecx\n  int m_currentCount; // eax\n  bool v4; // zf\n  bool v5; // sf\n  bool v6; // of\n  int v7; // ecx\n  float v8; // xmm0_4\n\n  if ( a1->m_counterEnabled )\n  {\n    m_targetCount = a1->m_targetCount;\n    m_currentCount = a1->m_currentCount;\n    v6 = __OFSUB__(m_targetCount, m_currentCount);\n    v4 = m_targetCount == m_currentCount;\n    v5 = m_targetCount - m_currentCount < 0;\n    v7 = m_targetCount - m_currentCount;\n    if ( !(v5 ^ v6 | v4) )\n    {\n      v8 = fminf((float)a1->m_stepSize, (float)v7);\nLABEL_6:\n      a1->m_currentCount = (int)(float)((float)m_currentCount + v8);\n      CCCounterLabel::updateString(a1);\n      return;\n    }\n    if ( v5 != v6 )\n    {\n      v8 = fmaxf((float)a1->m_stepSize, (float)v7);\n      goto LABEL_6;\n    }\n    a1->m_counterEnabled = 0;\n    if ( !a1->m_dontSchedule )\n      cocos2d::CCNode::unscheduleAllSelectors(a1);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateCounter from 0x1005117e0 to 0x100511854 (116 bytes)\n; \n; 2 xrefs:\n; > CCCounterLabel::enableCounter @ 0x1005117bf\n; > CCCounterLabel::setTargetCount @ 0x1005118f8\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\npush    rbp                                                            ; +0x0, 0x1005117e0\nmov     rbp, rsp                                                       ; +0x1, 0x1005117e1\ncmp     byte ptr [rdi+210h], 1                                         ; +0x4, 0x1005117e4\njnz     short loc_10051184C                                            ; +0xb, 0x1005117eb\nmov     ecx, [rdi+208h]                                                ; +0xd, 0x1005117ed\nmov     eax, [rdi+20Ch]                                                ; +0x13, 0x1005117f3\nsub     ecx, eax                                                       ; +0x19, 0x1005117f9\njle     short loc_10051180F                                            ; +0x1b, 0x1005117fb\ncvtsi2ss xmm1, ecx                                                     ; +0x1d, 0x1005117fd\ncvtsi2ss xmm0, dword ptr [rdi+204h]                                    ; +0x21, 0x100511801\nminss   xmm0, xmm1                                                     ; +0x29, 0x100511809\njmp     short loc_100511821                                            ; +0x2d, 0x10051180d\njge     short loc_10051183C                                            ; +0x2f, 0x10051180f\ncvtsi2ss xmm1, ecx                                                     ; +0x31, 0x100511811\ncvtsi2ss xmm0, dword ptr [rdi+204h]                                    ; +0x35, 0x100511815\nmaxss   xmm0, xmm1                                                     ; +0x3d, 0x10051181d\nxorps   xmm1, xmm1                                                     ; +0x41, 0x100511821\ncvtsi2ss xmm1, eax                                                     ; +0x44, 0x100511824\naddss   xmm1, xmm0                                                     ; +0x48, 0x100511828\ncvttss2si eax, xmm1                                                    ; +0x4c, 0x10051182c\nmov     [rdi+20Ch], eax                                                ; +0x50, 0x100511830\npop     rbp                                                            ; +0x56, 0x100511836\njmp     CCCounterLabel__updateString                                   ; +0x57, 0x100511837\nmov     byte ptr [rdi+210h], 0                                         ; +0x5c, 0x10051183c\ncmp     byte ptr [rdi+218h], 0                                         ; +0x63, 0x100511843\njz      short loc_10051184E                                            ; +0x6a, 0x10051184a\npop     rbp                                                            ; +0x6c, 0x10051184c\nretn                                                                   ; +0x6d, 0x10051184d\npop     rbp                                                            ; +0x6e, 0x10051184e\njmp     cocos2d__CCNode__unscheduleAllSelectors                        ; +0x6f, 0x10051184f", "xrefs": ["CCCounterLabel::enableCounter @ 0x1005117bf", "CCCounterLabel::setTargetCount @ 0x1005118f8"], "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"}