{"type": "func", "start": 6443237824, "end": 6443238048, "name": "cocos2d::CCDirector::updateScreenScale", "pseudocode": "// \n// cocos2d::CCDirector::updateScreenScale from 0x1800c01c0 to 0x1800c02a0 (224 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLView::updateWindow @ 0x180079287\n// > cocos2d::CCDirector::setupScreenScale @ 0x1800bfc97\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9438\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__int64 __fastcall cocos2d::CCDirector::updateScreenScale(cocos2d::CCDirector *this, struct cocos2d::CCSize a2)\n{\n  unsigned int v3; // edi\n  struct cocos2d::CCEGLView *v4; // rax\n  __int64 v5; // r8\n  struct cocos2d::CCDirector *v6; // rax\n  float v7; // xmm1_4\n  float v9; // xmm2_4\n  float v10; // xmm1_4\n  float v11; // xmm2_4\n  float v12; // [rsp+30h] [rbp+8h] BYREF\n  float v13; // [rsp+34h] [rbp+Ch]\n\n  cocos2d::CCSize::operator=(&this->m_obResolutionInPixels, *(_DWORD **)&a2);\n  v3 = 3;\n  if ( (float)(this->m_obResolutionInPixels.height / this->m_obScaleFactor.height) > (float)(this->m_obResolutionInPixels.width\n                                                                                           / this->m_obScaleFactor.width) )\n    v3 = 4;\n  v4 = cocos2d::CCEGLView::sharedOpenGLView();\n  ((void (__fastcall *)(struct cocos2d::CCEGLView *, cocos2d::CCEGLView_vtbl *, __int64, _QWORD))v4->setDesignResolutionSize)(\n    v4,\n    v4->__vftable,\n    v5,\n    v3);\n  v6 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::cc_timeval::operator=(&v12, &v6->m_obWinSizeInPoints);\n  v7 = v12;\n  v9 = v13;\n  this->m_fScreenRight = v12;\n  v10 = v7 / this->m_obScaleFactor.width;\n  *(_QWORD *)&this->m_fScreenBottom = 0;\n  this->m_fScreenTop = v9;\n  v11 = v9 / this->m_obScaleFactor.height;\n  this->m_fScreenScaleFactorW = v10;\n  this->m_fScreenScaleFactorH = v11;\n  this->m_fScreenScaleFactor = fminf(v10, v11);\n  this->m_fScreenScaleFactorMax = fmaxf(v10, v11);\n  return 0;\n}", "assembly": "; \n; cocos2d::CCDirector::updateScreenScale from 0x1800c01c0 to 0x1800c02a0 (224 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLView::updateWindow @ 0x180079287\n; > cocos2d::CCDirector::setupScreenScale @ 0x1800bfc97\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9438\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, 0x1800c01c0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800c01c5\npush    rdi                                                            ; +0xa, 0x1800c01ca\nsub     rsp, 20h                                                       ; +0xb, 0x1800c01cb\nmov     rsi, rcx                                                       ; +0xf, 0x1800c01cf\nadd     rcx, 180h                                                      ; +0x12, 0x1800c01d2\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x19, 0x1800c01d9\nmovss   xmm1, dword ptr [rsi+184h]                                     ; +0x1e, 0x1800c01de\nmov     eax, 4                                                         ; +0x26, 0x1800c01e6\nmovss   xmm0, dword ptr [rsi+180h]                                     ; +0x2b, 0x1800c01eb\nmov     edi, 3                                                         ; +0x33, 0x1800c01f3\ndivss   xmm1, dword ptr [rsi+17Ch]                                     ; +0x38, 0x1800c01f8\ndivss   xmm0, dword ptr [rsi+178h]                                     ; +0x40, 0x1800c0200\ncomiss  xmm1, xmm0                                                     ; +0x48, 0x1800c0208\ncmova   edi, eax                                                       ; +0x4b, 0x1800c020b\ncall    ?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x4e, 0x1800c020e\nmovss   xmm2, dword ptr [rsi+17Ch]                                     ; +0x53, 0x1800c0213\nmov     r9d, edi                                                       ; +0x5b, 0x1800c021b\nmovss   xmm1, dword ptr [rsi+178h]                                     ; +0x5e, 0x1800c021e\nmov     rcx, rax                                                       ; +0x66, 0x1800c0226\nmov     rdx, [rax]                                                     ; +0x69, 0x1800c0229\ncall    qword ptr [rdx+48h]                                            ; +0x6c, 0x1800c022c\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x6f, 0x1800c022f\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x74, 0x1800c0234\nlea     rdx, [rax+138h]                                                ; +0x79, 0x1800c0239\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x80, 0x1800c0240\nmovss   xmm1, [rsp+28h+arg_0]                                          ; +0x85, 0x1800c0245\nxor     eax, eax                                                       ; +0x8b, 0x1800c024b\nmovss   xmm2, [rsp+28h+arg_4]                                          ; +0x8d, 0x1800c024d\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x93, 0x1800c0253\nmovss   dword ptr [rsi+5Ch], xmm1                                      ; +0x98, 0x1800c0258\ndivss   xmm1, dword ptr [rsi+178h]                                     ; +0x9d, 0x1800c025d\nmov     [rsi+54h], rax                                                 ; +0xa5, 0x1800c0265\nmovss   dword ptr [rsi+50h], xmm2                                      ; +0xa9, 0x1800c0269\ndivss   xmm2, dword ptr [rsi+17Ch]                                     ; +0xae, 0x1800c026e\nmovaps  xmm0, xmm1                                                     ; +0xb6, 0x1800c0276\nmovss   dword ptr [rsi+48h], xmm1                                      ; +0xb9, 0x1800c0279\nminss   xmm0, xmm2                                                     ; +0xbe, 0x1800c027e\nmovss   dword ptr [rsi+4Ch], xmm2                                      ; +0xc2, 0x1800c0282\nmaxss   xmm1, xmm2                                                     ; +0xc7, 0x1800c0287\nmovss   dword ptr [rsi+40h], xmm0                                      ; +0xcb, 0x1800c028b\nmovss   dword ptr [rsi+44h], xmm1                                      ; +0xd0, 0x1800c0290\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xd5, 0x1800c0295\nadd     rsp, 20h                                                       ; +0xda, 0x1800c029a\npop     rdi                                                            ; +0xde, 0x1800c029e\nretn                                                                   ; +0xdf, 0x1800c029f", "xrefs": ["cocos2d::CCEGLView::updateWindow @ 0x180079287", "cocos2d::CCDirector::setupScreenScale @ 0x1800bfc97", "<???> @ 0x1801438a8", "<???> @ 0x1801b9438"], "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"}