{"type": "func", "start": 6443252304, "end": 6443252531, "name": "cocos2d::CCDirector::updateScreenScale", "pseudocode": "// \n// cocos2d::CCDirector::updateScreenScale from 0x1800c3a50 to 0x1800c3b33 (227 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLView::updateWindow @ 0x18007c297\n// > cocos2d::CCDirector::setupScreenScale @ 0x1800c34d7\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c36e4\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__int64 __fastcall cocos2d::CCDirector::updateScreenScale(__int64 a1, _DWORD *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=((_DWORD *)(a1 + 392), a2);\n  v3 = 3;\n  if ( (float)(*(float *)(a1 + 396) / *(float *)(a1 + 388)) > (float)(*(float *)(a1 + 392) / *(float *)(a1 + 384)) )\n    v3 = 4;\n  v4 = cocos2d::CCEGLView::sharedOpenGLView();\n  (*(void (__fastcall **)(struct cocos2d::CCEGLView *, _QWORD, __int64, _QWORD))(*(_QWORD *)v4 + 72LL))(\n    v4,\n    *(_QWORD *)(*(_QWORD *)v4 + 72LL),\n    v5,\n    v3);\n  v6 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::cc_timeval::operator=(&v12, (_DWORD *)v6 + 80);\n  v7 = v12;\n  v9 = v13;\n  *(float *)(a1 + 92) = v12;\n  v10 = v7 / *(float *)(a1 + 384);\n  *(_QWORD *)(a1 + 84) = 0;\n  *(float *)(a1 + 80) = v9;\n  v11 = v9 / *(float *)(a1 + 388);\n  *(float *)(a1 + 72) = v10;\n  *(float *)(a1 + 76) = v11;\n  *(float *)(a1 + 64) = fminf(v10, v11);\n  *(float *)(a1 + 68) = fmaxf(v10, v11);\n  return 0;\n}", "assembly": "; \n; cocos2d::CCDirector::updateScreenScale from 0x1800c3a50 to 0x1800c3b33 (227 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLView::updateWindow @ 0x18007c297\n; > cocos2d::CCDirector::setupScreenScale @ 0x1800c34d7\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c36e4\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; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1800c3a50\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800c3a55\npush    rdi                                                            ; +0xa, 0x1800c3a5a\nsub     rsp, 20h                                                       ; +0xb, 0x1800c3a5b\nmov     rsi, rcx                                                       ; +0xf, 0x1800c3a5f\nadd     rcx, 188h                                                      ; +0x12, 0x1800c3a62\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x19, 0x1800c3a69\nmovss   xmm1, dword ptr [rsi+18Ch]                                     ; +0x1e, 0x1800c3a6e\nmov     eax, 4                                                         ; +0x26, 0x1800c3a76\nmovss   xmm0, dword ptr [rsi+188h]                                     ; +0x2b, 0x1800c3a7b\nmov     edi, 3                                                         ; +0x33, 0x1800c3a83\ndivss   xmm1, dword ptr [rsi+184h]                                     ; +0x38, 0x1800c3a88\ndivss   xmm0, dword ptr [rsi+180h]                                     ; +0x40, 0x1800c3a90\ncomiss  xmm1, xmm0                                                     ; +0x48, 0x1800c3a98\ncmova   edi, eax                                                       ; +0x4b, 0x1800c3a9b\ncall    ?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x4e, 0x1800c3a9e\nmovss   xmm2, dword ptr [rsi+184h]                                     ; +0x53, 0x1800c3aa3\nmov     r9d, edi                                                       ; +0x5b, 0x1800c3aab\nmovss   xmm1, dword ptr [rsi+180h]                                     ; +0x5e, 0x1800c3aae\nmov     rcx, [rax]                                                     ; +0x66, 0x1800c3ab6\nmov     rdx, [rcx+48h]                                                 ; +0x69, 0x1800c3ab9\nmov     rcx, rax                                                       ; +0x6d, 0x1800c3abd\ncall    rdx                                                            ; +0x70, 0x1800c3ac0\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x72, 0x1800c3ac2\nlea     rcx, [rsp+28h+arg_0]                                           ; +0x77, 0x1800c3ac7\nlea     rdx, [rax+140h]                                                ; +0x7c, 0x1800c3acc\ncall    ??4cc_timeval@cocos2d@@QEAAAEAU01@$$QEAU01@@Z; cocos2d::cc_timeval::operator=(cocos2d::cc_timeval &&) ; +0x83, 0x1800c3ad3\nmovss   xmm1, [rsp+28h+arg_0]                                          ; +0x88, 0x1800c3ad8\nxor     eax, eax                                                       ; +0x8e, 0x1800c3ade\nmovss   xmm2, [rsp+28h+arg_4]                                          ; +0x90, 0x1800c3ae0\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x96, 0x1800c3ae6\nmovss   dword ptr [rsi+5Ch], xmm1                                      ; +0x9b, 0x1800c3aeb\ndivss   xmm1, dword ptr [rsi+180h]                                     ; +0xa0, 0x1800c3af0\nmov     [rsi+54h], rax                                                 ; +0xa8, 0x1800c3af8\nmovss   dword ptr [rsi+50h], xmm2                                      ; +0xac, 0x1800c3afc\ndivss   xmm2, dword ptr [rsi+184h]                                     ; +0xb1, 0x1800c3b01\nmovaps  xmm0, xmm1                                                     ; +0xb9, 0x1800c3b09\nmovss   dword ptr [rsi+48h], xmm1                                      ; +0xbc, 0x1800c3b0c\nminss   xmm0, xmm2                                                     ; +0xc1, 0x1800c3b11\nmovss   dword ptr [rsi+4Ch], xmm2                                      ; +0xc5, 0x1800c3b15\nmaxss   xmm1, xmm2                                                     ; +0xca, 0x1800c3b1a\nmovss   dword ptr [rsi+40h], xmm0                                      ; +0xce, 0x1800c3b1e\nmovss   dword ptr [rsi+44h], xmm1                                      ; +0xd3, 0x1800c3b23\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xd8, 0x1800c3b28\nadd     rsp, 20h                                                       ; +0xdd, 0x1800c3b2d\npop     rdi                                                            ; +0xe1, 0x1800c3b31\nretn                                                                   ; +0xe2, 0x1800c3b32", "xrefs": ["cocos2d::CCEGLView::updateWindow @ 0x18007c297", "cocos2d::CCDirector::setupScreenScale @ 0x1800c34d7", "<???> @ 0x18014cf68", "<???> @ 0x1801c36e4"], "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"}