{"type": "func", "start": 5368999504, "end": 5368999633, "name": "CCCounterLabel::setTargetCount", "pseudocode": "// \n// CCCounterLabel::setTargetCount from 0x140046e50 to 0x140046ed1 (129 bytes)\n// \n// 2 xrefs:\n// > GJShopLayer::updateCurrencyCounter @ 0x1403b2034\n// > GJShopLayer::didPurchaseItem @ 0x1403b2a31\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:25:31 +0000\n// \n\n__int64 __fastcall CCCounterLabel::setTargetCount(__int64 a1, int a2)\n{\n  int v2; // eax\n  float v3; // xmm0_4\n  float v4; // xmm1_4\n  float v5; // xmm2_4\n  bool v6; // zf\n  __int64 result; // rax\n\n  v2 = *(_DWORD *)(a1 + 552);\n  v3 = (float)*(int *)(a1 + 544);\n  *(_DWORD *)(a1 + 540) = a2;\n  v4 = (float)a2 - v3;\n  v5 = fabs(v4);\n  if ( (float)v2 > v5 )\n    v2 = (int)v5;\n  v6 = *(_BYTE *)(a1 + 548) == 0;\n  result = (unsigned int)(int)(float)(v4 / (float)v2);\n  *(_DWORD *)(a1 + 536) = result;\n  if ( v6 )\n  {\n    v6 = *(_BYTE *)(a1 + 556) == 0;\n    *(_BYTE *)(a1 + 548) = 1;\n    if ( v6 )\n      return cocos2d::CCNode::schedule(a1, CCCounterLabel::updateCounter);\n  }\n  return result;\n}", "assembly": "; \n; CCCounterLabel::setTargetCount from 0x140046e50 to 0x140046ed1 (129 bytes)\n; \n; 2 xrefs:\n; > GJShopLayer::updateCurrencyCounter @ 0x1403b2034\n; > GJShopLayer::didPurchaseItem @ 0x1403b2a31\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:25:31 +0000\n; \nmovd    xmm0, dword ptr [rcx+220h]                                     ; +0x0, 0x140046e50\nmov     eax, [rcx+228h]                                                ; +0x8, 0x140046e58\ncvtdq2ps xmm0, xmm0                                                    ; +0xe, 0x140046e5e\nmov     [rcx+21Ch], edx                                                ; +0x11, 0x140046e61\nmovd    xmm1, edx                                                      ; +0x17, 0x140046e67\ncvtdq2ps xmm1, xmm1                                                    ; +0x1b, 0x140046e6b\nsubss   xmm1, xmm0                                                     ; +0x1e, 0x140046e6e\nmovd    xmm0, eax                                                      ; +0x22, 0x140046e72\ncvtdq2ps xmm0, xmm0                                                    ; +0x26, 0x140046e76\nmovaps  xmm2, xmm1                                                     ; +0x29, 0x140046e79\nandps   xmm2, cs:xmmword_140836C90                                     ; +0x2c, 0x140046e7c\ncomiss  xmm0, xmm2                                                     ; +0x33, 0x140046e83\njbe     short loc_140046E8C                                            ; +0x36, 0x140046e86\ncvttss2si eax, xmm2                                                    ; +0x38, 0x140046e88\ncmp     byte ptr [rcx+224h], 0                                         ; +0x3c, 0x140046e8c\nmovd    xmm0, eax                                                      ; +0x43, 0x140046e93\ncvtdq2ps xmm0, xmm0                                                    ; +0x47, 0x140046e97\ndivss   xmm1, xmm0                                                     ; +0x4a, 0x140046e9a\ncvttss2si eax, xmm1                                                    ; +0x4e, 0x140046e9e\nmov     [rcx+218h], eax                                                ; +0x52, 0x140046ea2\njnz     short locret_140046ED0                                         ; +0x58, 0x140046ea8\ncmp     byte ptr [rcx+22Ch], 0                                         ; +0x5a, 0x140046eaa\nmov     byte ptr [rcx+224h], 1                                         ; +0x61, 0x140046eb1\njnz     short locret_140046ED0                                         ; +0x68, 0x140046eb8\nmovss   xmm2, cs:dword_140834DC4                                       ; +0x6a, 0x140046eba\nlea     rdx, CCCounterLabel__updateCounter                             ; +0x72, 0x140046ec2\njmp     cs:?schedule@CCNode@cocos2d@@QEAAXP8CCObject@2@EAAXM@ZM@Z; cocos2d::CCNode::schedule(void (cocos2d::CCObject::*)(float),float) ; +0x79, 0x140046ec9\nretn                                                                   ; +0x80, 0x140046ed0", "xrefs": ["GJShopLayer::updateCurrencyCounter @ 0x1403b2034", "GJShopLayer::didPurchaseItem @ 0x1403b2a31"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}