{"type": "func", "start": 6442950576, "end": 6442951144, "name": "cocos2d::CCEGLView::initWithRect", "pseudocode": "// \n// cocos2d::CCEGLView::initWithRect from 0x180079fb0 to 0x18007a1e8 (568 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCEGLView::create @ 0x1800794fc\n// > cocos2d::CCEGLView::createWithFullScreen @ 0x1800796c7\n// > cocos2d::CCEGLView::createWithRect @ 0x18007975e\n// > cocos2d::CCEGLView::initWithFullScreen @ 0x180079e98\n// > cocos2d::CCEGLView::initWithFullscreen @ 0x180079f95\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bec68\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:21:59 +0000\n// \n\nchar __fastcall cocos2d::CCEGLView::initWithRect(cocos2d::CCEGLView *this, _QWORD *a2, float *a3, float a4)\n{\n  float *v6; // rsi\n  float *v7; // rax\n  cocos2d::CCRect *v8; // rax\n  const char *String; // rdi\n  HWND v10; // rax\n  __int64 v12; // rcx\n  int v13; // r8d\n  int v14; // [rsp+20h] [rbp-158h] BYREF\n  float v15[6]; // [rsp+28h] [rbp-150h] BYREF\n  char Buffer[256]; // [rsp+40h] [rbp-138h] BYREF\n\n  if ( *((_BYTE *)this + 232) && *((_BYTE *)this + 233) && *((_BYTE *)this + 234) )\n  {\n    v6 = a3 + 3;\n    a3[2] = a3[2] + 1.0;\n    a3[3] = a3[3] + 1.0;\n  }\n  else\n  {\n    v6 = a3 + 3;\n  }\n  if ( a2[3] > 0xFu )\n    a2 = (_QWORD *)*a2;\n  (*(void (__fastcall **)(cocos2d::CCEGLView *, _QWORD *))(*(_QWORD *)this + 128LL))(this, a2);\n  *((float *)this + 48) = a4;\n  sub_1800DCA30(131075, 1);\n  sub_1800DCA30(135181, 0);\n  sub_1800DCA30(135184, 1);\n  v7 = kmVec2Fill(v15, a3[2], *v6);\n  cocos2d::CCSize::operator=((_DWORD *)this + 54, v7);\n  v8 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v15, (const struct cocos2d::CCRect *)a3);\n  cocos2d::CCEGLView::setupWindow(this, v8);\n  (*(void (__fastcall **)(cocos2d::CCEGLView *))(*(_QWORD *)this + 48LL))(this);\n  String = (const char *)glGetString(0x1F02u);\n  if ( atof(String) >= 1.5 )\n  {\n    cocos2d::CCEGLView::initGlew(this);\n    glEnable(0x8642u);\n    if ( !*((_QWORD *)this + 26) )\n    {\n      v12 = *((_QWORD *)this + 25);\n      v13 = (int)*((float *)this + 55);\n      LODWORD(v15[0]) = (int)*((float *)this + 54);\n      v14 = v13;\n      sub_1800DC800(v12);\n      sub_1800DC750(*((_QWORD *)this + 25), v15, &v14);\n      cocos2d::CCEGLViewProtocol::setFrameSize(this, (float)SLODWORD(v15[0]), (float)v14);\n      sub_1800DC200(*((_QWORD *)this + 25));\n    }\n    cocos2d::CCEGLView::makeBorderlessTop(this);\n    return 1;\n  }\n  else\n  {\n    memset(Buffer, 0, sizeof(Buffer));\n    sub_1800095F0(\n      Buffer,\n      \"OpenGL 1.5 or higher is required (your version is %s). Please upgrade the driver of your video card.\",\n      String);\n    v10 = (HWND)sub_1800D9CB0(*((_QWORD *)this + 25));\n    MessageBoxW(v10, L\"OpenGL 1.5 or higher is required\", L\"OpenGL version too old\", 0);\n    return 0;\n  }\n}", "assembly": "; \n; cocos2d::CCEGLView::initWithRect from 0x180079fb0 to 0x18007a1e8 (568 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCEGLView::create @ 0x1800794fc\n; > cocos2d::CCEGLView::createWithFullScreen @ 0x1800796c7\n; > cocos2d::CCEGLView::createWithRect @ 0x18007975e\n; > cocos2d::CCEGLView::initWithFullScreen @ 0x180079e98\n; > cocos2d::CCEGLView::initWithFullscreen @ 0x180079f95\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bec68\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:21:59 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x180079fb0\npush    rbp                                                            ; +0x5, 0x180079fb5\npush    rsi                                                            ; +0x6, 0x180079fb6\npush    rdi                                                            ; +0x7, 0x180079fb7\nsub     rsp, 160h                                                      ; +0x8, 0x180079fb8\nmovaps  [rsp+178h+var_28], xmm6                                        ; +0xf, 0x180079fbf\nmov     rax, cs:__security_cookie                                      ; +0x17, 0x180079fc7\nxor     rax, rsp                                                       ; +0x1e, 0x180079fce\nmov     [rsp+178h+var_38], rax                                         ; +0x21, 0x180079fd1\ncmp     byte ptr [rcx+0E8h], 0                                         ; +0x29, 0x180079fd9\nmovaps  xmm6, xmm3                                                     ; +0x30, 0x180079fe0\nmov     rdi, r8                                                        ; +0x33, 0x180079fe3\nmov     rbx, rcx                                                       ; +0x36, 0x180079fe6\njz      short loc_18007A027                                            ; +0x39, 0x180079fe9\ncmp     byte ptr [rcx+0E9h], 0                                         ; +0x3b, 0x180079feb\njz      short loc_18007A027                                            ; +0x42, 0x180079ff2\ncmp     byte ptr [rcx+0EAh], 0                                         ; +0x44, 0x180079ff4\njz      short loc_18007A027                                            ; +0x4b, 0x180079ffb\nmovss   xmm0, dword ptr [r8+8]                                         ; +0x4d, 0x180079ffd\nlea     rsi, [r8+0Ch]                                                  ; +0x53, 0x18007a003\naddss   xmm0, cs:flt_1800EC208                                         ; +0x57, 0x18007a007\nmovss   dword ptr [r8+8], xmm0                                         ; +0x5f, 0x18007a00f\nmovss   xmm0, dword ptr [rsi]                                          ; +0x65, 0x18007a015\naddss   xmm0, cs:flt_1800EC208                                         ; +0x69, 0x18007a019\nmovss   dword ptr [rsi], xmm0                                          ; +0x71, 0x18007a021\njmp     short loc_18007A02B                                            ; +0x75, 0x18007a025\nlea     rsi, [r8+0Ch]                                                  ; +0x77, 0x18007a027\ncmp     qword ptr [rdx+18h], 0Fh                                       ; +0x7b, 0x18007a02b\njbe     short loc_18007A035                                            ; +0x80, 0x18007a030\nmov     rdx, [rdx]                                                     ; +0x82, 0x18007a032\nmov     rax, [rcx]                                                     ; +0x85, 0x18007a035\ncall    qword ptr [rax+80h]                                            ; +0x88, 0x18007a038\nmov     edx, 1                                                         ; +0x8e, 0x18007a03e\nmovss   dword ptr [rbx+0C0h], xmm6                                     ; +0x93, 0x18007a043\nmov     ecx, 20003h                                                    ; +0x9b, 0x18007a04b\ncall    sub_1800DCA30                                                  ; +0xa0, 0x18007a050\nxor     edx, edx                                                       ; +0xa5, 0x18007a055\nmov     ecx, 2100Dh                                                    ; +0xa7, 0x18007a057\ncall    sub_1800DCA30                                                  ; +0xac, 0x18007a05c\nmov     edx, 1                                                         ; +0xb1, 0x18007a061\nmov     ecx, 21010h                                                    ; +0xb6, 0x18007a066\ncall    sub_1800DCA30                                                  ; +0xbb, 0x18007a06b\nmovss   xmm2, dword ptr [rsi]                                          ; +0xc0, 0x18007a070\nlea     rcx, [rsp+178h+var_150]                                        ; +0xc4, 0x18007a074\nmovss   xmm1, dword ptr [rdi+8]                                        ; +0xc9, 0x18007a079\ncall    kmVec2Fill                                                     ; +0xce, 0x18007a07e\nmov     rdx, rax                                                       ; +0xd3, 0x18007a083\nlea     rcx, [rbx+0D8h]                                                ; +0xd6, 0x18007a086\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xdd, 0x18007a08d\nmov     rdx, rdi; struct cocos2d::CCRect *                             ; +0xe2, 0x18007a092\nlea     rcx, [rsp+178h+var_150]; this                                  ; +0xe5, 0x18007a095\ncall    ??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0xea, 0x18007a09a\nmov     rdx, rax                                                       ; +0xef, 0x18007a09f\nmov     rcx, rbx                                                       ; +0xf2, 0x18007a0a2\ncall    ?setupWindow@CCEGLView@cocos2d@@IEAAXVCCRect@2@@Z; cocos2d::CCEGLView::setupWindow(cocos2d::CCRect) ; +0xf5, 0x18007a0a5\nmov     rax, [rbx]                                                     ; +0xfa, 0x18007a0aa\nmov     rcx, rbx                                                       ; +0xfd, 0x18007a0ad\nmovss   xmm2, dword ptr [rsi]                                          ; +0x100, 0x18007a0b0\nmovss   xmm1, dword ptr [rdi+8]                                        ; +0x104, 0x18007a0b4\ncall    qword ptr [rax+30h]                                            ; +0x109, 0x18007a0b9\nmov     ecx, 1F02h; name                                               ; +0x10c, 0x18007a0bc\ncall    cs:glGetString                                                 ; +0x111, 0x18007a0c1\nmov     rcx, rax; String                                               ; +0x117, 0x18007a0c7\nmov     rdi, rax                                                       ; +0x11a, 0x18007a0ca\ncall    cs:atof                                                        ; +0x11d, 0x18007a0cd\nmovsd   xmm1, cs:qword_180107720                                       ; +0x123, 0x18007a0d3\ncomisd  xmm1, xmm0                                                     ; +0x12b, 0x18007a0db\njbe     short loc_18007A134                                            ; +0x12f, 0x18007a0df\nxor     edx, edx; Val                                                  ; +0x131, 0x18007a0e1\nlea     rcx, [rsp+178h+Buffer]; void *                                 ; +0x133, 0x18007a0e3\nmov     r8d, 100h; Size                                                ; +0x138, 0x18007a0e8\ncall    memset                                                         ; +0x13e, 0x18007a0ee\nmov     r8, rdi                                                        ; +0x143, 0x18007a0f3\nlea     rdx, aOpengl15OrHigh; \"OpenGL 1.5 or higher is required (your \"... ; +0x146, 0x18007a0f6\nlea     rcx, [rsp+178h+Buffer]; Buffer                                 ; +0x14d, 0x18007a0fd\ncall    sub_1800095F0                                                  ; +0x152, 0x18007a102\nmov     rcx, [rbx+0C8h]                                                ; +0x157, 0x18007a107\ncall    sub_1800D9CB0                                                  ; +0x15e, 0x18007a10e\nmov     rcx, rax; hWnd                                                 ; +0x163, 0x18007a113\nlea     r8, aOpenglVersionT; \"OpenGL version too old\"                  ; +0x166, 0x18007a116\nxor     r9d, r9d; uType                                                ; +0x16d, 0x18007a11d\nlea     rdx, aOpengl15OrHigh_0; \"OpenGL 1.5 or higher is required\"     ; +0x170, 0x18007a120\ncall    cs:MessageBoxW                                                 ; +0x177, 0x18007a127\nxor     al, al                                                         ; +0x17d, 0x18007a12d\njmp     loc_18007A1BD                                                  ; +0x17f, 0x18007a12f\nmov     rcx, rbx; this                                                 ; +0x184, 0x18007a134\ncall    ?initGlew@CCEGLView@cocos2d@@IEAA_NXZ; cocos2d::CCEGLView::initGlew(void) ; +0x187, 0x18007a137\nmov     ecx, 8642h; cap                                                ; +0x18c, 0x18007a13c\ncall    cs:glEnable                                                    ; +0x191, 0x18007a141\ncmp     qword ptr [rbx+0D0h], 0                                        ; +0x197, 0x18007a147\njnz     short loc_18007A1B3                                            ; +0x19f, 0x18007a14f\ncvttss2si edx, dword ptr [rbx+0D8h]                                    ; +0x1a1, 0x18007a151\nmov     rcx, [rbx+0C8h]                                                ; +0x1a9, 0x18007a159\ncvttss2si r8d, dword ptr [rbx+0DCh]                                    ; +0x1b0, 0x18007a160\nmov     [rsp+178h+var_150], edx                                        ; +0x1b9, 0x18007a169\nmov     [rsp+178h+var_158], r8d                                        ; +0x1bd, 0x18007a16d\ncall    sub_1800DC800                                                  ; +0x1c2, 0x18007a172\nmov     rcx, [rbx+0C8h]                                                ; +0x1c7, 0x18007a177\nlea     r8, [rsp+178h+var_158]                                         ; +0x1ce, 0x18007a17e\nlea     rdx, [rsp+178h+var_150]                                        ; +0x1d3, 0x18007a183\ncall    sub_1800DC750                                                  ; +0x1d8, 0x18007a188\nmovd    xmm2, [rsp+178h+var_158]                                       ; +0x1dd, 0x18007a18d\nmov     rcx, rbx; this                                                 ; +0x1e3, 0x18007a193\nmovd    xmm1, [rsp+178h+var_150]                                       ; +0x1e6, 0x18007a196\ncvtdq2ps xmm2, xmm2; float                                             ; +0x1ec, 0x18007a19c\ncvtdq2ps xmm1, xmm1; float                                             ; +0x1ef, 0x18007a19f\ncall    ?setFrameSize@CCEGLViewProtocol@cocos2d@@UEAAXMM@Z; cocos2d::CCEGLViewProtocol::setFrameSize(float,float) ; +0x1f2, 0x18007a1a2\nmov     rcx, [rbx+0C8h]                                                ; +0x1f7, 0x18007a1a7\ncall    sub_1800DC200                                                  ; +0x1fe, 0x18007a1ae\nmov     rcx, rbx; this                                                 ; +0x203, 0x18007a1b3\ncall    ?makeBorderlessTop@CCEGLView@cocos2d@@QEAAXXZ; cocos2d::CCEGLView::makeBorderlessTop(void) ; +0x206, 0x18007a1b6\nmov     al, 1                                                          ; +0x20b, 0x18007a1bb\nmov     rcx, [rsp+178h+var_38]                                         ; +0x20d, 0x18007a1bd\nxor     rcx, rsp; StackCookie                                          ; +0x215, 0x18007a1c5\ncall    __security_check_cookie                                        ; +0x218, 0x18007a1c8\nmov     rbx, [rsp+178h+arg_18]                                         ; +0x21d, 0x18007a1cd\nmovaps  xmm6, [rsp+178h+var_28]                                        ; +0x225, 0x18007a1d5\nadd     rsp, 160h                                                      ; +0x22d, 0x18007a1dd\npop     rdi                                                            ; +0x234, 0x18007a1e4\npop     rsi                                                            ; +0x235, 0x18007a1e5\npop     rbp                                                            ; +0x236, 0x18007a1e6\nretn                                                                   ; +0x237, 0x18007a1e7", "xrefs": ["cocos2d::CCEGLView::create @ 0x1800794fc", "cocos2d::CCEGLView::createWithFullScreen @ 0x1800796c7", "cocos2d::CCEGLView::createWithRect @ 0x18007975e", "cocos2d::CCEGLView::initWithFullScreen @ 0x180079e98", "cocos2d::CCEGLView::initWithFullscreen @ 0x180079f95", "<???> @ 0x18014cf68", "<???> @ 0x1801bec68"], "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"}