{"type": "func", "start": 6442946016, "end": 6442946607, "name": "cocos2d::CCEGLView::toggleFullScreen", "pseudocode": "// \n// cocos2d::CCEGLView::toggleFullScreen from 0x180078de0 to 0x18007902f (591 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x18013b430\n// > <???> @ 0x18013b444\n// > <???> @ 0x18013b454\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b4b00\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::CCEGLView::toggleFullScreen(cocos2d::CCEGLView *this, char a2, char a3, char a4)\n{\n  __int64 v5; // rax\n  int *v6; // rax\n  cocos2d::CCRect *v7; // rax\n  float v8; // xmm3_4\n  cocos2d::CCRect *v9; // rax\n  struct cocos2d::CCRect *v10; // rax\n  unsigned int height; // ebx\n  unsigned int width; // edi\n  HWND v13; // rax\n  float v14; // [rsp+20h] [rbp-48h]\n  cocos2d::CCRect v15; // [rsp+40h] [rbp-28h] BYREF\n  cocos2d::CCRect v16; // [rsp+50h] [rbp-18h] BYREF\n\n  if ( *((_BYTE *)this + 232) != a2 || *((_BYTE *)this + 233) != a3 || *((_BYTE *)this + 234) != a4 )\n  {\n    *((_BYTE *)this + 232) = a2;\n    *((_BYTE *)this + 233) = a3;\n    *((_BYTE *)this + 234) = a4;\n    BYTE1(cocos2d::CCApplication::sharedApplication()[2].m_startupScriptFilename.m_data.m_size) = *((_BYTE *)this + 232);\n    sub_1800D4950(*((_QWORD *)this + 25));\n    cocos2d::CCRect::CCRect(&v15);\n    if ( *((_BYTE *)this + 232) )\n    {\n      v5 = sub_1800D41B0();\n      *((_QWORD *)this + 26) = v5;\n      v6 = (int *)sub_1800D41F0(v5);\n      v7 = cocos2d::CCRect::CCRect(&v16, 0.0, 0.0, (float)*v6, (float)v6[1]);\n      cocos2d::CCRect::operator=((float *)&v15.origin, (float *)&v7->origin);\n      if ( *((_BYTE *)this + 233) )\n      {\n        sub_1800D4D00(131077, 0);\n        if ( *((_BYTE *)this + 234) )\n        {\n          v15.size.width = v15.size.width + 1.0;\n          v15.size.height = v15.size.height + 1.0;\n        }\n        *((_QWORD *)this + 26) = 0;\n      }\n    }\n    else\n    {\n      sub_1800D4D00(131077, 1);\n      v8 = *((float *)this + 54);\n      v14 = *((float *)this + 55);\n      *((_QWORD *)this + 26) = 0;\n      v9 = cocos2d::CCRect::CCRect(&v16, 0.0, 0.0, v8, v14);\n      cocos2d::CCRect::operator=((float *)&v15.origin, (float *)&v9->origin);\n    }\n    *((_DWORD *)this + 48) = 1065353216;\n    v10 = cocos2d::CCRect::CCRect(&v16, &v15);\n    cocos2d::CCEGLView::setupWindow(this, v10);\n    height = (int)v15.size.height;\n    width = (int)v15.size.width;\n    sub_1800D4CB0(*((_QWORD *)this + 25));\n    sub_1800D4B50(*((_QWORD *)this + 25), width, height);\n    cocos2d::CCEGLView::updateWindow(this, width, height);\n    sub_1800D44D0(*((_QWORD *)this + 25));\n    if ( *((_BYTE *)this + 232) && *((_BYTE *)this + 233) )\n    {\n      if ( *((_BYTE *)this + 234) )\n      {\n        v13 = (HWND)sub_1800D8320(*((_QWORD *)this + 25));\n        SetWindowPos(v13, HWND_MESSAGE|0x2LL, 0, 0, 0, 0, 0x53u);\n      }\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCEGLView::toggleFullScreen from 0x180078de0 to 0x18007902f (591 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x18013b430\n; > <???> @ 0x18013b444\n; > <???> @ 0x18013b454\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b4b00\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    rsi                                                            ; +0x0, 0x180078de0\nsub     rsp, 60h                                                       ; +0x2, 0x180078de2\nmov     rsi, rcx                                                       ; +0x6, 0x180078de6\ncmp     [rcx+0E8h], dl                                                 ; +0x9, 0x180078de9\njnz     short loc_180078E07                                            ; +0xf, 0x180078def\ncmp     [rcx+0E9h], r8b                                                ; +0x11, 0x180078df1\njnz     short loc_180078E07                                            ; +0x18, 0x180078df8\ncmp     [rcx+0EAh], r9b                                                ; +0x1a, 0x180078dfa\njz      loc_180079029                                                  ; +0x21, 0x180078e01\nmov     [rsp+68h+arg_0], rbx                                           ; +0x27, 0x180078e07\nmov     [rsp+68h+arg_8], rdi                                           ; +0x2c, 0x180078e0c\nmov     [rsp+68h+arg_10], r14                                          ; +0x31, 0x180078e11\nmov     [rsp+68h+arg_18], r15                                          ; +0x39, 0x180078e19\nmov     [rcx+0E8h], dl                                                 ; +0x41, 0x180078e21\nmov     [rcx+0E9h], r8b                                                ; +0x47, 0x180078e27\nmov     [rcx+0EAh], r9b                                                ; +0x4e, 0x180078e2e\ncall    ?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x55, 0x180078e35\nmovzx   ecx, byte ptr [rsi+0E8h]                                       ; +0x5a, 0x180078e3a\nmov     [rax+0C9h], cl                                                 ; +0x61, 0x180078e41\nmov     rcx, [rsi+0C8h]                                                ; +0x67, 0x180078e47\ncall    sub_1800D4950                                                  ; +0x6e, 0x180078e4e\nlea     rcx, [rsp+68h+var_28]; this                                    ; +0x73, 0x180078e53\ncall    ??0CCRect@cocos2d@@QEAA@XZ; cocos2d::CCRect::CCRect(void)      ; +0x78, 0x180078e58\ncmp     byte ptr [rsi+0E8h], 0                                         ; +0x7d, 0x180078e5d\njz      loc_180078F07                                                  ; +0x84, 0x180078e64\ncall    sub_1800D41B0                                                  ; +0x8a, 0x180078e6a\nmov     rcx, rax                                                       ; +0x8f, 0x180078e6f\nmov     [rsi+0D0h], rax                                                ; +0x92, 0x180078e72\ncall    sub_1800D41F0                                                  ; +0x99, 0x180078e79\nxorps   xmm2, xmm2; float                                              ; +0x9e, 0x180078e7e\nlea     rcx, [rsp+68h+var_18]; this                                    ; +0xa1, 0x180078e81\nxorps   xmm1, xmm1; float                                              ; +0xa6, 0x180078e86\nmovd    xmm0, dword ptr [rax+4]                                        ; +0xa9, 0x180078e89\nmovd    xmm3, dword ptr [rax]                                          ; +0xae, 0x180078e8e\ncvtdq2ps xmm0, xmm0                                                    ; +0xb2, 0x180078e92\ncvtdq2ps xmm3, xmm3; float                                             ; +0xb5, 0x180078e95\nmovss   [rsp+68h+var_48], xmm0; float                                  ; +0xb8, 0x180078e98\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0xbe, 0x180078e9e\nmov     rdx, rax                                                       ; +0xc3, 0x180078ea3\nlea     rcx, [rsp+68h+var_28]                                          ; +0xc6, 0x180078ea6\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0xcb, 0x180078eab\ncmp     byte ptr [rsi+0E9h], 0                                         ; +0xd0, 0x180078eb0\njz      loc_180078F54                                                  ; +0xd7, 0x180078eb7\nxor     edx, edx                                                       ; +0xdd, 0x180078ebd\nmov     ecx, 20005h                                                    ; +0xdf, 0x180078ebf\ncall    sub_1800D4D00                                                  ; +0xe4, 0x180078ec4\ncmp     byte ptr [rsi+0EAh], 0                                         ; +0xe9, 0x180078ec9\njz      short loc_180078EFA                                            ; +0xf0, 0x180078ed0\nmovss   xmm0, [rsp+68h+var_20]                                         ; +0xf2, 0x180078ed2\nmovss   xmm1, [rsp+68h+var_1C]                                         ; +0xf8, 0x180078ed8\naddss   xmm0, cs:flt_1800E61A8                                         ; +0xfe, 0x180078ede\naddss   xmm1, cs:flt_1800E61A8                                         ; +0x106, 0x180078ee6\nmovss   [rsp+68h+var_20], xmm0                                         ; +0x10e, 0x180078eee\nmovss   [rsp+68h+var_1C], xmm1                                         ; +0x114, 0x180078ef4\nmov     qword ptr [rsi+0D0h], 0                                        ; +0x11a, 0x180078efa\njmp     short loc_180078F54                                            ; +0x125, 0x180078f05\nmov     edx, 1                                                         ; +0x127, 0x180078f07\nmov     ecx, 20005h                                                    ; +0x12c, 0x180078f0c\ncall    sub_1800D4D00                                                  ; +0x131, 0x180078f11\nmovss   xmm0, dword ptr [rsi+0DCh]                                     ; +0x136, 0x180078f16\nlea     rcx, [rsp+68h+var_18]; this                                    ; +0x13e, 0x180078f1e\nmovss   xmm3, dword ptr [rsi+0D8h]; float                              ; +0x143, 0x180078f23\nxorps   xmm2, xmm2; float                                              ; +0x14b, 0x180078f2b\nxorps   xmm1, xmm1; float                                              ; +0x14e, 0x180078f2e\nmovss   [rsp+68h+var_48], xmm0; float                                  ; +0x151, 0x180078f31\nmov     qword ptr [rsi+0D0h], 0                                        ; +0x157, 0x180078f37\ncall    ??0CCRect@cocos2d@@QEAA@MMMM@Z; cocos2d::CCRect::CCRect(float,float,float,float) ; +0x162, 0x180078f42\nmov     rdx, rax                                                       ; +0x167, 0x180078f47\nlea     rcx, [rsp+68h+var_28]                                          ; +0x16a, 0x180078f4a\ncall    ??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x16f, 0x180078f4f\nlea     rdx, [rsp+68h+var_28]; struct cocos2d::CCRect *                ; +0x174, 0x180078f54\nmov     dword ptr [rsi+0C0h], 3F800000h                                ; +0x179, 0x180078f59\nlea     rcx, [rsp+68h+var_18]; this                                    ; +0x183, 0x180078f63\nlea     r14, [rsi+0C8h]                                                ; +0x188, 0x180078f68\ncall    ??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x18f, 0x180078f6f\nmov     rdx, rax                                                       ; +0x194, 0x180078f74\nmov     rcx, rsi                                                       ; +0x197, 0x180078f77\ncall    ?setupWindow@CCEGLView@cocos2d@@IEAAXVCCRect@2@@Z; cocos2d::CCEGLView::setupWindow(cocos2d::CCRect) ; +0x19a, 0x180078f7a\nmov     rcx, [rsi+0C8h]                                                ; +0x19f, 0x180078f7f\ncvttss2si ebx, [rsp+68h+var_1C]                                        ; +0x1a6, 0x180078f86\ncvttss2si edi, [rsp+68h+var_20]                                        ; +0x1ac, 0x180078f8c\ncall    sub_1800D4CB0                                                  ; +0x1b2, 0x180078f92\nmov     rcx, [rsi+0C8h]                                                ; +0x1b7, 0x180078f97\nmov     r8d, ebx                                                       ; +0x1be, 0x180078f9e\nmov     edx, edi                                                       ; +0x1c1, 0x180078fa1\ncall    sub_1800D4B50                                                  ; +0x1c3, 0x180078fa3\nmov     r8d, ebx; int                                                  ; +0x1c8, 0x180078fa8\nmov     edx, edi; int                                                  ; +0x1cb, 0x180078fab\nmov     rcx, rsi; this                                                 ; +0x1cd, 0x180078fad\ncall    ?updateWindow@CCEGLView@cocos2d@@QEAAXHH@Z; cocos2d::CCEGLView::updateWindow(int,int) ; +0x1d0, 0x180078fb0\nmov     rcx, [rsi+0C8h]                                                ; +0x1d5, 0x180078fb5\ncall    sub_1800D44D0                                                  ; +0x1dc, 0x180078fbc\ncmp     byte ptr [rsi+0E8h], 0                                         ; +0x1e1, 0x180078fc1\nmov     r15, [rsp+68h+arg_18]                                          ; +0x1e8, 0x180078fc8\nmov     rdi, [rsp+68h+arg_8]                                           ; +0x1f0, 0x180078fd0\nmov     rbx, [rsp+68h+arg_0]                                           ; +0x1f5, 0x180078fd5\njz      short loc_180079021                                            ; +0x1fa, 0x180078fda\ncmp     byte ptr [rsi+0E9h], 0                                         ; +0x1fc, 0x180078fdc\njz      short loc_180079021                                            ; +0x203, 0x180078fe3\ncmp     byte ptr [rsi+0EAh], 0                                         ; +0x205, 0x180078fe5\njz      short loc_180079021                                            ; +0x20c, 0x180078fec\nmov     rcx, [r14]                                                     ; +0x20e, 0x180078fee\ncall    sub_1800D8320                                                  ; +0x211, 0x180078ff1\nxor     r9d, r9d; Y                                                    ; +0x216, 0x180078ff6\nmov     [rsp+68h+uFlags], 53h ; 'S'; uFlags                            ; +0x219, 0x180078ff9\nmov     [rsp+68h+cy], 0; cy                                            ; +0x221, 0x180079001\nxor     r8d, r8d; X                                                    ; +0x229, 0x180079009\nmov     rcx, rax; hWnd                                                 ; +0x22c, 0x18007900c\nmov     [rsp+68h+var_48], 0; cx                                        ; +0x22f, 0x18007900f\nlea     rdx, [r9-1]; hWndInsertAfter                                   ; +0x237, 0x180079017\ncall    cs:SetWindowPos                                                ; +0x23b, 0x18007901b\nmov     r14, [rsp+68h+arg_10]                                          ; +0x241, 0x180079021\nadd     rsp, 60h                                                       ; +0x249, 0x180079029\npop     rsi                                                            ; +0x24d, 0x18007902d\nretn                                                                   ; +0x24e, 0x18007902e", "xrefs": ["<???> @ 0x18013b430", "<???> @ 0x18013b444", "<???> @ 0x18013b454", "<???> @ 0x1801438a8", "<???> @ 0x1801b4b00"], "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"}