{"type": "func", "start": 6442956928, "end": 6442957488, "name": "cocos2d::CCEGLView::setupWindow", "pseudocode": "// \n// cocos2d::CCEGLView::setupWindow from 0x18007b880 to 0x18007bab0 (560 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLView::initWithRect @ 0x18007a0a5\n// > cocos2d::CCEGLView::toggleFullScreen @ 0x18007bf82\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bedb8\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:00 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall cocos2d::CCEGLView::setupWindow(__int64 a1, __int64 a2)\n{\n  __int64 v3; // rax\n  HWND v4; // rax\n  __int64 v5; // rax\n  _QWORD *v6; // rax\n  unsigned int ThrdAddr[4]; // [rsp+40h] [rbp-18h] BYREF\n\n  v3 = sub_1800DC220(\n         (int)(float)(*(float *)(a1 + 192) * *(float *)(a2 + 8)),\n         (int)(float)(*(float *)(a1 + 192) * *(float *)(a2 + 12)),\n         (int)a1 + 48,\n         *(_QWORD *)(a1 + 208),\n         0);\n  *(_QWORD *)(a1 + 200) = v3;\n  if ( *(_BYTE *)(a1 + 232) && *(_BYTE *)(a1 + 233) && *(_BYTE *)(a1 + 234) )\n  {\n    v4 = (HWND)sub_1800D9CB0(v3);\n    SetWindowPos(v4, HWND_MESSAGE|0x2LL, 0, 0, 0, 0, 0x53u);\n  }\n  sub_1800D7B50(*(_QWORD *)(a1 + 200));\n  sub_1800DD830(*(_QWORD *)(a1 + 200), sub_18007A5B0);\n  sub_1800DD4E0(*(_QWORD *)(a1 + 200), sub_18007A360);\n  sub_1800DD7F0(*(_QWORD *)(a1 + 200), 0);\n  sub_1800DD7B0(*(_QWORD *)(a1 + 200), 0);\n  v5 = sub_1800D9CB0(*(_QWORD *)(a1 + 200));\n  if ( !byte_1801B2558 )\n  {\n    qword_1801B2550 = v5;\n    byte_1801B2558 = 1;\n    v6 = (_QWORD *)sub_1800E4AC0(8u);\n    if ( v6 )\n      *v6 = &qword_1801B2550;\n    else\n      v6 = nullptr;\n    *(_QWORD *)ThrdAddr = beginthreadex(nullptr, 0, (_beginthreadex_proc_type)StartAddress, v6, 0, &ThrdAddr[2]);\n    if ( !*(_QWORD *)ThrdAddr )\n    {\n      ThrdAddr[2] = 0;\n      std::_Throw_Cpp_error(6);\n      __debugbreak();\n    }\n    if ( dword_1801B2568 )\n      terminate();\n    unk_1801B2560 = *(_OWORD *)ThrdAddr;\n  }\n  sub_1800DC910(*(_QWORD *)(a1 + 200), sub_18007A840);\n  sub_1800DC7C0(*(_QWORD *)(a1 + 200), sub_18007AA00);\n  sub_1800DC9A0(*(_QWORD *)(a1 + 200), sub_18007A8A0);\n  sub_1800DC840(*(_QWORD *)(a1 + 200), cocos2d::CCNode::updateTweenActionInt);\n  sub_1800DD560(*(_QWORD *)(a1 + 200), sub_18007A440);\n  sub_1800DC8D0(*(_QWORD *)(a1 + 200), sub_18007A7C0);\n  sub_1800DD520(*(_QWORD *)(a1 + 200), sub_18007A3F0);\n  return sub_1800DC890(*(_QWORD *)(a1 + 200), sub_18007A760);\n}", "assembly": "; \n; cocos2d::CCEGLView::setupWindow from 0x18007b880 to 0x18007bab0 (560 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLView::initWithRect @ 0x18007a0a5\n; > cocos2d::CCEGLView::toggleFullScreen @ 0x18007bf82\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bedb8\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:00 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18007b880\npush    rdi                                                            ; +0x5, 0x18007b885\nsub     rsp, 50h                                                       ; +0x6, 0x18007b886\nmov     rax, rdx                                                       ; +0xa, 0x18007b88a\nmov     rbx, rcx                                                       ; +0xd, 0x18007b88d\nxor     edi, edi                                                       ; +0x10, 0x18007b890\nmovss   xmm1, dword ptr [rcx+0C0h]                                     ; +0x12, 0x18007b892\nlea     r8, [rcx+30h]                                                  ; +0x1a, 0x18007b89a\nmovaps  xmm0, xmm1                                                     ; +0x1e, 0x18007b89e\nmulss   xmm0, dword ptr [rdx+0Ch]                                      ; +0x21, 0x18007b8a1\ncvttss2si edx, xmm0                                                    ; +0x26, 0x18007b8a6\nmulss   xmm1, dword ptr [rax+8]                                        ; +0x2a, 0x18007b8aa\ncvttss2si ecx, xmm1                                                    ; +0x2f, 0x18007b8af\nmov     qword ptr [rsp+58h+InitFlag], rdi                              ; +0x33, 0x18007b8b3\nmov     r9, [rbx+0D0h]                                                 ; +0x38, 0x18007b8b8\ncall    sub_1800DC220                                                  ; +0x3f, 0x18007b8bf\nmov     [rbx+0C8h], rax                                                ; +0x44, 0x18007b8c4\ncmp     [rbx+0E8h], dil                                                ; +0x4b, 0x18007b8cb\njz      short loc_18007B914                                            ; +0x52, 0x18007b8d2\ncmp     [rbx+0E9h], dil                                                ; +0x54, 0x18007b8d4\njz      short loc_18007B914                                            ; +0x5b, 0x18007b8db\ncmp     [rbx+0EAh], dil                                                ; +0x5d, 0x18007b8dd\njz      short loc_18007B914                                            ; +0x64, 0x18007b8e4\nmov     rcx, rax                                                       ; +0x66, 0x18007b8e6\ncall    sub_1800D9CB0                                                  ; +0x69, 0x18007b8e9\nmov     [rsp+58h+uFlags], 53h ; 'S'; uFlags                            ; +0x6e, 0x18007b8ee\nmov     [rsp+58h+cy], edi; cy                                          ; +0x76, 0x18007b8f6\nmov     [rsp+58h+InitFlag], edi; cx                                    ; +0x7a, 0x18007b8fa\nxor     r9d, r9d; Y                                                    ; +0x7e, 0x18007b8fe\nxor     r8d, r8d; X                                                    ; +0x81, 0x18007b901\nmov     rdx, 0FFFFFFFFFFFFFFFFh; hWndInsertAfter                       ; +0x84, 0x18007b904\nmov     rcx, rax; hWnd                                                 ; +0x8b, 0x18007b90b\ncall    cs:SetWindowPos                                                ; +0x8e, 0x18007b90e\nmov     rcx, [rbx+0C8h]                                                ; +0x94, 0x18007b914\ncall    sub_1800D7B50                                                  ; +0x9b, 0x18007b91b\nlea     rdx, sub_18007A5B0                                             ; +0xa0, 0x18007b920\nmov     rcx, [rbx+0C8h]                                                ; +0xa7, 0x18007b927\ncall    sub_1800DD830                                                  ; +0xae, 0x18007b92e\nlea     rdx, sub_18007A360                                             ; +0xb3, 0x18007b933\nmov     rcx, [rbx+0C8h]                                                ; +0xba, 0x18007b93a\ncall    sub_1800DD4E0                                                  ; +0xc1, 0x18007b941\nxor     edx, edx                                                       ; +0xc6, 0x18007b946\nmov     rcx, [rbx+0C8h]                                                ; +0xc8, 0x18007b948\ncall    sub_1800DD7F0                                                  ; +0xcf, 0x18007b94f\nxor     edx, edx                                                       ; +0xd4, 0x18007b954\nmov     rcx, [rbx+0C8h]                                                ; +0xd6, 0x18007b956\ncall    sub_1800DD7B0                                                  ; +0xdd, 0x18007b95d\nmov     rcx, [rbx+0C8h]                                                ; +0xe2, 0x18007b962\ncall    sub_1800D9CB0                                                  ; +0xe9, 0x18007b969\nmovzx   ecx, cs:byte_1801B2558                                         ; +0xee, 0x18007b96e\nnop                                                                    ; +0xf5, 0x18007b975\ntest    cl, cl                                                         ; +0xf6, 0x18007b976\njnz     loc_18007B9FF                                                  ; +0xf8, 0x18007b978\nmov     cs:qword_1801B2550, rax                                        ; +0xfe, 0x18007b97e\nmov     eax, 1                                                         ; +0x105, 0x18007b985\nxchg    al, cs:byte_1801B2558                                          ; +0x10a, 0x18007b98a\nmov     ecx, 8; Size                                                   ; +0x110, 0x18007b990\ncall    sub_1800E4AC0                                                  ; +0x115, 0x18007b995\ntest    rax, rax                                                       ; +0x11a, 0x18007b99a\njz      short loc_18007B9AB                                            ; +0x11d, 0x18007b99d\nlea     rcx, qword_1801B2550                                           ; +0x11f, 0x18007b99f\nmov     [rax], rcx                                                     ; +0x126, 0x18007b9a6\njmp     short loc_18007B9AE                                            ; +0x129, 0x18007b9a9\nmov     rax, rdi                                                       ; +0x12b, 0x18007b9ab\nmov     [rsp+58h+arg_0], rax                                           ; +0x12e, 0x18007b9ae\nlea     rcx, [rsp+58h+ThrdAddr+8]                                      ; +0x133, 0x18007b9b3\nmov     qword ptr [rsp+58h+cy], rcx; ThrdAddr                          ; +0x138, 0x18007b9b8\nmov     [rsp+58h+InitFlag], edi; InitFlag                              ; +0x13d, 0x18007b9bd\nmov     r9, rax; ArgList                                               ; +0x141, 0x18007b9c1\nlea     r8, StartAddress; StartAddress                                 ; +0x144, 0x18007b9c4\nxor     edx, edx; StackSize                                            ; +0x14b, 0x18007b9cb\nxor     ecx, ecx; Security                                             ; +0x14d, 0x18007b9cd\ncall    cs:_beginthreadex                                              ; +0x14f, 0x18007b9cf\nmov     qword ptr [rsp+58h+ThrdAddr], rax                              ; +0x155, 0x18007b9d5\ntest    rax, rax                                                       ; +0x15a, 0x18007b9da\njz      loc_18007BAA1                                                  ; +0x15d, 0x18007b9dd\ncmp     cs:dword_1801B2568, 0                                          ; +0x163, 0x18007b9e3\njz      short loc_18007B9F3                                            ; +0x16a, 0x18007b9ea\ncall    cs:__imp_terminate                                             ; +0x16c, 0x18007b9ec\ndb 0CCh                                                                ; +0x172, 0x18007b9f2\nmovups  xmm0, xmmword ptr [rsp+58h+ThrdAddr]                           ; +0x173, 0x18007b9f3\nmovaps  xmmword ptr cs:unk_1801B2560, xmm0                             ; +0x178, 0x18007b9f8\nlea     rdx, sub_18007A840                                             ; +0x17f, 0x18007b9ff\nmov     rcx, [rbx+0C8h]                                                ; +0x186, 0x18007ba06\ncall    sub_1800DC910                                                  ; +0x18d, 0x18007ba0d\nlea     rdx, sub_18007AA00                                             ; +0x192, 0x18007ba12\nmov     rcx, [rbx+0C8h]                                                ; +0x199, 0x18007ba19\ncall    sub_1800DC7C0                                                  ; +0x1a0, 0x18007ba20\nlea     rdx, sub_18007A8A0                                             ; +0x1a5, 0x18007ba25\nmov     rcx, [rbx+0C8h]                                                ; +0x1ac, 0x18007ba2c\ncall    sub_1800DC9A0                                                  ; +0x1b3, 0x18007ba33\nlea     rdx, ?updateTweenActionInt@CCNode@cocos2d@@UEAAXMH@Z; cocos2d::CCNode::updateTweenActionInt(float,int) ; +0x1b8, 0x18007ba38\nmov     rcx, [rbx+0C8h]                                                ; +0x1bf, 0x18007ba3f\ncall    sub_1800DC840                                                  ; +0x1c6, 0x18007ba46\nlea     rdx, sub_18007A440                                             ; +0x1cb, 0x18007ba4b\nmov     rcx, [rbx+0C8h]                                                ; +0x1d2, 0x18007ba52\ncall    sub_1800DD560                                                  ; +0x1d9, 0x18007ba59\nlea     rdx, sub_18007A7C0                                             ; +0x1de, 0x18007ba5e\nmov     rcx, [rbx+0C8h]                                                ; +0x1e5, 0x18007ba65\ncall    sub_1800DC8D0                                                  ; +0x1ec, 0x18007ba6c\nlea     rdx, sub_18007A3F0                                             ; +0x1f1, 0x18007ba71\nmov     rcx, [rbx+0C8h]                                                ; +0x1f8, 0x18007ba78\ncall    sub_1800DD520                                                  ; +0x1ff, 0x18007ba7f\nlea     rdx, sub_18007A760                                             ; +0x204, 0x18007ba84\nmov     rcx, [rbx+0C8h]                                                ; +0x20b, 0x18007ba8b\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x212, 0x18007ba92\nadd     rsp, 50h                                                       ; +0x217, 0x18007ba97\npop     rdi                                                            ; +0x21b, 0x18007ba9b\njmp     sub_1800DC890                                                  ; +0x21c, 0x18007ba9c\nmov     [rsp+58h+ThrdAddr+8], edi                                      ; +0x221, 0x18007baa1\nmov     ecx, 6; int                                                    ; +0x225, 0x18007baa5\ncall    ?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)      ; +0x22a, 0x18007baaa\nint     3; Trap to Debugger                                            ; +0x22f, 0x18007baaf", "xrefs": ["cocos2d::CCEGLView::initWithRect @ 0x18007a0a5", "cocos2d::CCEGLView::toggleFullScreen @ 0x18007bf82", "<???> @ 0x18014cf68", "<???> @ 0x1801bedb8"], "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"}