{"type": "func", "start": 4301674880, "end": 4301675235, "name": "-[EAGLView initWithFrame:shareContext:]", "pseudocode": "// \n// -[EAGLView initWithFrame:shareContext:] from 0x100665980 to 0x100665ae3 (355 bytes)\n// \n// 2 xrefs:\n// > -[EAGLView initWithFrame:] @ 0x10066596e\n// > <???> @ 0x10099aee0\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\nEAGLView *__cdecl -[EAGLView initWithFrame:shareContext:](EAGLView *self, SEL a2, CGRect a3, id a4)\n{\n  id v5; // rax\n  id v6; // r15\n  id v7; // rax\n  __int64 v8; // r8\n  __int64 v9; // r9\n  EAGLView *v10; // rax\n  __int64 v11; // r14\n  cocos2d::CCEGLView *v12; // rax\n  float width; // xmm0_4\n  float height; // xmm1_4\n  objc_super v16; // [rsp+40h] [rbp-50h] BYREF\n  __int128 v17; // [rsp+50h] [rbp-40h] BYREF\n\n  v17 = xmmword_100823200;\n  v5 = objc_alloc((Class)&OBJC_CLASS___NSOpenGLPixelFormat);\n  v6 = objc_msgSend(v5, \"initWithAttributes:\", &v17);\n  if ( !v6 )\n    NSLog((NSString *)CFSTR(\"No OpenGL pixel format\"));\n  v7 = objc_autorelease(v6);\n  v16.receiver = self;\n  v16.super_class = (Class)&OBJC_CLASS___EAGLView;\n  v10 = -[EAGLView initWithFrame:pixelFormat:](\n          &v16,\n          \"initWithFrame:pixelFormat:\",\n          v7,\n          &OBJC_CLASS___EAGLView,\n          v8,\n          v9,\n          *(_QWORD *)&a3.origin.x,\n          *(_QWORD *)&a3.origin.y,\n          *(_QWORD *)&a3.size.width,\n          *(_QWORD *)&a3.size.height);\n  v11 = (__int64)v10;\n  if ( v10 )\n  {\n    if ( a4 )\n      -[EAGLView setOpenGLContext:](v10, \"setOpenGLContext:\", a4);\n    *(_QWORD *)(v11 + 8) = +[CCEventDispatcher sharedDispatcher](&OBJC_CLASS___CCEventDispatcher, \"sharedDispatcher\");\n  }\n  v12 = cocos2d::CCEGLView::sharedOpenGLView();\n  width = a3.size.width;\n  height = a3.size.height;\n  ((void (__fastcall *)(cocos2d::CCEGLView *, float, float))v12->setFrameSize)(v12, width, height);\n  *(_DWORD *)(v11 + 80) = 1065353216;\n  *(_DWORD *)(v11 + 84) = 1065353216;\n  qword_1009A38D8 = v11;\n  return (EAGLView *)v11;\n}", "assembly": "; \n; -[EAGLView initWithFrame:shareContext:] from 0x100665980 to 0x100665ae3 (355 bytes)\n; \n; 2 xrefs:\n; > -[EAGLView initWithFrame:] @ 0x10066596e\n; > <???> @ 0x10099aee0\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    rbp                                                            ; +0x0, 0x100665980\nmov     rbp, rsp                                                       ; +0x1, 0x100665981\npush    r15                                                            ; +0x4, 0x100665984\npush    r14                                                            ; +0x6, 0x100665986\npush    r12                                                            ; +0x8, 0x100665988\npush    rbx                                                            ; +0xa, 0x10066598a\nsub     rsp, 70h                                                       ; +0xb, 0x10066598b\nmov     rbx, rdx                                                       ; +0xf, 0x10066598f\nmov     r14, rdi                                                       ; +0x12, 0x100665992\nlea     r12, [rbp+arg_0]                                               ; +0x15, 0x100665995\nmov     rax, cs:___stack_chk_guard_ptr                                 ; +0x19, 0x100665999\nmov     rax, [rax]                                                     ; +0x20, 0x1006659a0\nmov     [rbp+var_28], rax                                              ; +0x23, 0x1006659a3\nmovaps  xmm0, cs:xmmword_100823200                                     ; +0x27, 0x1006659a7\nmovaps  [rbp+var_40], xmm0                                             ; +0x2e, 0x1006659ae\nmov     rdi, cs:classRef_NSOpenGLPixelFormat; Class                    ; +0x32, 0x1006659b2\ncall    _objc_alloc                                                    ; +0x39, 0x1006659b9\nmov     rsi, cs:selRef_initWithAttributes_; SEL                        ; +0x3e, 0x1006659be\nlea     rdx, [rbp+var_40]                                              ; +0x45, 0x1006659c5\nmov     rdi, rax; id                                                   ; +0x49, 0x1006659c9\ncall    cs:_objc_msgSend_ptr                                           ; +0x4c, 0x1006659cc\nmov     r15, rax                                                       ; +0x52, 0x1006659d2\ntest    rax, rax                                                       ; +0x55, 0x1006659d5\njnz     short loc_1006659E8                                            ; +0x58, 0x1006659d8\nlea     rdi, cfstr_NoOpenglPixelF; format                              ; +0x5a, 0x1006659da\nxor     eax, eax                                                       ; +0x61, 0x1006659e1\ncall    _NSLog                                                         ; +0x63, 0x1006659e3\nmovups  xmm0, xmmword ptr [r12]                                        ; +0x68, 0x1006659e8\nmovups  xmm1, xmmword ptr [r12+10h]                                    ; +0x6d, 0x1006659ed\nmovaps  [rbp+var_60], xmm1                                             ; +0x73, 0x1006659f3\nmovaps  [rbp+var_70], xmm0                                             ; +0x77, 0x1006659f7\nmov     rdi, r15; id                                                   ; +0x7b, 0x1006659fb\ncall    _objc_autorelease                                              ; +0x7e, 0x1006659fe\nmov     [rbp+var_50.receiver], r14                                     ; +0x83, 0x100665a03\nmov     rcx, cs:classRef_EAGLView_0                                    ; +0x87, 0x100665a07\nmov     [rbp+var_50.super_class], rcx                                  ; +0x8e, 0x100665a0e\nmov     rsi, cs:selRef_initWithFrame_pixelFormat_; SEL                 ; +0x92, 0x100665a12\nmovaps  xmm0, [rbp+var_70]                                             ; +0x99, 0x100665a19\nmovaps  xmm1, [rbp+var_60]                                             ; +0x9d, 0x100665a1d\nmovups  [rsp+90h+var_80], xmm1                                         ; +0xa1, 0x100665a21\nmovups  [rsp+90h+var_90], xmm0                                         ; +0xa6, 0x100665a26\nlea     rdi, [rbp+var_50]; objc_super *                                ; +0xaa, 0x100665a2a\nmov     rdx, rax                                                       ; +0xae, 0x100665a2e\ncall    _objc_msgSendSuper2; -[EAGLView initWithFrame:pixelFormat:] ... ; +0xb1, 0x100665a31\nmov     r14, rax                                                       ; +0xb6, 0x100665a36\ntest    rax, rax                                                       ; +0xb9, 0x100665a39\njz      short loc_100665A75                                            ; +0xbc, 0x100665a3c\ntest    rbx, rbx                                                       ; +0xbe, 0x100665a3e\njz      short loc_100665A56                                            ; +0xc1, 0x100665a41\nmov     rsi, cs:selRef_setOpenGLContext_; SEL                          ; +0xc3, 0x100665a43\nmov     rdi, r14; id                                                   ; +0xca, 0x100665a4a\nmov     rdx, rbx                                                       ; +0xcd, 0x100665a4d\ncall    cs:_objc_msgSend_ptr; -[EAGLView setOpenGLContext:] ...        ; +0xd0, 0x100665a50\nmov     rdi, cs:classRef_CCEventDispatcher; id                         ; +0xd6, 0x100665a56\nmov     rsi, cs:selRef_sharedDispatcher; SEL                           ; +0xdd, 0x100665a5d\ncall    cs:_objc_msgSend_ptr; +[CCEventDispatcher sharedDispatcher] ... ; +0xe4, 0x100665a64\nmov     rcx, cs:_OBJC_IVAR_$_EAGLView_eventDelegate_; MacEventDelegate *eventDelegate_; ; +0xea, 0x100665a6a\nmov     [r14+rcx], rax                                                 ; +0xf1, 0x100665a71\ncall    cocos2d__CCEGLView__sharedOpenGLView                           ; +0xf5, 0x100665a75\nmovsd   xmm0, qword ptr [r12+10h]                                      ; +0xfa, 0x100665a7a\ncvtsd2ss xmm0, xmm0                                                    ; +0x101, 0x100665a81\nmovsd   xmm1, qword ptr [r12+18h]                                      ; +0x105, 0x100665a85\ncvtsd2ss xmm1, xmm1                                                    ; +0x10c, 0x100665a8c\nmov     rcx, [rax]                                                     ; +0x110, 0x100665a90\nmov     rdi, rax                                                       ; +0x113, 0x100665a93\ncall    qword ptr [rcx+38h]                                            ; +0x116, 0x100665a96\nmov     rax, cs:_OBJC_IVAR_$_EAGLView_frameZoomFactor_; float frameZoomFactor_; ; +0x119, 0x100665a99\nmov     dword ptr [r14+rax], 3F800000h                                 ; +0x120, 0x100665aa0\nmov     rax, cs:_OBJC_IVAR_$_EAGLView__backingScaleFactor; float _backingScaleFactor; ; +0x128, 0x100665aa8\nmov     dword ptr [r14+rax], 3F800000h                                 ; +0x12f, 0x100665aaf\nmov     cs:qword_1009A38D8, r14                                        ; +0x137, 0x100665ab7\nmov     rax, cs:___stack_chk_guard_ptr                                 ; +0x13e, 0x100665abe\nmov     rax, [rax]                                                     ; +0x145, 0x100665ac5\ncmp     rax, [rbp+var_28]                                              ; +0x148, 0x100665ac8\njnz     short loc_100665ADE                                            ; +0x14c, 0x100665acc\nmov     rax, r14                                                       ; +0x14e, 0x100665ace\nadd     rsp, 70h                                                       ; +0x151, 0x100665ad1\npop     rbx                                                            ; +0x155, 0x100665ad5\npop     r12                                                            ; +0x156, 0x100665ad6\npop     r14                                                            ; +0x158, 0x100665ad8\npop     r15                                                            ; +0x15a, 0x100665ada\npop     rbp                                                            ; +0x15c, 0x100665adc\nretn                                                                   ; +0x15d, 0x100665add\ncall    ___stack_chk_fail                                              ; +0x15e, 0x100665ade", "xrefs": ["-[EAGLView initWithFrame:] @ 0x10066596e", "<???> @ 0x10099aee0"], "is_objc": true, "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"}