{"type": "func", "start": 6443236752, "end": 6443236940, "name": "cocos2d::CCDirector::showFPSLabel", "pseudocode": "// \n// cocos2d::CCDirector::showFPSLabel from 0x1800bfd90 to 0x1800bfe4c (188 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCDirector::drawScene @ 0x1800be472\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b93e4\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\nvoid __fastcall cocos2d::CCDirector::showFPSLabel(cocos2d::CCDirector *this)\n{\n  signed int v2; // eax\n  float v3; // xmm1_4\n  float v4; // xmm0_4\n  float v5; // xmm0_4\n\n  if ( this->m_pFPSNode )\n  {\n    v2 = this->m_uFrames + 1;\n    v3 = this->m_fDeltaTime + this->m_fFpsAccumDt;\n    this->m_uFrames = v2;\n    this->m_fFpsAccumDt = v3;\n    if ( v3 > 0.1 )\n    {\n      this->m_uFrames = 0;\n      this->m_fFpsAccumDt = 0.0;\n      v4 = (float)v2 / v3;\n      this->m_fFrameRate = v4;\n      v5 = roundf(v4);\n      sub_180009530(this->m_pszFPS, \"FPS: %i\", (int)v5);\n      ((void (__fastcall *)(cocos2d::CCLabelProtocol *, char *))this->m_pFPSNode->setString)(\n        &this->m_pFPSNode->cocos2d::CCLabelProtocol,\n        this->m_pszFPS);\n    }\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *))this->m_pFPSNode->visit)(this->m_pFPSNode);\n  }\n}", "assembly": "; \n; cocos2d::CCDirector::showFPSLabel from 0x1800bfd90 to 0x1800bfe4c (188 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCDirector::drawScene @ 0x1800be472\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b93e4\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\npush    rbx                                                            ; +0x0, 0x1800bfd90\nsub     rsp, 20h                                                       ; +0x2, 0x1800bfd92\ncmp     qword ptr [rcx+170h], 0                                        ; +0x6, 0x1800bfd96\nmov     rbx, rcx                                                       ; +0xe, 0x1800bfd9e\njz      loc_1800BFE46                                                  ; +0x11, 0x1800bfda1\nmov     eax, [rcx+100h]                                                ; +0x17, 0x1800bfda7\nmovss   xmm1, dword ptr [rcx+0A0h]                                     ; +0x1d, 0x1800bfdad\ninc     eax                                                            ; +0x25, 0x1800bfdb5\naddss   xmm1, dword ptr [rcx+0D4h]                                     ; +0x27, 0x1800bfdb7\nmov     [rcx+100h], eax                                                ; +0x2f, 0x1800bfdbf\ncomiss  xmm1, cs:flt_1800E8D34                                         ; +0x35, 0x1800bfdc5\nmovss   dword ptr [rcx+0D4h], xmm1                                     ; +0x3c, 0x1800bfdcc\njbe     short loc_1800BFE30                                            ; +0x44, 0x1800bfdd4\nxorps   xmm0, xmm0                                                     ; +0x46, 0x1800bfdd6\ncvtsi2ss xmm0, rax                                                     ; +0x49, 0x1800bfdd9\nxor     eax, eax                                                       ; +0x4e, 0x1800bfdde\nmov     [rcx+100h], eax                                                ; +0x50, 0x1800bfde0\nmov     [rcx+0D4h], eax                                                ; +0x56, 0x1800bfde6\ndivss   xmm0, xmm1; X                                                  ; +0x5c, 0x1800bfdec\nmovss   dword ptr [rcx+0DCh], xmm0                                     ; +0x60, 0x1800bfdf0\ncall    cs:__imp_roundf                                                ; +0x68, 0x1800bfdf8\nmov     rcx, [rbx+148h]; Buffer                                        ; +0x6e, 0x1800bfdfe\nlea     rdx, aFpsI; \"FPS: %i\"                                          ; +0x75, 0x1800bfe05\ncvttss2si r8d, xmm0                                                    ; +0x7c, 0x1800bfe0c\ncall    sub_180009530                                                  ; +0x81, 0x1800bfe11\nmov     rcx, [rbx+170h]                                                ; +0x86, 0x1800bfe16\nmov     rdx, [rbx+148h]                                                ; +0x8d, 0x1800bfe1d\nadd     rcx, 168h                                                      ; +0x94, 0x1800bfe24\nmov     rax, [rcx]                                                     ; +0x9b, 0x1800bfe2b\ncall    qword ptr [rax]                                                ; +0x9e, 0x1800bfe2e\nmov     rcx, [rbx+170h]                                                ; +0xa0, 0x1800bfe30\nmov     rax, [rcx]                                                     ; +0xa7, 0x1800bfe37\nadd     rsp, 20h                                                       ; +0xaa, 0x1800bfe3a\npop     rbx                                                            ; +0xae, 0x1800bfe3e\njmp     qword ptr [rax+2D8h]                                           ; +0xaf, 0x1800bfe3f\nadd     rsp, 20h                                                       ; +0xb6, 0x1800bfe46\npop     rbx                                                            ; +0xba, 0x1800bfe4a\nretn                                                                   ; +0xbb, 0x1800bfe4b", "xrefs": ["cocos2d::CCDirector::drawScene @ 0x1800be472", "<???> @ 0x1801438a8", "<???> @ 0x1801b93e4"], "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"}