{"type": "func", "start": 6442892960, "end": 6442893424, "name": "cocos2d::CCEGLViewProtocol::setDesignResolutionSize", "pseudocode": "// \n// cocos2d::CCEGLViewProtocol::setDesignResolutionSize from 0x18006bea0 to 0x18006c070 (464 bytes)\n// \n// 6 xrefs:\n// > <???> @ 0x1801002c0\n// > <???> @ 0x1801008f0\n// > <???> @ 0x18013a208\n// > <???> @ 0x18013a23c\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3e58\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::CCEGLViewProtocol::setDesignResolutionSize(cocos2d::CCRect *a1, float a2, float a3, int a4)\n{\n  float x; // xmm11_4\n  float y; // xmm10_4\n  float width; // xmm7_4\n  float height; // xmm8_4\n  float v10; // xmm0_4\n  float v11; // xmm6_4\n  float v12; // xmm0_4\n  float v13; // xmm0_4\n  float v14; // xmm7_4\n  float v15; // xmm11_4\n  cocos2d::CCPoint origin; // rax\n  _DWORD *v17; // rbx\n  struct cocos2d::CCDirector *v18; // rax\n  cocos2d::CCNode *v19; // rax\n  cocos2d::CCDirector *v20; // rax\n\n  if ( a2 != 0.0 && a3 != 0.0 )\n  {\n    cocos2d::CCSize::setSize(&a1[1].size, a2, a3);\n    x = a1[1].origin.x;\n    y = a1[1].origin.y;\n    width = a1[1].size.width;\n    height = a1[1].size.height;\n    v10 = x / width;\n    v11 = y / height;\n    a1[6].origin.y = x / width;\n    a1[6].size.width = y / height;\n    switch ( a4 )\n    {\n      case 1:\n        v10 = fmaxf(v10, v11);\n        a1[6].size.width = v10;\n        v11 = v10;\n        a1[6].origin.y = v10;\n        break;\n      case 2:\n        v10 = fminf(v10, v11);\n        a1[6].size.width = v10;\n        v11 = v10;\n        a1[6].origin.y = v10;\n        break;\n      case 3:\n        a1[6].origin.y = v11;\n        v12 = ceilf(x / v11);\n        a1[1].size.width = v12;\n        width = v12;\n        v10 = y / height;\n        break;\n      case 4:\n        a1[6].size.width = v10;\n        v13 = ceilf(y / v10);\n        a1[1].size.height = v13;\n        height = v13;\n        v10 = x / width;\n        v11 = x / width;\n        break;\n    }\n    v14 = width * v10;\n    v15 = (float)(x - v14) * 0.5;\n    cocos2d::CCRect::setRect(a1 + 2, v15, (float)(y - (float)(v11 * height)) * 0.5, v14, v11 * height);\n    origin = a1->origin;\n    LODWORD(a1[6].size.height) = a4;\n    v17 = (_DWORD *)(*(__int64 (__fastcall **)(cocos2d::CCRect *))(*(_QWORD *)&origin + 80LL))(a1);\n    v18 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCSize::operator=(&v18->m_obWinSizeInPoints, v17);\n    v19 = (cocos2d::CCNode *)cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCNode::updateTweenActionInt(v19, v15);\n    v20 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCDirector::setGLDefaultValues(v20);\n  }\n}", "assembly": "; \n; cocos2d::CCEGLViewProtocol::setDesignResolutionSize from 0x18006bea0 to 0x18006c070 (464 bytes)\n; \n; 6 xrefs:\n; > <???> @ 0x1801002c0\n; > <???> @ 0x1801008f0\n; > <???> @ 0x18013a208\n; > <???> @ 0x18013a23c\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3e58\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, 0x18006bea0\npush    rdi                                                            ; +0x5, 0x18006bea5\nsub     rsp, 90h                                                       ; +0x6, 0x18006bea6\nxorps   xmm0, xmm0                                                     ; +0xd, 0x18006bead\nmov     edi, r9d                                                       ; +0x10, 0x18006beb0\nucomiss xmm1, xmm0                                                     ; +0x13, 0x18006beb3\nmov     rbx, rcx                                                       ; +0x16, 0x18006beb6\njp      short loc_18006BEC1                                            ; +0x19, 0x18006beb9\njz      loc_18006C05F                                                  ; +0x1b, 0x18006bebb\nucomiss xmm2, xmm0                                                     ; +0x21, 0x18006bec1\njp      short loc_18006BECC                                            ; +0x24, 0x18006bec4\njz      loc_18006C05F                                                  ; +0x26, 0x18006bec6\nmov     [rsp+98h+arg_0], rsi                                           ; +0x2c, 0x18006becc\nadd     rcx, 18h; this                                                 ; +0x34, 0x18006bed4\nmovaps  [rsp+98h+var_18], xmm6                                         ; +0x38, 0x18006bed8\nmovaps  [rsp+98h+var_28], xmm7                                         ; +0x40, 0x18006bee0\nmovaps  [rsp+98h+var_38], xmm8                                         ; +0x45, 0x18006bee5\nmovaps  [rsp+98h+var_58], xmm10                                        ; +0x4b, 0x18006beeb\nmovaps  [rsp+98h+var_68], xmm11                                        ; +0x51, 0x18006bef1\ncall    ?setSize@CCSize@cocos2d@@QEAAXMM@Z; cocos2d::CCSize::setSize(float,float) ; +0x57, 0x18006bef7\nmovss   xmm11, dword ptr [rbx+10h]                                     ; +0x5c, 0x18006befc\nmovss   xmm10, dword ptr [rbx+14h]                                     ; +0x62, 0x18006bf02\nmovaps  xmm0, xmm11                                                    ; +0x68, 0x18006bf08\nmovss   xmm7, dword ptr [rbx+18h]                                      ; +0x6c, 0x18006bf0c\nmovaps  xmm6, xmm10                                                    ; +0x71, 0x18006bf11\nmovss   xmm8, dword ptr [rbx+1Ch]                                      ; +0x75, 0x18006bf15\ndivss   xmm0, xmm7                                                     ; +0x7b, 0x18006bf1b\ndivss   xmm6, xmm8                                                     ; +0x7f, 0x18006bf1f\nmovss   dword ptr [rbx+64h], xmm0                                      ; +0x84, 0x18006bf24\nmovss   dword ptr [rbx+68h], xmm6                                      ; +0x89, 0x18006bf29\ncmp     edi, 1                                                         ; +0x8e, 0x18006bf2e\njnz     short loc_18006BF46                                            ; +0x91, 0x18006bf31\nmaxss   xmm0, xmm6                                                     ; +0x93, 0x18006bf33\nmovss   dword ptr [rbx+68h], xmm0                                      ; +0x97, 0x18006bf37\nmovaps  xmm6, xmm0                                                     ; +0x9c, 0x18006bf3c\nmovss   dword ptr [rbx+64h], xmm0                                      ; +0x9f, 0x18006bf3f\njmp     short loc_18006BFBC                                            ; +0xa4, 0x18006bf44\nmovaps  [rsp+98h+var_48], xmm9                                         ; +0xa6, 0x18006bf46\nmovaps  xmm9, xmm0                                                     ; +0xac, 0x18006bf4c\ncmp     edi, 2                                                         ; +0xb0, 0x18006bf50\njnz     short loc_18006BF68                                            ; +0xb3, 0x18006bf53\nminss   xmm0, xmm6                                                     ; +0xb5, 0x18006bf55\nmovss   dword ptr [rbx+68h], xmm0                                      ; +0xb9, 0x18006bf59\nmovaps  xmm6, xmm0                                                     ; +0xbe, 0x18006bf5e\nmovss   dword ptr [rbx+64h], xmm0                                      ; +0xc1, 0x18006bf61\njmp     short loc_18006BFB6                                            ; +0xc6, 0x18006bf66\ncmp     edi, 3                                                         ; +0xc8, 0x18006bf68\njnz     short loc_18006BF8C                                            ; +0xcb, 0x18006bf6b\nmovaps  xmm0, xmm11                                                    ; +0xcd, 0x18006bf6d\nmovss   dword ptr [rbx+64h], xmm6                                      ; +0xd1, 0x18006bf71\ndivss   xmm0, xmm6; X                                                  ; +0xd6, 0x18006bf76\ncall    ceilf                                                          ; +0xda, 0x18006bf7a\nmovss   dword ptr [rbx+18h], xmm0                                      ; +0xdf, 0x18006bf7f\nmovaps  xmm7, xmm0                                                     ; +0xe4, 0x18006bf84\nmovaps  xmm0, xmm6                                                     ; +0xe7, 0x18006bf87\njmp     short loc_18006BFB6                                            ; +0xea, 0x18006bf8a\ncmp     edi, 4                                                         ; +0xec, 0x18006bf8c\njnz     short loc_18006BFB6                                            ; +0xef, 0x18006bf8f\nmovaps  xmm0, xmm10                                                    ; +0xf1, 0x18006bf91\nmovss   dword ptr [rbx+68h], xmm9                                      ; +0xf5, 0x18006bf95\ndivss   xmm0, xmm9; X                                                  ; +0xfb, 0x18006bf9b\ncall    ceilf                                                          ; +0x100, 0x18006bfa0\nmovss   dword ptr [rbx+1Ch], xmm0                                      ; +0x105, 0x18006bfa5\nmovaps  xmm8, xmm0                                                     ; +0x10a, 0x18006bfaa\nmovaps  xmm0, xmm9                                                     ; +0x10e, 0x18006bfae\nmovaps  xmm6, xmm9                                                     ; +0x112, 0x18006bfb2\nmovaps  xmm9, [rsp+98h+var_48]                                         ; +0x116, 0x18006bfb6\nmulss   xmm7, xmm0                                                     ; +0x11c, 0x18006bfbc\nlea     rcx, [rbx+20h]; this                                           ; +0x120, 0x18006bfc0\nmulss   xmm6, xmm8                                                     ; +0x124, 0x18006bfc4\nsubss   xmm11, xmm7                                                    ; +0x129, 0x18006bfc9\nmovaps  xmm3, xmm7; float                                              ; +0x12e, 0x18006bfce\nsubss   xmm10, xmm6                                                    ; +0x131, 0x18006bfd1\nmovss   [rsp+98h+var_78], xmm6; float                                  ; +0x136, 0x18006bfd6\nmulss   xmm11, cs:dword_1800E6308                                      ; +0x13c, 0x18006bfdc\nmulss   xmm10, cs:dword_1800E6308                                      ; +0x145, 0x18006bfe5\nmovaps  xmm1, xmm11; float                                             ; +0x14e, 0x18006bfee\nmovaps  xmm2, xmm10; float                                             ; +0x152, 0x18006bff2\ncall    ?setRect@CCRect@cocos2d@@QEAAXMMMM@Z; cocos2d::CCRect::setRect(float,float,float,float) ; +0x156, 0x18006bff6\nmov     rax, [rbx]                                                     ; +0x15b, 0x18006bffb\nmov     rcx, rbx                                                       ; +0x15e, 0x18006bffe\nmov     [rbx+6Ch], edi                                                 ; +0x161, 0x18006c001\ncall    qword ptr [rax+50h]                                            ; +0x164, 0x18006c004\nmov     rbx, rax                                                       ; +0x167, 0x18006c007\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x16a, 0x18006c00a\nmov     rdx, rbx                                                       ; +0x16f, 0x18006c00f\nlea     rcx, [rax+138h]                                                ; +0x172, 0x18006c012\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x179, 0x18006c019\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x17e, 0x18006c01e\nmov     rcx, rax; this                                                 ; +0x183, 0x18006c023\ncall    ?updateTweenActionInt@CCNode@cocos2d@@UEAAXMH@Z; cocos2d::CCNode::updateTweenActionInt(float,int) ; +0x186, 0x18006c026\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x18b, 0x18006c02b\nmov     rcx, rax; this                                                 ; +0x190, 0x18006c030\ncall    ?setGLDefaultValues@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::setGLDefaultValues(void) ; +0x193, 0x18006c033\nmovaps  xmm11, [rsp+98h+var_68]                                        ; +0x198, 0x18006c038\nmovaps  xmm10, [rsp+98h+var_58]                                        ; +0x19e, 0x18006c03e\nmovaps  xmm8, [rsp+98h+var_38]                                         ; +0x1a4, 0x18006c044\nmovaps  xmm7, [rsp+98h+var_28]                                         ; +0x1aa, 0x18006c04a\nmovaps  xmm6, [rsp+98h+var_18]                                         ; +0x1af, 0x18006c04f\nmov     rsi, [rsp+98h+arg_0]                                           ; +0x1b7, 0x18006c057\nmov     rbx, [rsp+98h+arg_8]                                           ; +0x1bf, 0x18006c05f\nadd     rsp, 90h                                                       ; +0x1c7, 0x18006c067\npop     rdi                                                            ; +0x1ce, 0x18006c06e\nretn                                                                   ; +0x1cf, 0x18006c06f", "xrefs": ["<???> @ 0x1801002c0", "<???> @ 0x1801008f0", "<???> @ 0x18013a208", "<???> @ 0x18013a23c", "<???> @ 0x1801438a8", "<???> @ 0x1801b3e58"], "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"}