{"type": "func", "start": 4300285968, "end": 4300286084, "name": "CCCounterLabel::updateCounter", "pseudocode": "// \n// CCCounterLabel::updateCounter from 0x100512810 to 0x100512884 (116 bytes)\n// \n// 2 xrefs:\n// > CCCounterLabel::enableCounter @ 0x1005127ef\n// > CCCounterLabel::setTargetCount @ 0x100512928\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\nvoid __fastcall CCCounterLabel::updateCounter(__int64 a1)\n{\n  int v1; // ecx\n  int v2; // eax\n  bool v3; // cc\n  int v4; // ecx\n  float v5; // xmm0_4\n\n  if ( *(_BYTE *)(a1 + 528) == 1 )\n  {\n    v1 = *(_DWORD *)(a1 + 520);\n    v2 = *(_DWORD *)(a1 + 524);\n    v3 = v1 <= v2;\n    v4 = v1 - v2;\n    if ( v3 )\n      v5 = fmaxf((float)*(int *)(a1 + 516), (float)v4);\n    else\n      v5 = fminf((float)*(int *)(a1 + 516), (float)v4);\n    *(_DWORD *)(a1 + 524) = (int)(float)((float)v2 + v5);\n    CCCounterLabel::updateString(a1);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateCounter from 0x100512810 to 0x100512884 (116 bytes)\n; \n; 2 xrefs:\n; > CCCounterLabel::enableCounter @ 0x1005127ef\n; > CCCounterLabel::setTargetCount @ 0x100512928\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, 0x100512810\nmov     rbp, rsp                                                       ; +0x1, 0x100512811\ncmp     byte ptr [rdi+210h], 1                                         ; +0x4, 0x100512814\njnz     short loc_10051287C                                            ; +0xb, 0x10051281b\nmov     ecx, [rdi+208h]                                                ; +0xd, 0x10051281d\nmov     eax, [rdi+20Ch]                                                ; +0x13, 0x100512823\nsub     ecx, eax                                                       ; +0x19, 0x100512829\njle     short loc_10051283F                                            ; +0x1b, 0x10051282b\ncvtsi2ss xmm1, ecx                                                     ; +0x1d, 0x10051282d\ncvtsi2ss xmm0, dword ptr [rdi+204h]                                    ; +0x21, 0x100512831\nminss   xmm0, xmm1                                                     ; +0x29, 0x100512839\njmp     short loc_100512851                                            ; +0x2d, 0x10051283d\njge     short loc_10051286C                                            ; +0x2f, 0x10051283f\ncvtsi2ss xmm1, ecx                                                     ; +0x31, 0x100512841\ncvtsi2ss xmm0, dword ptr [rdi+204h]                                    ; +0x35, 0x100512845\nmaxss   xmm0, xmm1                                                     ; +0x3d, 0x10051284d\nxorps   xmm1, xmm1                                                     ; +0x41, 0x100512851\ncvtsi2ss xmm1, eax                                                     ; +0x44, 0x100512854\naddss   xmm1, xmm0                                                     ; +0x48, 0x100512858\ncvttss2si eax, xmm1                                                    ; +0x4c, 0x10051285c\nmov     [rdi+20Ch], eax                                                ; +0x50, 0x100512860\npop     rbp                                                            ; +0x56, 0x100512866\njmp     CCCounterLabel__updateString                                   ; +0x57, 0x100512867\nmov     byte ptr [rdi+210h], 0                                         ; +0x5c, 0x10051286c\ncmp     byte ptr [rdi+218h], 0                                         ; +0x63, 0x100512873\njz      short loc_10051287E                                            ; +0x6a, 0x10051287a\npop     rbp                                                            ; +0x6c, 0x10051287c\nretn                                                                   ; +0x6d, 0x10051287d\npop     rbp                                                            ; +0x6e, 0x10051287e\njmp     cocos2d__CCNode__unscheduleAllSelectors                        ; +0x6f, 0x10051287f", "xrefs": ["CCCounterLabel::enableCounter @ 0x1005127ef", "CCCounterLabel::setTargetCount @ 0x100512928"], "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"}