{"type": "func", "start": 6442945120, "end": 6442945677, "name": "cocos2d::CCEGLView::setupWindow", "pseudocode": "// \n// cocos2d::CCEGLView::setupWindow from 0x180078a60 to 0x180078c8d (557 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCEGLView::initWithRect @ 0x18007736c\n// > cocos2d::CCEGLView::toggleFullScreen @ 0x180078f7a\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b4ad0\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// Hidden C++ exception states: #wind=1\n__int64 __fastcall cocos2d::CCEGLView::setupWindow(cocos2d::CCEGLView *this, struct cocos2d::CCRect *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_1800D44F0(\n         (int)(float)(*((float *)this + 48) * a2->size.width),\n         (int)(float)(*((float *)this + 48) * a2->size.height),\n         (int)this + 48,\n         *((_QWORD *)this + 26),\n         0);\n  *((_QWORD *)this + 25) = v3;\n  if ( *((_BYTE *)this + 232) && *((_BYTE *)this + 233) && *((_BYTE *)this + 234) )\n  {\n    v4 = (HWND)sub_1800D8320(v3);\n    SetWindowPos(v4, HWND_MESSAGE|0x2LL, 0, 0, 0, 0, 0x53u);\n  }\n  sub_1800D33F0(*((_QWORD *)this + 25));\n  sub_1800D5B00(*((_QWORD *)this + 25), sub_180077810);\n  sub_1800D57B0(*((_QWORD *)this + 25), sub_1800775B0);\n  sub_1800D5AC0(*((_QWORD *)this + 25), 0);\n  sub_1800D5A80(*((_QWORD *)this + 25), 0);\n  v5 = sub_1800D8320(*((_QWORD *)this + 25));\n  if ( !byte_1801A8528 )\n  {\n    qword_1801A8520 = v5;\n    byte_1801A8528 = 1;\n    v6 = operator new(8u);\n    if ( v6 )\n      *v6 = &qword_1801A8520;\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      JUMPOUT(0x180078C8CLL);\n    }\n    if ( dword_1801A8538 )\n      terminate();\n    unk_1801A8530 = *(_OWORD *)ThrdAddr;\n  }\n  sub_1800D4BE0(*((_QWORD *)this + 25), sub_180077C40);\n  sub_1800D4A90(*((_QWORD *)this + 25), sub_180077E00);\n  sub_1800D4C70(*((_QWORD *)this + 25), sub_180077C90);\n  sub_1800D4B10(*((_QWORD *)this + 25), cocos2d::CCNode::updateTweenActionInt);\n  sub_1800D5830(*((_QWORD *)this + 25), sub_1800776C0);\n  sub_1800D4BA0(*((_QWORD *)this + 25), sub_180077BE0);\n  sub_1800D57F0(*((_QWORD *)this + 25), sub_180077670);\n  return sub_1800D4B60(*((_QWORD *)this + 25), sub_180077B90);\n}", "assembly": "; \n; cocos2d::CCEGLView::setupWindow from 0x180078a60 to 0x180078c8d (557 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCEGLView::initWithRect @ 0x18007736c\n; > cocos2d::CCEGLView::toggleFullScreen @ 0x180078f7a\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b4ad0\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, 0x180078a60\npush    rdi                                                            ; +0x5, 0x180078a65\nsub     rsp, 50h                                                       ; +0x6, 0x180078a66\nmov     rax, rdx                                                       ; +0xa, 0x180078a6a\nmov     rbx, rcx                                                       ; +0xd, 0x180078a6d\nxor     edi, edi                                                       ; +0x10, 0x180078a70\nmovss   xmm1, dword ptr [rcx+0C0h]                                     ; +0x12, 0x180078a72\nlea     r8, [rcx+30h]                                                  ; +0x1a, 0x180078a7a\nmovaps  xmm0, xmm1                                                     ; +0x1e, 0x180078a7e\nmulss   xmm0, dword ptr [rdx+0Ch]                                      ; +0x21, 0x180078a81\ncvttss2si edx, xmm0                                                    ; +0x26, 0x180078a86\nmulss   xmm1, dword ptr [rax+8]                                        ; +0x2a, 0x180078a8a\ncvttss2si ecx, xmm1                                                    ; +0x2f, 0x180078a8f\nmov     qword ptr [rsp+58h+InitFlag], rdi                              ; +0x33, 0x180078a93\nmov     r9, [rbx+0D0h]                                                 ; +0x38, 0x180078a98\ncall    sub_1800D44F0                                                  ; +0x3f, 0x180078a9f\nmov     [rbx+0C8h], rax                                                ; +0x44, 0x180078aa4\ncmp     [rbx+0E8h], dil                                                ; +0x4b, 0x180078aab\njz      short loc_180078AF1                                            ; +0x52, 0x180078ab2\ncmp     [rbx+0E9h], dil                                                ; +0x54, 0x180078ab4\njz      short loc_180078AF1                                            ; +0x5b, 0x180078abb\ncmp     [rbx+0EAh], dil                                                ; +0x5d, 0x180078abd\njz      short loc_180078AF1                                            ; +0x64, 0x180078ac4\nmov     rcx, rax                                                       ; +0x66, 0x180078ac6\ncall    sub_1800D8320                                                  ; +0x69, 0x180078ac9\nmov     [rsp+58h+uFlags], 53h ; 'S'; uFlags                            ; +0x6e, 0x180078ace\nmov     [rsp+58h+cy], edi; cy                                          ; +0x76, 0x180078ad6\nmov     [rsp+58h+InitFlag], edi; cx                                    ; +0x7a, 0x180078ada\nxor     r9d, r9d; Y                                                    ; +0x7e, 0x180078ade\nxor     r8d, r8d; X                                                    ; +0x81, 0x180078ae1\nlea     rdx, [rdi-1]; hWndInsertAfter                                  ; +0x84, 0x180078ae4\nmov     rcx, rax; hWnd                                                 ; +0x88, 0x180078ae8\ncall    cs:SetWindowPos                                                ; +0x8b, 0x180078aeb\nmov     rcx, [rbx+0C8h]                                                ; +0x91, 0x180078af1\ncall    sub_1800D33F0                                                  ; +0x98, 0x180078af8\nlea     rdx, sub_180077810                                             ; +0x9d, 0x180078afd\nmov     rcx, [rbx+0C8h]                                                ; +0xa4, 0x180078b04\ncall    sub_1800D5B00                                                  ; +0xab, 0x180078b0b\nlea     rdx, sub_1800775B0                                             ; +0xb0, 0x180078b10\nmov     rcx, [rbx+0C8h]                                                ; +0xb7, 0x180078b17\ncall    sub_1800D57B0                                                  ; +0xbe, 0x180078b1e\nxor     edx, edx                                                       ; +0xc3, 0x180078b23\nmov     rcx, [rbx+0C8h]                                                ; +0xc5, 0x180078b25\ncall    sub_1800D5AC0                                                  ; +0xcc, 0x180078b2c\nxor     edx, edx                                                       ; +0xd1, 0x180078b31\nmov     rcx, [rbx+0C8h]                                                ; +0xd3, 0x180078b33\ncall    sub_1800D5A80                                                  ; +0xda, 0x180078b3a\nmov     rcx, [rbx+0C8h]                                                ; +0xdf, 0x180078b3f\ncall    sub_1800D8320                                                  ; +0xe6, 0x180078b46\nmovzx   ecx, cs:byte_1801A8528                                         ; +0xeb, 0x180078b4b\nnop                                                                    ; +0xf2, 0x180078b52\ntest    cl, cl                                                         ; +0xf3, 0x180078b53\njnz     short loc_180078BD5                                            ; +0xf5, 0x180078b55\nmov     cs:qword_1801A8520, rax                                        ; +0xf7, 0x180078b57\nmov     eax, 1                                                         ; +0xfe, 0x180078b5e\nxchg    al, cs:byte_1801A8528                                          ; +0x103, 0x180078b63\nmov     ecx, 8; Size                                                   ; +0x109, 0x180078b69\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10e, 0x180078b6e\ntest    rax, rax                                                       ; +0x113, 0x180078b73\njz      short loc_180078B84                                            ; +0x116, 0x180078b76\nlea     rcx, qword_1801A8520                                           ; +0x118, 0x180078b78\nmov     [rax], rcx                                                     ; +0x11f, 0x180078b7f\njmp     short loc_180078B87                                            ; +0x122, 0x180078b82\nmov     rax, rdi                                                       ; +0x124, 0x180078b84\nmov     [rsp+58h+arg_0], rax                                           ; +0x127, 0x180078b87\nlea     rcx, [rsp+58h+ThrdAddr+8]                                      ; +0x12c, 0x180078b8c\nmov     qword ptr [rsp+58h+cy], rcx; ThrdAddr                          ; +0x131, 0x180078b91\nmov     [rsp+58h+InitFlag], edi; InitFlag                              ; +0x136, 0x180078b96\nmov     r9, rax; ArgList                                               ; +0x13a, 0x180078b9a\nlea     r8, StartAddress; StartAddress                                 ; +0x13d, 0x180078b9d\nxor     edx, edx; StackSize                                            ; +0x144, 0x180078ba4\nxor     ecx, ecx; Security                                             ; +0x146, 0x180078ba6\ncall    cs:_beginthreadex                                              ; +0x148, 0x180078ba8\nmov     qword ptr [rsp+58h+ThrdAddr], rax                              ; +0x14e, 0x180078bae\ntest    rax, rax                                                       ; +0x153, 0x180078bb3\njz      loc_180078C7E                                                  ; +0x156, 0x180078bb6\ncmp     cs:dword_1801A8538, 0                                          ; +0x15c, 0x180078bbc\njnz     loc_180078C77                                                  ; +0x163, 0x180078bc3\nmovaps  xmm1, xmmword ptr [rsp+58h+ThrdAddr]                           ; +0x169, 0x180078bc9\nmovups  xmmword ptr cs:unk_1801A8530, xmm1                             ; +0x16e, 0x180078bce\nlea     rdx, sub_180077C40                                             ; +0x175, 0x180078bd5\nmov     rcx, [rbx+0C8h]                                                ; +0x17c, 0x180078bdc\ncall    sub_1800D4BE0                                                  ; +0x183, 0x180078be3\nlea     rdx, sub_180077E00                                             ; +0x188, 0x180078be8\nmov     rcx, [rbx+0C8h]                                                ; +0x18f, 0x180078bef\ncall    sub_1800D4A90                                                  ; +0x196, 0x180078bf6\nlea     rdx, sub_180077C90                                             ; +0x19b, 0x180078bfb\nmov     rcx, [rbx+0C8h]                                                ; +0x1a2, 0x180078c02\ncall    sub_1800D4C70                                                  ; +0x1a9, 0x180078c09\nlea     rdx, ?updateTweenActionInt@CCNode@cocos2d@@UEAAXMH@Z; cocos2d::CCNode::updateTweenActionInt(float,int) ; +0x1ae, 0x180078c0e\nmov     rcx, [rbx+0C8h]                                                ; +0x1b5, 0x180078c15\ncall    sub_1800D4B10                                                  ; +0x1bc, 0x180078c1c\nlea     rdx, sub_1800776C0                                             ; +0x1c1, 0x180078c21\nmov     rcx, [rbx+0C8h]                                                ; +0x1c8, 0x180078c28\ncall    sub_1800D5830                                                  ; +0x1cf, 0x180078c2f\nlea     rdx, sub_180077BE0                                             ; +0x1d4, 0x180078c34\nmov     rcx, [rbx+0C8h]                                                ; +0x1db, 0x180078c3b\ncall    sub_1800D4BA0                                                  ; +0x1e2, 0x180078c42\nlea     rdx, sub_180077670                                             ; +0x1e7, 0x180078c47\nmov     rcx, [rbx+0C8h]                                                ; +0x1ee, 0x180078c4e\ncall    sub_1800D57F0                                                  ; +0x1f5, 0x180078c55\nlea     rdx, sub_180077B90                                             ; +0x1fa, 0x180078c5a\nmov     rcx, [rbx+0C8h]                                                ; +0x201, 0x180078c61\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x208, 0x180078c68\nadd     rsp, 50h                                                       ; +0x20d, 0x180078c6d\npop     rdi                                                            ; +0x211, 0x180078c71\njmp     sub_1800D4B60                                                  ; +0x212, 0x180078c72\ncall    cs:__imp_terminate                                             ; +0x217, 0x180078c77\nalign 2                                                                ; +0x21d, 0x180078c7d\nmov     [rsp+58h+ThrdAddr+8], edi                                      ; +0x21e, 0x180078c7e\nmov     ecx, 6; int                                                    ; +0x222, 0x180078c82\ncall    ?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)      ; +0x227, 0x180078c87\ndb 0CCh                                                                ; +0x22c, 0x180078c8c", "xrefs": ["cocos2d::CCEGLView::initWithRect @ 0x18007736c", "cocos2d::CCEGLView::toggleFullScreen @ 0x180078f7a", "<???> @ 0x1801438a8", "<???> @ 0x1801b4ad0"], "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"}