{"type": "func", "start": 6443237184, "end": 6443237498, "name": "cocos2d::CCDirector::toggleShowFPS", "pseudocode": "// \n// cocos2d::CCDirector::toggleShowFPS from 0x1800bff40 to 0x1800c007a (314 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9408\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\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCDirector::toggleShowFPS(__int64 a1, char a2, const char *a3, float *a4)\n{\n  cocos2d::CCObject *v8; // rcx\n  const char *v9; // rdx\n  struct cocos2d::CCLabelBMFont *v10; // rax\n  __int64 v11; // rbx\n  float *v12; // rax\n  struct cocos2d::CCDirector *v13; // rax\n  __int64 v14; // rbx\n  float *v15; // rax\n  _DWORD v16[2]; // [rsp+20h] [rbp-38h] BYREF\n  float v17; // [rsp+28h] [rbp-30h] BYREF\n  const char *v18; // [rsp+30h] [rbp-28h]\n\n  v18 = a3;\n  v8 = *(cocos2d::CCObject **)(a1 + 368);\n  if ( v8 )\n  {\n    cocos2d::CCObject::release(v8);\n    *(_QWORD *)(a1 + 368) = 0;\n  }\n  *(_BYTE *)(a1 + 360) = a2;\n  if ( a2 )\n  {\n    v9 = a3;\n    if ( *((_QWORD *)a3 + 3) > 0xFu )\n      v9 = *(const char **)a3;\n    v10 = cocos2d::CCLabelBMFont::create(\"FPS: 0\", v9);\n    *(_QWORD *)(a1 + 368) = v10;\n    ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v10->setScale_0)(v10);\n    v11 = **(_QWORD **)(a1 + 368);\n    v12 = kmVec2Fill(&v17, 0.0, 1.0);\n    (*(void (__fastcall **)(_QWORD, float *))(v11 + 272))(*(_QWORD *)(a1 + 368), v12);\n    cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 368));\n    v13 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::cc_timeval::operator=(v16, &v13->m_obWinSizeInPoints);\n    v14 = **(_QWORD **)(a1 + 368);\n    v15 = kmVec2Fill(&v17, *a4 + 1.0, *(float *)&v16[1] + a4[1]);\n    (*(void (__fastcall **)(_QWORD, float *))(v14 + 184))(*(_QWORD *)(a1 + 368), v15);\n  }\n  sub_180005B70((__int64)a3);\n}", "assembly": "; \n; cocos2d::CCDirector::toggleShowFPS from 0x1800bff40 to 0x1800c007a (314 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9408\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800bff40\npush    rbp                                                            ; +0x5, 0x1800bff45\npush    rsi                                                            ; +0x6, 0x1800bff46\npush    rdi                                                            ; +0x7, 0x1800bff47\nsub     rsp, 40h                                                       ; +0x8, 0x1800bff48\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x1800bff4c\nxor     rax, rsp                                                       ; +0x13, 0x1800bff53\nmov     [rsp+58h+var_20], rax                                          ; +0x16, 0x1800bff56\nmov     rbp, r9                                                        ; +0x1b, 0x1800bff5b\nmov     rdi, r8                                                        ; +0x1e, 0x1800bff5e\nmovzx   ebx, dl                                                        ; +0x21, 0x1800bff61\nmov     rsi, rcx                                                       ; +0x24, 0x1800bff64\nmov     [rsp+58h+var_28], r8                                           ; +0x27, 0x1800bff67\nmov     rcx, [rcx+170h]; this                                          ; +0x2c, 0x1800bff6c\ntest    rcx, rcx                                                       ; +0x33, 0x1800bff73\njz      short loc_1800BFF88                                            ; +0x36, 0x1800bff76\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x38, 0x1800bff78\nmov     qword ptr [rsi+170h], 0                                        ; +0x3d, 0x1800bff7d\nmov     [rsi+168h], bl                                                 ; +0x48, 0x1800bff88\ntest    bl, bl                                                         ; +0x4e, 0x1800bff8e\njz      loc_1800C0058                                                  ; +0x50, 0x1800bff90\nmov     rdx, rdi                                                       ; +0x56, 0x1800bff96\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x59, 0x1800bff99\njbe     short loc_1800BFFA3                                            ; +0x5e, 0x1800bff9e\nmov     rdx, [rdi]; char *                                             ; +0x60, 0x1800bffa0\nlea     rcx, aFps0; \"FPS: 0\"                                           ; +0x63, 0x1800bffa3\ncall    ?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x6a, 0x1800bffaa\nmov     [rsi+170h], rax                                                ; +0x6f, 0x1800bffaf\nmov     rdx, [rax]                                                     ; +0x76, 0x1800bffb6\nmovss   xmm1, cs:dword_1800E6308                                       ; +0x79, 0x1800bffb9\nmov     rcx, rax                                                       ; +0x81, 0x1800bffc1\ncall    qword ptr [rdx+0A0h]                                           ; +0x84, 0x1800bffc4\nmov     rax, [rsi+170h]                                                ; +0x8a, 0x1800bffca\nmov     rbx, [rax]                                                     ; +0x91, 0x1800bffd1\nmovss   xmm2, cs:flt_1800E61A8                                         ; +0x94, 0x1800bffd4\nxorps   xmm1, xmm1                                                     ; +0x9c, 0x1800bffdc\nlea     rcx, [rsp+58h+var_30]                                          ; +0x9f, 0x1800bffdf\ncall    kmVec2Fill                                                     ; +0xa4, 0x1800bffe4\nmov     rdx, rax                                                       ; +0xa9, 0x1800bffe9\nmov     rcx, [rsi+170h]                                                ; +0xac, 0x1800bffec\ncall    qword ptr [rbx+110h]                                           ; +0xb3, 0x1800bfff3\nmov     rcx, [rsi+170h]; this                                          ; +0xb9, 0x1800bfff9\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xc0, 0x1800c0000\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xc5, 0x1800c0005\nlea     rdx, [rax+138h]                                                ; +0xca, 0x1800c000a\nlea     rcx, [rsp+58h+var_38]                                          ; +0xd1, 0x1800c0011\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0xd6, 0x1800c0016\nmov     rax, [rsi+170h]                                                ; +0xdb, 0x1800c001b\nmov     rbx, [rax]                                                     ; +0xe2, 0x1800c0022\nmovss   xmm2, [rsp+58h+var_34]                                         ; +0xe5, 0x1800c0025\naddss   xmm2, dword ptr [rbp+4]                                        ; +0xeb, 0x1800c002b\nmovss   xmm1, dword ptr [rbp+0]                                        ; +0xf0, 0x1800c0030\naddss   xmm1, cs:flt_1800E61A8                                         ; +0xf5, 0x1800c0035\nlea     rcx, [rsp+58h+var_30]                                          ; +0xfd, 0x1800c003d\ncall    kmVec2Fill                                                     ; +0x102, 0x1800c0042\nmov     rdx, rax                                                       ; +0x107, 0x1800c0047\nmov     rcx, [rsi+170h]                                                ; +0x10a, 0x1800c004a\ncall    qword ptr [rbx+0B8h]                                           ; +0x111, 0x1800c0051\nnop                                                                    ; +0x117, 0x1800c0057\nmov     rcx, rdi                                                       ; +0x118, 0x1800c0058\ncall    sub_180005B70                                                  ; +0x11b, 0x1800c005b\nmov     rcx, [rsp+58h+var_20]                                          ; +0x120, 0x1800c0060\nxor     rcx, rsp; StackCookie                                          ; +0x125, 0x1800c0065\ncall    __security_check_cookie                                        ; +0x128, 0x1800c0068\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x12d, 0x1800c006d\nadd     rsp, 40h                                                       ; +0x132, 0x1800c0072\npop     rdi                                                            ; +0x136, 0x1800c0076\npop     rsi                                                            ; +0x137, 0x1800c0077\npop     rbp                                                            ; +0x138, 0x1800c0078\nretn                                                                   ; +0x139, 0x1800c0079", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b9408"], "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"}