{"type": "func", "start": 4299270804, "end": 4299271148, "name": "-[EAGLView setupSurfaceWithSharegroup:]", "pseudocode": "// \n// -[EAGLView setupSurfaceWithSharegroup:] from 0x10041aa94 to 0x10041abec (344 bytes)\n// \n// 2 xrefs:\n// > -[EAGLView initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:] @ 0x10041a7f8\n// > <???> @ 0x100849e10\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\nbool __cdecl -[EAGLView setupSurfaceWithSharegroup:](EAGLView *self, SEL a2, id a3)\n{\n  void *v5; // x21\n  CCES2Renderer *v6; // x0\n  CCES2Renderer *v7; // x20\n  GLenum Error; // w0\n\n  v5 = -[EAGLView layer](self, \"layer\");\n  objc_msgSend(v5, \"setOpaque:\", 1);\n  objc_msgSend(\n    v5,\n    \"setDrawableProperties:\",\n    +[NSDictionary dictionaryWithObjectsAndKeys:](\n      &OBJC_CLASS___NSDictionary,\n      \"dictionaryWithObjectsAndKeys:\",\n      +[NSNumber numberWithBool:](&OBJC_CLASS___NSNumber, \"numberWithBool:\", self->preserveBackbuffer_),\n      kEAGLDrawablePropertyRetainedBacking,\n      self->pixelformat_,\n      kEAGLDrawablePropertyColorFormat,\n      0));\n  v6 = -[CCES2Renderer initWithDepthFormat:withPixelFormat:withSharegroup:withMultiSampling:withNumberOfSamples:](\n         objc_alloc(&OBJC_CLASS___CCES2Renderer),\n         \"initWithDepthFormat:withPixelFormat:withSharegroup:withMultiSampling:withNumberOfSamples:\",\n         self->depthFormat_,\n         -[EAGLView convertPixelFormat:](self, \"convertPixelFormat:\", self->pixelformat_),\n         a3,\n         self->multiSampling_,\n         self->requestedSamples_);\n  v7 = v6;\n  self->renderer_ = (CCESRenderer *)v6;\n  if ( v6 )\n  {\n    self->context_ = -[CCES2Renderer context](v6, \"context\");\n    Error = glGetError();\n    if ( Error )\n      printf(\"OpenGL error 0x%04X in %s %d\\n\", Error, \"-[EAGLView setupSurfaceWithSharegroup:]\", 246);\n  }\n  return v7 != nullptr;\n}", "assembly": "; \n; -[EAGLView setupSurfaceWithSharegroup:] from 0x10041aa94 to 0x10041abec (344 bytes)\n; \n; 2 xrefs:\n; > -[EAGLView initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:] @ 0x10041a7f8\n; > <???> @ 0x100849e10\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\nSUB             SP, SP, #0x60                                          ; +0x0, 0x10041aa94\nSTP             X24, X23, [SP,#0x50+var_30]                            ; +0x4, 0x10041aa98\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x8, 0x10041aa9c\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0xc, 0x10041aaa0\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0x10, 0x10041aaa4\nADD             X29, SP, #0x50                                         ; +0x14, 0x10041aaa8\nMOV             X20, X2                                                ; +0x18, 0x10041aaac\nMOV             X19, X0                                                ; +0x1c, 0x10041aab0\nBL              _objc_msgSend$layer; -[EAGLView layer] ...             ; +0x20, 0x10041aab4\nMOV             X21, X0                                                ; +0x24, 0x10041aab8\nMOV             W2, #1                                                 ; +0x28, 0x10041aabc\nBL              _objc_msgSend$setOpaque_                               ; +0x2c, 0x10041aac0\nADRP            X8, #classRef_NSDictionary@PAGE                        ; +0x30, 0x10041aac4\nLDR             X22, [X8,#classRef_NSDictionary@PAGEOFF]; _OBJC_CLASS_$_NSDictionary ; +0x34, 0x10041aac8\nADRP            X8, #classRef_NSNumber@PAGE                            ; +0x38, 0x10041aacc\nLDR             X0, [X8,#classRef_NSNumber@PAGEOFF]; _OBJC_CLASS_$_NSNumber ; +0x3c, 0x10041aad0\nADRP            X8, #_OBJC_IVAR_$_EAGLView.preserveBackbuffer_@PAGE; bool preserveBackbuffer_; ; +0x40, 0x10041aad4\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.preserveBackbuffer_@PAGEOFF]; bool preserveBackbuffer_; ; +0x44, 0x10041aad8\nLDRB            W2, [X19,X8]                                           ; +0x48, 0x10041aadc\nBL              _objc_msgSend$numberWithBool_; +[NSNumber numberWithBool:] ... ; +0x4c, 0x10041aae0\nMOV             X2, X0                                                 ; +0x50, 0x10041aae4\nADRP            X8, #_kEAGLDrawablePropertyRetainedBacking_ptr@PAGE    ; +0x54, 0x10041aae8\nLDR             X8, [X8,#_kEAGLDrawablePropertyRetainedBacking_ptr@PAGEOFF]; _kEAGLDrawablePropertyRetainedBacking ; +0x58, 0x10041aaec\nLDR             X8, [X8]                                               ; +0x5c, 0x10041aaf0\nADRP            X9, #_OBJC_IVAR_$_EAGLView.pixelformat_@PAGE; NSString *pixelformat_; ; +0x60, 0x10041aaf4\nLDRSW           X23, [X9,#_OBJC_IVAR_$_EAGLView.pixelformat_@PAGEOFF]; NSString *pixelformat_; ; +0x64, 0x10041aaf8\nLDR             X9, [X19,X23]                                          ; +0x68, 0x10041aafc\nADRP            X10, #_kEAGLDrawablePropertyColorFormat_ptr@PAGE       ; +0x6c, 0x10041ab00\nLDR             X10, [X10,#_kEAGLDrawablePropertyColorFormat_ptr@PAGEOFF]; _kEAGLDrawablePropertyColorFormat ; +0x70, 0x10041ab04\nLDR             X10, [X10]                                             ; +0x74, 0x10041ab08\nSTP             X10, XZR, [SP,#0x50+var_40]                            ; +0x78, 0x10041ab0c\nSTP             X8, X9, [SP,#0x50+var_50]                              ; +0x7c, 0x10041ab10\nMOV             X0, X22                                                ; +0x80, 0x10041ab14\nBL              _objc_msgSend$dictionaryWithObjectsAndKeys_; +[NSDictionary dictionaryWithObjectsAndKeys:] ... ; +0x84, 0x10041ab18\nMOV             X2, X0                                                 ; +0x88, 0x10041ab1c\nMOV             X0, X21                                                ; +0x8c, 0x10041ab20\nBL              _objc_msgSend$setDrawableProperties_                   ; +0x90, 0x10041ab24\nADRP            X8, #classRef_CCES2Renderer@PAGE                       ; +0x94, 0x10041ab28\nLDR             X0, [X8,#classRef_CCES2Renderer@PAGEOFF]; _OBJC_CLASS_$_CCES2Renderer ; Class ; +0x98, 0x10041ab2c\nBL              _objc_alloc                                            ; +0x9c, 0x10041ab30\nMOV             X21, X0                                                ; +0xa0, 0x10041ab34\nADRP            X8, #_OBJC_IVAR_$_EAGLView.depthFormat_@PAGE; unsigned int depthFormat_; ; +0xa4, 0x10041ab38\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.depthFormat_@PAGEOFF]; unsigned int depthFormat_; ; +0xa8, 0x10041ab3c\nLDR             W22, [X19,X8]                                          ; +0xac, 0x10041ab40\nLDR             X2, [X19,X23]                                          ; +0xb0, 0x10041ab44\nMOV             X0, X19                                                ; +0xb4, 0x10041ab48\nBL              _objc_msgSend$convertPixelFormat_; -[EAGLView convertPixelFormat:] ... ; +0xb8, 0x10041ab4c\nMOV             X3, X0                                                 ; +0xbc, 0x10041ab50\nADRP            X8, #_OBJC_IVAR_$_EAGLView.multiSampling_@PAGE; bool multiSampling_; ; +0xc0, 0x10041ab54\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.multiSampling_@PAGEOFF]; bool multiSampling_; ; +0xc4, 0x10041ab58\nLDRB            W5, [X19,X8]                                           ; +0xc8, 0x10041ab5c\nADRP            X8, #_OBJC_IVAR_$_EAGLView.requestedSamples_@PAGE; unsigned int requestedSamples_; ; +0xcc, 0x10041ab60\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.requestedSamples_@PAGEOFF]; unsigned int requestedSamples_; ; +0xd0, 0x10041ab64\nLDR             W6, [X19,X8]                                           ; +0xd4, 0x10041ab68\nMOV             X0, X21                                                ; +0xd8, 0x10041ab6c\nMOV             X2, X22                                                ; +0xdc, 0x10041ab70\nMOV             X4, X20                                                ; +0xe0, 0x10041ab74\nBL              _objc_msgSend$initWithDepthFormat_withPixelFormat_withSharegroup_withMultiSampling_withNumberOfSamples_; -[CCES2Renderer initWithDepthFormat:withPixelFormat:withSharegroup:withMultiSampling:withNumberOfSamples:] ... ; +0xe4, 0x10041ab78\nMOV             X20, X0                                                ; +0xe8, 0x10041ab7c\nADRP            X8, #_OBJC_IVAR_$_EAGLView.renderer_@PAGE; CCESRenderer *renderer_; ; +0xec, 0x10041ab80\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.renderer_@PAGEOFF]; CCESRenderer *renderer_; ; +0xf0, 0x10041ab84\nSTR             X0, [X19,X8]                                           ; +0xf4, 0x10041ab88\nCBZ             X0, loc_10041ABCC                                      ; +0xf8, 0x10041ab8c\nMOV             X0, X20                                                ; +0xfc, 0x10041ab90\nBL              _objc_msgSend$context; -[CCES2Renderer context] ...    ; +0x100, 0x10041ab94\nADRP            X8, #_OBJC_IVAR_$_EAGLView.context_@PAGE; EAGLContext *context_; ; +0x104, 0x10041ab98\nLDRSW           X8, [X8,#_OBJC_IVAR_$_EAGLView.context_@PAGEOFF]; EAGLContext *context_; ; +0x108, 0x10041ab9c\nSTR             X0, [X19,X8]                                           ; +0x10c, 0x10041aba0\nBL              _glGetError                                            ; +0x110, 0x10041aba4\nCBZ             W0, loc_10041ABCC                                      ; +0x114, 0x10041aba8\nMOV             W8, #0xF6                                              ; +0x118, 0x10041abac\nADRL            X9, aEaglviewSetups; \"-[EAGLView setupSurfaceWithSharegroup:]\" ; +0x11c, 0x10041abb0\nSTP             X9, X8, [SP,#0x50+var_48]                              ; +0x124, 0x10041abb8\nSTR             X0, [SP,#0x50+var_50]                                  ; +0x128, 0x10041abbc\nADRL            X0, aOpenglError0x0; \"OpenGL error 0x%04X in %s %d\\n\"  ; +0x12c, 0x10041abc0\nBL              _printf                                                ; +0x134, 0x10041abc8\nCMP             X20, #0                                                ; +0x138, 0x10041abcc\nCSET            W0, NE                                                 ; +0x13c, 0x10041abd0\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x140, 0x10041abd4\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x144, 0x10041abd8\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x148, 0x10041abdc\nLDP             X24, X23, [SP,#0x50+var_30]                            ; +0x14c, 0x10041abe0\nADD             SP, SP, #0x60 ; '`'                                    ; +0x150, 0x10041abe4\nRET                                                                    ; +0x154, 0x10041abe8", "xrefs": ["-[EAGLView initWithFrame:pixelFormat:depthFormat:preserveBackbuffer:sharegroup:multiSampling:numberOfSamples:] @ 0x10041a7f8", "<???> @ 0x100849e10"], "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"}