{"type": "func", "start": 4300286144, "end": 4300286271, "name": "CCCounterLabel::setTargetCount", "pseudocode": "// \n// CCCounterLabel::setTargetCount from 0x1005128c0 to 0x10051293f (127 bytes)\n// \n// 2 xrefs:\n// > GJShopLayer::updateCurrencyCounter @ 0x10031068c\n// > GJShopLayer::didPurchaseItem @ 0x100310d57\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 12:31:37 +0000\n// \n\n__int64 __fastcall CCCounterLabel::setTargetCount(__int64 a1, int a2)\n{\n  float v2; // xmm0_4\n  float v3; // xmm1_4\n  int v4; // ecx\n  __int64 result; // rax\n\n  *(_DWORD *)(a1 + 520) = a2;\n  v2 = (float)a2 - (float)*(int *)(a1 + 524);\n  v3 = fabs(v2);\n  v4 = (int)v3;\n  if ( (float)*(int *)(a1 + 532) <= v3 )\n    v4 = *(_DWORD *)(a1 + 532);\n  result = (unsigned int)(int)(float)(v2 / (float)v4);\n  *(_DWORD *)(a1 + 516) = result;\n  if ( !*(_BYTE *)(a1 + 528) )\n  {\n    *(_BYTE *)(a1 + 528) = 1;\n    if ( !*(_BYTE *)(a1 + 536) )\n      return cocos2d::CCNode::schedule_1(a1, (__int64)CCCounterLabel::updateCounter, 0, COERCE_DOUBLE(1023969417));\n  }\n  return result;\n}", "assembly": "; \n; CCCounterLabel::setTargetCount from 0x1005128c0 to 0x10051293f (127 bytes)\n; \n; 2 xrefs:\n; > GJShopLayer::updateCurrencyCounter @ 0x10031068c\n; > GJShopLayer::didPurchaseItem @ 0x100310d57\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 12:31:37 +0000\n; \npush    rbp                                                            ; +0x0, 0x1005128c0\nmov     rbp, rsp                                                       ; +0x1, 0x1005128c1\ncvtsi2ss xmm0, esi                                                     ; +0x4, 0x1005128c4\nmov     [rdi+208h], esi                                                ; +0x8, 0x1005128c8\ncvtsi2ss xmm1, dword ptr [rdi+20Ch]                                    ; +0xe, 0x1005128ce\nmov     eax, [rdi+214h]                                                ; +0x16, 0x1005128d6\nsubss   xmm0, xmm1                                                     ; +0x1c, 0x1005128dc\nmovaps  xmm1, cs:xmmword_100A038A0                                     ; +0x20, 0x1005128e0\nandps   xmm1, xmm0                                                     ; +0x27, 0x1005128e7\ncvtsi2ss xmm2, eax                                                     ; +0x2a, 0x1005128ea\nucomiss xmm2, xmm1                                                     ; +0x2e, 0x1005128ee\ncvttss2si ecx, xmm1                                                    ; +0x31, 0x1005128f1\ncmovbe  ecx, eax                                                       ; +0x35, 0x1005128f5\nxorps   xmm1, xmm1                                                     ; +0x38, 0x1005128f8\ncvtsi2ss xmm1, ecx                                                     ; +0x3b, 0x1005128fb\ndivss   xmm0, xmm1                                                     ; +0x3f, 0x1005128ff\ncvttss2si eax, xmm0                                                    ; +0x43, 0x100512903\nmov     [rdi+204h], eax                                                ; +0x47, 0x100512907\ncmp     byte ptr [rdi+210h], 0                                         ; +0x4d, 0x10051290d\njnz     short loc_100512926                                            ; +0x54, 0x100512914\nmov     byte ptr [rdi+210h], 1                                         ; +0x56, 0x100512916\ncmp     byte ptr [rdi+218h], 0                                         ; +0x5d, 0x10051291d\njz      short loc_100512928                                            ; +0x64, 0x100512924\npop     rbp                                                            ; +0x66, 0x100512926\nretn                                                                   ; +0x67, 0x100512927\nlea     rsi, CCCounterLabel__updateCounter                             ; +0x68, 0x100512928\nmovss   xmm0, cs:dword_100A0485C                                       ; +0x6f, 0x10051292f\nxor     edx, edx                                                       ; +0x77, 0x100512937\npop     rbp                                                            ; +0x79, 0x100512939\njmp     cocos2d__CCNode__schedule_1                                    ; +0x7a, 0x10051293a", "xrefs": ["GJShopLayer::updateCurrencyCounter @ 0x10031068c", "GJShopLayer::didPurchaseItem @ 0x100310d57"], "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"}