{"type": "func", "start": 5368999776, "end": 5368999954, "name": "CCCounterLabel::updateString", "pseudocode": "// \n// CCCounterLabel::updateString from 0x140046f60 to 0x140047012 (178 bytes)\n// \n// 3 xrefs:\n// > CCCounterLabel::updateCounter @ 0x140046f42\n// > GJShopLayer::init @ 0x1403b1097\n// > <???> @ 0x14090fa1c\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// Hidden C++ exception states: #wind=1\nvoid __fastcall CCCounterLabel::updateString(__int64 a1)\n{\n  __int64 v2; // rdx\n  cocos2d::CCString *v3; // rax\n  __int64 v4; // rdi\n  void (__fastcall **v5)(__int64, const char *); // rbx\n  const char *CString; // rax\n  _QWORD *v7; // rax\n  _QWORD *v8; // rdx\n  _BYTE v9[32]; // [rsp+20h] [rbp-38h] BYREF\n\n  v2 = *(unsigned int *)(a1 + 544);\n  if ( *(_DWORD *)(a1 + 560) == 1 )\n  {\n    v3 = cocos2d::CCString::createWithFormat(\"%.2f\", (float)((float)(int)v2 / 100.0));\n    v4 = a1 + 360;\n    v5 = *(void (__fastcall ***)(__int64, const char *))(a1 + 360);\n    CString = cocos2d::CCString::getCString(v3);\n    (*v5)(v4, CString);\n  }\n  else\n  {\n    v7 = (_QWORD *)GameToolbox::intToString(v9, v2);\n    v8 = v7;\n    if ( v7[3] > 0xFu )\n      v8 = (_QWORD *)*v7;\n    (**(void (__fastcall ***)(__int64, _QWORD *))(a1 + 360))(a1 + 360, v8);\n    sub_14003D310((__int64)v9);\n  }\n}", "assembly": "; \n; CCCounterLabel::updateString from 0x140046f60 to 0x140047012 (178 bytes)\n; \n; 3 xrefs:\n; > CCCounterLabel::updateCounter @ 0x140046f42\n; > GJShopLayer::init @ 0x1403b1097\n; > <???> @ 0x14090fa1c\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; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140046f60\npush    rdi                                                            ; +0x5, 0x140046f65\nsub     rsp, 50h                                                       ; +0x6, 0x140046f66\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x140046f6a\nxor     rax, rsp                                                       ; +0x11, 0x140046f71\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x140046f74\nmov     rbx, rcx                                                       ; +0x19, 0x140046f79\nmov     edx, [rcx+220h]                                                ; +0x1c, 0x140046f7c\ncmp     dword ptr [rcx+230h], 1                                        ; +0x22, 0x140046f82\njnz     short loc_140046FCC                                            ; +0x29, 0x140046f89\nmovd    xmm0, edx                                                      ; +0x2b, 0x140046f8b\ncvtdq2ps xmm0, xmm0                                                    ; +0x2f, 0x140046f8f\ndivss   xmm0, cs:dword_1408357B0                                       ; +0x32, 0x140046f92\ncvtps2pd xmm1, xmm0                                                    ; +0x3a, 0x140046f9a\nmovq    rdx, xmm1                                                      ; +0x3d, 0x140046f9d\nlea     rcx, a2f; \"%.2f\"                                               ; +0x42, 0x140046fa2\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x49, 0x140046fa9\nlea     rdi, [rbx+168h]                                                ; +0x4f, 0x140046faf\nmov     rbx, [rdi]                                                     ; +0x56, 0x140046fb6\nmov     rcx, rax                                                       ; +0x59, 0x140046fb9\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5c, 0x140046fbc\nmov     rdx, rax                                                       ; +0x62, 0x140046fc2\nmov     rcx, rdi                                                       ; +0x65, 0x140046fc5\ncall    qword ptr [rbx]                                                ; +0x68, 0x140046fc8\njmp     short loc_140046FFA                                            ; +0x6a, 0x140046fca\nlea     rcx, [rsp+58h+var_38]                                          ; +0x6c, 0x140046fcc\ncall    GameToolbox__intToString                                       ; +0x71, 0x140046fd1\nmov     rdx, rax                                                       ; +0x76, 0x140046fd6\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x79, 0x140046fd9\njbe     short loc_140046FE3                                            ; +0x7e, 0x140046fde\nmov     rdx, [rax]                                                     ; +0x80, 0x140046fe0\nlea     rcx, [rbx+168h]                                                ; +0x83, 0x140046fe3\nmov     rax, [rcx]                                                     ; +0x8a, 0x140046fea\ncall    qword ptr [rax]                                                ; +0x8d, 0x140046fed\nnop                                                                    ; +0x8f, 0x140046fef\nlea     rcx, [rsp+58h+var_38]                                          ; +0x90, 0x140046ff0\ncall    sub_14003D310                                                  ; +0x95, 0x140046ff5\nmov     rcx, [rsp+58h+var_18]                                          ; +0x9a, 0x140046ffa\nxor     rcx, rsp; StackCookie                                          ; +0x9f, 0x140046fff\ncall    __security_check_cookie                                        ; +0xa2, 0x140047002\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xa7, 0x140047007\nadd     rsp, 50h                                                       ; +0xac, 0x14004700c\npop     rdi                                                            ; +0xb0, 0x140047010\nretn                                                                   ; +0xb1, 0x140047011", "xrefs": ["CCCounterLabel::updateCounter @ 0x140046f42", "GJShopLayer::init @ 0x1403b1097", "<???> @ 0x14090fa1c"], "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"}