{"type": "func", "start": 6443251600, "end": 6443251907, "name": "cocos2d::CCDirector::toggleShowFPS", "pseudocode": "// \n// cocos2d::CCDirector::toggleShowFPS from 0x1800c3790 to 0x1800c38c3 (307 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c36cc\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:22:26 +0000\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; // rdi\n  __int64 v12; // rbx\n  float *v13; // rax\n  struct cocos2d::CCDirector *v14; // rax\n  __int64 *v15; // rdi\n  __int64 v16; // rbx\n  float *v17; // rax\n  _DWORD v18[2]; // [rsp+20h] [rbp-48h] BYREF\n  float v19; // [rsp+28h] [rbp-40h] BYREF\n  const char *v20; // [rsp+30h] [rbp-38h]\n\n  v20 = a3;\n  v8 = *(cocos2d::CCObject **)(a1 + 376);\n  if ( v8 )\n  {\n    cocos2d::CCObject::release(v8);\n    *(_QWORD *)(a1 + 376) = 0;\n  }\n  *(_BYTE *)(a1 + 368) = 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 + 376) = v10;\n    (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v10 + 160LL))(v10);\n    v11 = *(__int64 **)(a1 + 376);\n    v12 = *v11;\n    v13 = kmVec2Fill(&v19, 0.0, 1.0);\n    (*(void (__fastcall **)(__int64 *, float *))(v12 + 288))(v11, v13);\n    cocos2d::CCObject::retain(*(cocos2d::CCObject **)(a1 + 376));\n    v14 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::cc_timeval::operator=(v18, (_DWORD *)v14 + 80);\n    v15 = *(__int64 **)(a1 + 376);\n    v16 = *v15;\n    v17 = kmVec2Fill(&v19, *a4 + 1.0, *(float *)&v18[1] + a4[1]);\n    (*(void (__fastcall **)(__int64 *, float *))(v16 + 184))(v15, v17);\n  }\n  sub_180005C70((__int64)a3);\n}", "assembly": "; \n; cocos2d::CCDirector::toggleShowFPS from 0x1800c3790 to 0x1800c38c3 (307 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c36cc\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:22:26 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800c3790\npush    rbp                                                            ; +0x2, 0x1800c3792\npush    rsi                                                            ; +0x3, 0x1800c3793\npush    rdi                                                            ; +0x4, 0x1800c3794\npush    r14                                                            ; +0x5, 0x1800c3795\nsub     rsp, 40h                                                       ; +0x7, 0x1800c3797\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x1800c379b\nxor     rax, rsp                                                       ; +0x12, 0x1800c37a2\nmov     [rsp+68h+var_30], rax                                          ; +0x15, 0x1800c37a5\nmov     r14, r9                                                        ; +0x1a, 0x1800c37aa\nmov     rsi, r8                                                        ; +0x1d, 0x1800c37ad\nmovzx   ebx, dl                                                        ; +0x20, 0x1800c37b0\nmov     rbp, rcx                                                       ; +0x23, 0x1800c37b3\nmov     [rsp+68h+var_38], r8                                           ; +0x26, 0x1800c37b6\nmov     rcx, [rcx+178h]; this                                          ; +0x2b, 0x1800c37bb\ntest    rcx, rcx                                                       ; +0x32, 0x1800c37c2\njz      short loc_1800C37D7                                            ; +0x35, 0x1800c37c5\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x37, 0x1800c37c7\nmov     qword ptr [rbp+178h], 0                                        ; +0x3c, 0x1800c37cc\nmov     [rbp+170h], bl                                                 ; +0x47, 0x1800c37d7\ntest    bl, bl                                                         ; +0x4d, 0x1800c37dd\njz      loc_1800C38A3                                                  ; +0x4f, 0x1800c37df\nmov     rdx, rsi                                                       ; +0x55, 0x1800c37e5\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x58, 0x1800c37e8\njbe     short loc_1800C37F2                                            ; +0x5d, 0x1800c37ed\nmov     rdx, [rsi]; char *                                             ; +0x5f, 0x1800c37ef\nlea     rcx, aFps0; \"FPS: 0\"                                           ; +0x62, 0x1800c37f2\ncall    ?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x69, 0x1800c37f9\nmov     [rbp+178h], rax                                                ; +0x6e, 0x1800c37fe\nmov     rcx, [rax]                                                     ; +0x75, 0x1800c3805\nmov     rdx, [rcx+0A0h]                                                ; +0x78, 0x1800c3808\nmovss   xmm1, cs:dword_1800EC358                                       ; +0x7f, 0x1800c380f\nmov     rcx, rax                                                       ; +0x87, 0x1800c3817\ncall    rdx                                                            ; +0x8a, 0x1800c381a\nmov     rdi, [rbp+178h]                                                ; +0x8c, 0x1800c381c\nmov     rbx, [rdi]                                                     ; +0x93, 0x1800c3823\nmovss   xmm2, cs:flt_1800EC208                                         ; +0x96, 0x1800c3826\nxorps   xmm1, xmm1                                                     ; +0x9e, 0x1800c382e\nlea     rcx, [rsp+68h+var_40]                                          ; +0xa1, 0x1800c3831\ncall    kmVec2Fill                                                     ; +0xa6, 0x1800c3836\nmov     rdx, rax                                                       ; +0xab, 0x1800c383b\nmov     rcx, rdi                                                       ; +0xae, 0x1800c383e\ncall    qword ptr [rbx+120h]                                           ; +0xb1, 0x1800c3841\nmov     rcx, [rbp+178h]; this                                          ; +0xb7, 0x1800c3847\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xbe, 0x1800c384e\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xc3, 0x1800c3853\nlea     rdx, [rax+140h]                                                ; +0xc8, 0x1800c3858\nlea     rcx, [rsp+68h+var_48]                                          ; +0xcf, 0x1800c385f\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0xd4, 0x1800c3864\nmov     rdi, [rbp+178h]                                                ; +0xd9, 0x1800c3869\nmov     rbx, [rdi]                                                     ; +0xe0, 0x1800c3870\nmovss   xmm2, [rsp+68h+var_44]                                         ; +0xe3, 0x1800c3873\naddss   xmm2, dword ptr [r14+4]                                        ; +0xe9, 0x1800c3879\nmovss   xmm1, dword ptr [r14]                                          ; +0xef, 0x1800c387f\naddss   xmm1, cs:flt_1800EC208                                         ; +0xf4, 0x1800c3884\nlea     rcx, [rsp+68h+var_40]                                          ; +0xfc, 0x1800c388c\ncall    kmVec2Fill                                                     ; +0x101, 0x1800c3891\nmov     rdx, rax                                                       ; +0x106, 0x1800c3896\nmov     rcx, rdi                                                       ; +0x109, 0x1800c3899\ncall    qword ptr [rbx+0B8h]                                           ; +0x10c, 0x1800c389c\nnop                                                                    ; +0x112, 0x1800c38a2\nmov     rcx, rsi                                                       ; +0x113, 0x1800c38a3\ncall    sub_180005C70                                                  ; +0x116, 0x1800c38a6\nmov     rcx, [rsp+68h+var_30]                                          ; +0x11b, 0x1800c38ab\nxor     rcx, rsp; StackCookie                                          ; +0x120, 0x1800c38b0\ncall    __security_check_cookie                                        ; +0x123, 0x1800c38b3\nadd     rsp, 40h                                                       ; +0x128, 0x1800c38b8\npop     r14                                                            ; +0x12c, 0x1800c38bc\npop     rdi                                                            ; +0x12e, 0x1800c38be\npop     rsi                                                            ; +0x12f, 0x1800c38bf\npop     rbp                                                            ; +0x130, 0x1800c38c0\npop     rbx                                                            ; +0x131, 0x1800c38c1\nretn                                                                   ; +0x132, 0x1800c38c2", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c36cc"], "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"}