{"type": "func", "start": 4300282000, "end": 4300282127, "name": "CCCounterLabel::setTargetCount", "pseudocode": "// \n// CCCounterLabel::setTargetCount from 0x100511890 to 0x10051190f (127 bytes)\n// \n// 2 xrefs:\n// > GJShopLayer::updateCurrencyCounter @ 0x10032502c\n// > GJShopLayer::didPurchaseItem @ 0x100325647\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  float v2; // xmm0_4\n  float v3; // xmm1_4\n  int m_stepCount; // ecx\n\n  a1->m_targetCount = a2;\n  v2 = (float)a2 - (float)a1->m_currentCount;\n  v3 = fabs(v2);\n  m_stepCount = (int)v3;\n  if ( (float)a1->m_stepCount <= v3 )\n    m_stepCount = a1->m_stepCount;\n  a1->m_stepSize = (int)(float)(v2 / (float)m_stepCount);\n  if ( !a1->m_counterEnabled )\n  {\n    a1->m_counterEnabled = 1;\n    if ( !a1->m_dontSchedule )\n      cocos2d::CCNode::schedule_1(\n        a1,\n        (cocos2d::SEL_SCHEDULE)(unsigned __int64)CCCounterLabel::updateCounter,\n        0.033333335);\n  }\n}", "assembly": "; \n; CCCounterLabel::setTargetCount from 0x100511890 to 0x10051190f (127 bytes)\n; \n; 2 xrefs:\n; > GJShopLayer::updateCurrencyCounter @ 0x10032502c\n; > GJShopLayer::didPurchaseItem @ 0x100325647\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, 0x100511890\nmov     rbp, rsp                                                       ; +0x1, 0x100511891\ncvtsi2ss xmm0, esi                                                     ; +0x4, 0x100511894\nmov     [rdi+208h], esi                                                ; +0x8, 0x100511898\ncvtsi2ss xmm1, dword ptr [rdi+20Ch]                                    ; +0xe, 0x10051189e\nmov     eax, [rdi+214h]                                                ; +0x16, 0x1005118a6\nsubss   xmm0, xmm1                                                     ; +0x1c, 0x1005118ac\nmovaps  xmm1, cs:xmmword_100815500                                     ; +0x20, 0x1005118b0\nandps   xmm1, xmm0                                                     ; +0x27, 0x1005118b7\ncvtsi2ss xmm2, eax                                                     ; +0x2a, 0x1005118ba\nucomiss xmm2, xmm1                                                     ; +0x2e, 0x1005118be\ncvttss2si ecx, xmm1                                                    ; +0x31, 0x1005118c1\ncmovbe  ecx, eax                                                       ; +0x35, 0x1005118c5\nxorps   xmm1, xmm1                                                     ; +0x38, 0x1005118c8\ncvtsi2ss xmm1, ecx                                                     ; +0x3b, 0x1005118cb\ndivss   xmm0, xmm1                                                     ; +0x3f, 0x1005118cf\ncvttss2si eax, xmm0                                                    ; +0x43, 0x1005118d3\nmov     [rdi+204h], eax                                                ; +0x47, 0x1005118d7\ncmp     byte ptr [rdi+210h], 0                                         ; +0x4d, 0x1005118dd\njnz     short loc_1005118F6                                            ; +0x54, 0x1005118e4\nmov     byte ptr [rdi+210h], 1                                         ; +0x56, 0x1005118e6\ncmp     byte ptr [rdi+218h], 0                                         ; +0x5d, 0x1005118ed\njz      short loc_1005118F8                                            ; +0x64, 0x1005118f4\npop     rbp                                                            ; +0x66, 0x1005118f6\nretn                                                                   ; +0x67, 0x1005118f7\nlea     rsi, CCCounterLabel__updateCounter                             ; +0x68, 0x1005118f8\nmovss   xmm0, cs:dword_10081646C                                       ; +0x6f, 0x1005118ff\nxor     edx, edx                                                       ; +0x77, 0x100511907\npop     rbp                                                            ; +0x79, 0x100511909\njmp     cocos2d__CCNode__schedule_1                                    ; +0x7a, 0x10051190a", "xrefs": ["GJShopLayer::updateCurrencyCounter @ 0x10032502c", "GJShopLayer::didPurchaseItem @ 0x100325647"], "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"}