{"type": "func", "start": 6442530304, "end": 6442530711, "name": "cocos2d::extension::CCScrollView::beforeDraw", "pseudocode": "// \n// cocos2d::extension::CCScrollView::beforeDraw from 0x180013600 to 0x180013797 (407 bytes)\n// \n// 5 xrefs:\n// > cocos2d::extension::CCScrollView::visit @ 0x180013867\n// > <???> @ 0x18002ea20\n// > <???> @ 0x18002ea60\n// > <???> @ 0x18002fdf8\n// > <???> @ 0x18004a4f4\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\nvoid __fastcall cocos2d::extension::CCScrollView::beforeDraw(cocos2d::extension::CCScrollView *this)\n{\n  __int64 v2; // rax\n  __int64 v3; // rax\n  __int64 v4; // rax\n  __int64 v5; // rax\n  __int64 v6; // rax\n  int v7; // [rsp+30h] [rbp-68h] BYREF\n  _BYTE v8[16]; // [rsp+40h] [rbp-58h] BYREF\n\n  if ( *((_BYTE *)this + 477) )\n  {\n    *((_BYTE *)this + 544) = 0;\n    cocos2d::extension::CCScrollView::getViewRect(this, &v7);\n    v2 = cocos2d::CCEGLView::sharedOpenGLView();\n    if ( (*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)v2 + 112LL))(v2) )\n    {\n      *((_BYTE *)this + 544) = 1;\n      v3 = cocos2d::CCEGLView::sharedOpenGLView();\n      v4 = (*(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v3 + 120LL))(v3, v8);\n      cocos2d::CCRect::operator=((char *)this + 528, v4);\n      if ( cocos2d::CCRect::intersectsRect(\n             (cocos2d::CCRect *)&v7,\n             (cocos2d::extension::CCScrollView *)((char *)this + 528)) )\n      {\n        v5 = cocos2d::CCEGLView::sharedOpenGLView();\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 104LL))(v5);\n      }\n    }\n    else\n    {\n      glEnable(0xC11u);\n      v6 = cocos2d::CCEGLView::sharedOpenGLView();\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 104LL))(v6);\n    }\n  }\n}", "assembly": "; \n; cocos2d::extension::CCScrollView::beforeDraw from 0x180013600 to 0x180013797 (407 bytes)\n; \n; 5 xrefs:\n; > cocos2d::extension::CCScrollView::visit @ 0x180013867\n; > <???> @ 0x18002ea20\n; > <???> @ 0x18002ea60\n; > <???> @ 0x18002fdf8\n; > <???> @ 0x18004a4f4\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    rbx                                                            ; +0x0, 0x180013600\nsub     rsp, 90h                                                       ; +0x2, 0x180013602\ncmp     byte ptr [rcx+1DDh], 0                                         ; +0x9, 0x180013609\nmov     rbx, rcx                                                       ; +0x10, 0x180013610\njz      loc_18001374D                                                  ; +0x13, 0x180013613\nlea     rdx, [rsp+98h+var_68]                                          ; +0x19, 0x180013619\nmov     byte ptr [rcx+220h], 0                                         ; +0x1e, 0x18001361e\ncall    ?getViewRect@CCScrollView@extension@cocos2d@@IEAA?AVCCRect@3@XZ; cocos2d::extension::CCScrollView::getViewRect(void) ; +0x25, 0x180013625\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x2a, 0x18001362a\nmov     rcx, rax                                                       ; +0x30, 0x180013630\nmov     rdx, [rax]                                                     ; +0x33, 0x180013633\ncall    qword ptr [rdx+70h]                                            ; +0x36, 0x180013636\ntest    al, al                                                         ; +0x39, 0x180013639\njz      loc_180013756                                                  ; +0x3b, 0x18001363b\nmov     [rsp+98h+arg_0], rdi                                           ; +0x41, 0x180013641\nmov     byte ptr [rbx+220h], 1                                         ; +0x49, 0x180013649\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x50, 0x180013650\nlea     rdx, [rsp+98h+var_58]                                          ; +0x56, 0x180013656\nmov     rcx, rax                                                       ; +0x5b, 0x18001365b\nmov     r8, [rax]                                                      ; +0x5e, 0x18001365e\ncall    qword ptr [r8+78h]                                             ; +0x61, 0x180013661\nmov     rdx, rax                                                       ; +0x65, 0x180013665\nlea     rcx, [rbx+210h]                                                ; +0x68, 0x180013668\ncall    cs:??4CCRect@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCRect::operator=(cocos2d::CCRect const &) ; +0x6f, 0x18001366f\nlea     rdx, [rbx+210h]                                                ; +0x75, 0x180013675\nlea     rcx, [rsp+98h+var_68]                                          ; +0x7c, 0x18001367c\ncall    cs:?intersectsRect@CCRect@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCRect::intersectsRect(cocos2d::CCRect const &) ; +0x81, 0x180013681\ntest    al, al                                                         ; +0x87, 0x180013687\njz      loc_180013745                                                  ; +0x89, 0x180013689\nmovss   xmm0, [rsp+98h+var_68]                                         ; +0x8f, 0x18001368f\nmovss   xmm1, [rsp+98h+var_64]                                         ; +0x95, 0x180013695\nmovss   xmm2, dword ptr [rbx+210h]                                     ; +0x9b, 0x18001369b\nmovss   xmm4, dword ptr [rbx+214h]                                     ; +0xa3, 0x1800136a3\nmovaps  [rsp+98h+var_18], xmm6                                         ; +0xab, 0x1800136ab\nmovss   xmm6, [rsp+98h+var_5C]                                         ; +0xb3, 0x1800136b3\nmovaps  [rsp+98h+var_28], xmm7                                         ; +0xb9, 0x1800136b9\naddss   xmm6, xmm1                                                     ; +0xbe, 0x1800136be\nmovss   xmm7, [rsp+98h+var_60]                                         ; +0xc2, 0x1800136c2\nmovaps  [rsp+98h+var_38], xmm8                                         ; +0xc8, 0x1800136c8\naddss   xmm7, xmm0                                                     ; +0xce, 0x1800136ce\nmovaps  [rsp+98h+var_48], xmm9                                         ; +0xd2, 0x1800136d2\nmovaps  xmm8, xmm1                                                     ; +0xd8, 0x1800136d8\nmovaps  xmm9, xmm0                                                     ; +0xdc, 0x1800136dc\nmaxss   xmm8, xmm4                                                     ; +0xe0, 0x1800136e0\naddss   xmm4, dword ptr [rbx+21Ch]                                     ; +0xe5, 0x1800136e5\nmaxss   xmm9, xmm2                                                     ; +0xed, 0x1800136ed\naddss   xmm2, dword ptr [rbx+218h]                                     ; +0xf2, 0x1800136f2\nminss   xmm6, xmm4                                                     ; +0xfa, 0x1800136fa\nminss   xmm7, xmm2                                                     ; +0xfe, 0x1800136fe\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x102, 0x180013702\nsubss   xmm7, xmm9                                                     ; +0x108, 0x180013708\nmovaps  xmm2, xmm8                                                     ; +0x10d, 0x18001370d\nsubss   xmm6, xmm8                                                     ; +0x111, 0x180013711\nmovaps  xmm1, xmm9                                                     ; +0x116, 0x180013716\nmov     rcx, rax                                                       ; +0x11a, 0x18001371a\nmov     rdx, [rax]                                                     ; +0x11d, 0x18001371d\nmovaps  xmm3, xmm7                                                     ; +0x120, 0x180013720\nmovss   [rsp+98h+var_78], xmm6                                         ; +0x123, 0x180013723\ncall    qword ptr [rdx+68h]                                            ; +0x129, 0x180013729\nmovaps  xmm9, [rsp+98h+var_48]                                         ; +0x12c, 0x18001372c\nmovaps  xmm8, [rsp+98h+var_38]                                         ; +0x132, 0x180013732\nmovaps  xmm7, [rsp+98h+var_28]                                         ; +0x138, 0x180013738\nmovaps  xmm6, [rsp+98h+var_18]                                         ; +0x13d, 0x18001373d\nmov     rdi, [rsp+98h+arg_0]                                           ; +0x145, 0x180013745\nadd     rsp, 90h                                                       ; +0x14d, 0x18001374d\npop     rbx                                                            ; +0x154, 0x180013754\nretn                                                                   ; +0x155, 0x180013755\nmov     ecx, 0C11h; cap                                                ; +0x156, 0x180013756\ncall    cs:glEnable                                                    ; +0x15b, 0x18001375b\ncall    cs:?sharedOpenGLView@CCEGLView@cocos2d@@SAPEAV12@XZ; cocos2d::CCEGLView::sharedOpenGLView(void) ; +0x161, 0x180013761\nmovss   xmm0, [rsp+98h+var_5C]                                         ; +0x167, 0x180013767\nmov     rcx, rax                                                       ; +0x16d, 0x18001376d\nmovss   xmm3, [rsp+98h+var_60]                                         ; +0x170, 0x180013770\nmovss   xmm2, [rsp+98h+var_64]                                         ; +0x176, 0x180013776\nmov     rdx, [rax]                                                     ; +0x17c, 0x18001377c\nmovss   xmm1, [rsp+98h+var_68]                                         ; +0x17f, 0x18001377f\nmovss   [rsp+98h+var_78], xmm0                                         ; +0x185, 0x180013785\ncall    qword ptr [rdx+68h]                                            ; +0x18b, 0x18001378b\nadd     rsp, 90h                                                       ; +0x18e, 0x18001378e\npop     rbx                                                            ; +0x195, 0x180013795\nretn                                                                   ; +0x196, 0x180013796", "xrefs": ["cocos2d::extension::CCScrollView::visit @ 0x180013867", "<???> @ 0x18002ea20", "<???> @ 0x18002ea60", "<???> @ 0x18002fdf8", "<???> @ 0x18004a4f4"], "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"}