{"type": "func", "start": 5368983968, "end": 5368984097, "name": "CCCounterLabel::setTargetCount", "pseudocode": "// \n// CCCounterLabel::setTargetCount from 0x1400431a0 to 0x140043221 (129 bytes)\n// \n// 2 xrefs:\n// > GJShopLayer::updateCurrencyCounter @ 0x1402abc9e\n// > GJShopLayer::didPurchaseItem @ 0x1402ac6eb\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::setTargetCount(CCCounterLabel *a1, int a2)\n{\n  int m_stepCount; // eax\n  float m_currentCount; // xmm0_4\n  float v4; // xmm1_4\n  float v5; // xmm2_4\n  bool v6; // zf\n\n  m_stepCount = a1->m_stepCount;\n  m_currentCount = (float)a1->m_currentCount;\n  a1->m_targetCount = a2;\n  v4 = (float)a2 - m_currentCount;\n  v5 = fabs(v4);\n  if ( (float)m_stepCount > v5 )\n    m_stepCount = (int)v5;\n  v6 = !a1->m_counterEnabled;\n  a1->m_stepSize = (int)(float)(v4 / (float)m_stepCount);\n  if ( v6 )\n  {\n    v6 = !a1->m_dontSchedule;\n    a1->m_counterEnabled = 1;\n    if ( v6 )\n      cocos2d::CCNode::schedule(a1, CCCounterLabel::updateCounter);\n  }\n}", "assembly": "; \n; CCCounterLabel::setTargetCount from 0x1400431a0 to 0x140043221 (129 bytes)\n; \n; 2 xrefs:\n; > GJShopLayer::updateCurrencyCounter @ 0x1402abc9e\n; > GJShopLayer::didPurchaseItem @ 0x1402ac6eb\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\nmovd    xmm0, dword ptr [rcx+220h]                                     ; +0x0, 0x1400431a0\nmov     eax, [rcx+228h]                                                ; +0x8, 0x1400431a8\ncvtdq2ps xmm0, xmm0                                                    ; +0xe, 0x1400431ae\nmov     [rcx+21Ch], edx                                                ; +0x11, 0x1400431b1\nmovd    xmm1, edx                                                      ; +0x17, 0x1400431b7\ncvtdq2ps xmm1, xmm1                                                    ; +0x1b, 0x1400431bb\nsubss   xmm1, xmm0                                                     ; +0x1e, 0x1400431be\nmovd    xmm0, eax                                                      ; +0x22, 0x1400431c2\ncvtdq2ps xmm0, xmm0                                                    ; +0x26, 0x1400431c6\nmovaps  xmm2, xmm1                                                     ; +0x29, 0x1400431c9\nandps   xmm2, cs:xmmword_1406243C0                                     ; +0x2c, 0x1400431cc\ncomiss  xmm0, xmm2                                                     ; +0x33, 0x1400431d3\njbe     short loc_1400431DC                                            ; +0x36, 0x1400431d6\ncvttss2si eax, xmm2                                                    ; +0x38, 0x1400431d8\ncmp     byte ptr [rcx+224h], 0                                         ; +0x3c, 0x1400431dc\nmovd    xmm0, eax                                                      ; +0x43, 0x1400431e3\ncvtdq2ps xmm0, xmm0                                                    ; +0x47, 0x1400431e7\ndivss   xmm1, xmm0                                                     ; +0x4a, 0x1400431ea\ncvttss2si eax, xmm1                                                    ; +0x4e, 0x1400431ee\nmov     [rcx+218h], eax                                                ; +0x52, 0x1400431f2\njnz     short locret_140043220                                         ; +0x58, 0x1400431f8\ncmp     byte ptr [rcx+22Ch], 0                                         ; +0x5a, 0x1400431fa\nmov     byte ptr [rcx+224h], 1                                         ; +0x61, 0x140043201\njnz     short locret_140043220                                         ; +0x68, 0x140043208\nmovss   xmm2, cs:dword_1406229D4                                       ; +0x6a, 0x14004320a\nlea     rdx, CCCounterLabel__updateCounter                             ; +0x72, 0x140043212\njmp     cs:?schedule@CCNode@cocos2d@@QEAAXP8CCObject@2@EAAXM@ZM@Z; cocos2d::CCNode::schedule(void (cocos2d::CCObject::*)(float),float) ; +0x79, 0x140043219\nretn                                                                   ; +0x80, 0x140043220", "xrefs": ["GJShopLayer::updateCurrencyCounter @ 0x1402abc9e", "GJShopLayer::didPurchaseItem @ 0x1402ac6eb"], "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"}