{"type": "func", "start": 4295207908, "end": 4295208020, "name": "CCCounterLabel::setTargetCount", "pseudocode": "// \n// CCCounterLabel::setTargetCount from 0x10003abe4 to 0x10003ac54 (112 bytes)\n// \n// 2 xrefs:\n// > GJShopLayer::updateCurrencyCounter @ 0x10014c044\n// > GJShopLayer::didPurchaseItem @ 0x10014c4d0\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::setTargetCount(CCCounterLabel *a1, int a2)\n{\n  int m_stepCount; // w8\n  float m_currentCount; // s1\n  float v4; // s2\n  cocos2d::SEL_SCHEDULE v5; // 0:x1.16\n\n  m_stepCount = a1->m_stepCount;\n  m_currentCount = (float)a1->m_currentCount;\n  v4 = vabds_f32((float)a2, m_currentCount);\n  a1->m_targetCount = a2;\n  if ( v4 < (float)m_stepCount )\n    m_stepCount = (int)v4;\n  a1->m_stepSize = (int)(float)((float)((float)a2 - m_currentCount) / (float)m_stepCount);\n  if ( !a1->m_counterEnabled )\n  {\n    a1->m_counterEnabled = 1;\n    if ( !a1->m_dontSchedule )\n    {\n      v5.ptr = (void (__cdecl *)(float))CCCounterLabel::updateCounter;\n      v5.adj = 0;\n      cocos2d::CCNode::schedule(a1, v5, 0.033333);\n    }\n  }\n}", "assembly": "; \n; CCCounterLabel::setTargetCount from 0x10003abe4 to 0x10003ac54 (112 bytes)\n; \n; 2 xrefs:\n; > GJShopLayer::updateCurrencyCounter @ 0x10014c044\n; > GJShopLayer::didPurchaseItem @ 0x10014c4d0\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\nLDR             W8, [X0,#0x214]                                        ; +0x0, 0x10003abe4\nSCVTF           S0, W1                                                 ; +0x4, 0x10003abe8\nLDR             S1, [X0,#0x20C]                                        ; +0x8, 0x10003abec\nSCVTF           S1, S1                                                 ; +0xc, 0x10003abf0\nFABD            S2, S0, S1                                             ; +0x10, 0x10003abf4\nSCVTF           S3, W8                                                 ; +0x14, 0x10003abf8\nFCMP            S2, S3                                                 ; +0x18, 0x10003abfc\nSTR             W1, [X0,#0x208]                                        ; +0x1c, 0x10003ac00\nFCVTZS          W9, S2                                                 ; +0x20, 0x10003ac04\nCSEL            W8, W9, W8, MI                                         ; +0x24, 0x10003ac08\nSCVTF           S2, W8                                                 ; +0x28, 0x10003ac0c\nFSUB            S0, S0, S1                                             ; +0x2c, 0x10003ac10\nFDIV            S0, S0, S2                                             ; +0x30, 0x10003ac14\nFCVTZS          W8, S0                                                 ; +0x34, 0x10003ac18\nSTR             W8, [X0,#0x204]                                        ; +0x38, 0x10003ac1c\nLDRB            W8, [X0,#0x210]                                        ; +0x3c, 0x10003ac20\nTBNZ            W8, #0, locret_10003AC38                               ; +0x40, 0x10003ac24\nMOV             W8, #1                                                 ; +0x44, 0x10003ac28\nSTRB            W8, [X0,#0x210]                                        ; +0x48, 0x10003ac2c\nLDRB            W8, [X0,#0x218]                                        ; +0x4c, 0x10003ac30\nTBZ             W8, #0, loc_10003AC3C                                  ; +0x50, 0x10003ac34\nRET                                                                    ; +0x54, 0x10003ac38\nADRL            X1, CCCounterLabel__updateCounter                      ; +0x58, 0x10003ac3c\nADRP            X8, #dword_100635910@PAGE                              ; +0x60, 0x10003ac44\nLDR             S0, [X8,#dword_100635910@PAGEOFF]                      ; +0x64, 0x10003ac48\nMOV             X2, #0                                                 ; +0x68, 0x10003ac4c\nB               cocos2d__CCNode__schedule                              ; +0x6c, 0x10003ac50", "xrefs": ["GJShopLayer::updateCurrencyCounter @ 0x10014c044", "GJShopLayer::didPurchaseItem @ 0x10014c4d0"], "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"}