{"type": "func", "start": 6442938304, "end": 6442938462, "name": "cocos2d::CCEGLView::initGlew", "pseudocode": "// \n// cocos2d::CCEGLView::initGlew from 0x180076fc0 to 0x18007705e (158 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCEGLView::initWithRect @ 0x1800773ff\n// > <???> @ 0x18013b594\n// > <???> @ 0x18013b5a4\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b48fc\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\nchar __fastcall cocos2d::CCEGLView::initGlew(cocos2d::CCEGLView *this)\n{\n  unsigned int v2; // eax\n  const WCHAR *ErrorString; // rbx\n  HWND v4; // rax\n  HWND v6; // rax\n\n  v2 = glewInit();\n  if ( v2 )\n  {\n    ErrorString = (const WCHAR *)glewGetErrorString(v2);\n    v4 = (HWND)sub_1800D8320(*((_QWORD *)this + 25));\n    MessageBoxW(v4, ErrorString, L\"OpenGL error\", 0);\n    return 0;\n  }\n  else\n  {\n    glewIsSupported(\"GL_VERSION_2_0\");\n    if ( sub_180076C40() )\n    {\n      return 1;\n    }\n    else\n    {\n      v6 = (HWND)sub_1800D8320(*((_QWORD *)this + 25));\n      MessageBoxW(\n        v6,\n        L\"No OpenGL framebuffer support. Please upgrade the driver of your video card.\",\n        L\"OpenGL error\",\n        0);\n      return 0;\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCEGLView::initGlew from 0x180076fc0 to 0x18007705e (158 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCEGLView::initWithRect @ 0x1800773ff\n; > <???> @ 0x18013b594\n; > <???> @ 0x18013b5a4\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b48fc\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    rdi                                                            ; +0x0, 0x180076fc0\nsub     rsp, 20h                                                       ; +0x2, 0x180076fc2\nmov     rdi, rcx                                                       ; +0x6, 0x180076fc6\ncall    cs:glewInit                                                    ; +0x9, 0x180076fc9\ntest    eax, eax                                                       ; +0xf, 0x180076fcf\njz      short loc_180077012                                            ; +0x11, 0x180076fd1\nmov     ecx, eax                                                       ; +0x13, 0x180076fd3\nmov     [rsp+28h+arg_0], rbx                                           ; +0x15, 0x180076fd5\ncall    cs:glewGetErrorString                                          ; +0x1a, 0x180076fda\nmov     rcx, [rdi+0C8h]                                                ; +0x20, 0x180076fe0\nmov     rbx, rax                                                       ; +0x27, 0x180076fe7\ncall    sub_1800D8320                                                  ; +0x2a, 0x180076fea\nmov     rcx, rax; hWnd                                                 ; +0x2f, 0x180076fef\nlea     r8, Caption; \"OpenGL error\"                                    ; +0x32, 0x180076ff2\nxor     r9d, r9d; uType                                                ; +0x39, 0x180076ff9\nmov     rdx, rbx; lpText                                               ; +0x3c, 0x180076ffc\ncall    cs:MessageBoxW                                                 ; +0x3f, 0x180076fff\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x45, 0x180077005\nxor     al, al                                                         ; +0x4a, 0x18007700a\nadd     rsp, 20h                                                       ; +0x4c, 0x18007700c\npop     rdi                                                            ; +0x50, 0x180077010\nretn                                                                   ; +0x51, 0x180077011\nlea     rcx, aGlVersion20; \"GL_VERSION_2_0\"                            ; +0x52, 0x180077012\ncall    cs:glewIsSupported                                             ; +0x59, 0x180077019\ncall    sub_180076C40                                                  ; +0x5f, 0x18007701f\ntest    al, al                                                         ; +0x64, 0x180077024\njnz     short loc_180077056                                            ; +0x66, 0x180077026\nmov     rcx, [rdi+0C8h]                                                ; +0x68, 0x180077028\ncall    sub_1800D8320                                                  ; +0x6f, 0x18007702f\nmov     rcx, rax; hWnd                                                 ; +0x74, 0x180077034\nlea     r8, Caption; \"OpenGL error\"                                    ; +0x77, 0x180077037\nxor     r9d, r9d; uType                                                ; +0x7e, 0x18007703e\nlea     rdx, aNoOpenglFrameb; \"No OpenGL framebuffer support. Please u\"... ; +0x81, 0x180077041\ncall    cs:MessageBoxW                                                 ; +0x88, 0x180077048\nxor     al, al                                                         ; +0x8e, 0x18007704e\nadd     rsp, 20h                                                       ; +0x90, 0x180077050\npop     rdi                                                            ; +0x94, 0x180077054\nretn                                                                   ; +0x95, 0x180077055\nmov     al, 1                                                          ; +0x96, 0x180077056\nadd     rsp, 20h                                                       ; +0x98, 0x180077058\npop     rdi                                                            ; +0x9c, 0x18007705c\nretn                                                                   ; +0x9d, 0x18007705d", "xrefs": ["cocos2d::CCEGLView::initWithRect @ 0x1800773ff", "<???> @ 0x18013b594", "<???> @ 0x18013b5a4", "<???> @ 0x1801438a8", "<???> @ 0x1801b48fc"], "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"}