{"type": "func", "start": 6442850336, "end": 6442850669, "name": "cocos2d::CCRenderTexture::beginWithClear", "pseudocode": "// \n// cocos2d::CCRenderTexture::beginWithClear from 0x180061820 to 0x18006196d (333 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCRenderTexture::beginWithClear @ 0x180061999\n// > cocos2d::CCRenderTexture::beginWithClear @ 0x1800619dc\n// > cocos2d::CCRenderTexture::beginWithClear @ 0x180061a1f\n// > cocos2d::CCRenderTexture::clear @ 0x180061a62\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bd648\n// > <???> @ 0x1801bd654\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:51 +0000\n// \n\nvoid __fastcall cocos2d::CCRenderTexture::beginWithClear(\n        cocos2d::CCRenderTexture *this,\n        GLclampf a2,\n        GLclampf a3,\n        GLclampf a4,\n        GLclampf alpha,\n        float a6,\n        GLint s,\n        GLbitfield mask)\n{\n  GLfloat v8; // [rsp+20h] [rbp-78h] BYREF\n  GLint v9; // [rsp+24h] [rbp-74h] BYREF\n  GLfloat params[4]; // [rsp+28h] [rbp-70h] BYREF\n\n  cocos2d::CCRenderTexture::begin(this);\n  v8 = 0.0;\n  v9 = 0;\n  *(_OWORD *)params = 0;\n  if ( (mask & 0x4000) != 0 )\n  {\n    glGetFloatv(0xC22u, params);\n    glClearColor(a2, a3, a4, alpha);\n  }\n  if ( (mask & 0x100) != 0 )\n  {\n    glGetFloatv(0xB73u, &v8);\n    glClearDepth(a6);\n  }\n  if ( (mask & 0x400) != 0 )\n  {\n    glGetIntegerv(0xB91u, &v9);\n    glClearStencil(s);\n  }\n  glClear(mask);\n  if ( (mask & 0x4000) != 0 )\n    glClearColor(params[0], params[1], params[2], params[3]);\n  if ( (mask & 0x100) != 0 )\n    glClearDepth(v8);\n  if ( (mask & 0x400) != 0 )\n    glClearStencil(v9);\n}", "assembly": "; \n; cocos2d::CCRenderTexture::beginWithClear from 0x180061820 to 0x18006196d (333 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCRenderTexture::beginWithClear @ 0x180061999\n; > cocos2d::CCRenderTexture::beginWithClear @ 0x1800619dc\n; > cocos2d::CCRenderTexture::beginWithClear @ 0x180061a1f\n; > cocos2d::CCRenderTexture::clear @ 0x180061a62\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bd648\n; > <???> @ 0x1801bd654\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:51 +0000\n; \npush    rbx                                                            ; +0x0, 0x180061820\npush    rbp                                                            ; +0x2, 0x180061822\npush    rsi                                                            ; +0x3, 0x180061823\npush    rdi                                                            ; +0x4, 0x180061824\nsub     rsp, 78h                                                       ; +0x5, 0x180061825\nmovaps  [rsp+98h+var_38], xmm6                                         ; +0x9, 0x180061829\nmovaps  [rsp+98h+var_48], xmm7                                         ; +0xe, 0x18006182e\nmovaps  [rsp+98h+var_58], xmm8                                         ; +0x13, 0x180061833\nmov     rax, cs:__security_cookie                                      ; +0x19, 0x180061839\nxor     rax, rsp                                                       ; +0x20, 0x180061840\nmov     [rsp+98h+var_60], rax                                          ; +0x23, 0x180061843\nmovaps  xmm8, xmm3                                                     ; +0x28, 0x180061848\nmovaps  xmm7, xmm2                                                     ; +0x2c, 0x18006184c\nmovaps  xmm6, xmm1                                                     ; +0x2f, 0x18006184f\ncall    ?begin@CCRenderTexture@cocos2d@@QEAAXXZ; cocos2d::CCRenderTexture::begin(void) ; +0x32, 0x180061852\nmov     esi, [rsp+98h+mask]                                            ; +0x37, 0x180061857\nxorps   xmm0, xmm0                                                     ; +0x3e, 0x18006185e\nmov     ebp, esi                                                       ; +0x41, 0x180061861\nmov     [rsp+98h+var_78], 0                                            ; +0x43, 0x180061863\nmov     [rsp+98h+var_74], 0                                            ; +0x4b, 0x18006186b\nmovups  xmmword ptr [rsp+98h+params], xmm0                             ; +0x53, 0x180061873\nand     ebp, 4000h                                                     ; +0x58, 0x180061878\njz      short loc_1800618A9                                            ; +0x5e, 0x18006187e\nlea     rdx, [rsp+98h+params]; params                                  ; +0x60, 0x180061880\nmov     ecx, 0C22h; pname                                              ; +0x65, 0x180061885\ncall    cs:glGetFloatv                                                 ; +0x6a, 0x18006188a\nmovss   xmm3, [rsp+98h+alpha]; alpha                                   ; +0x70, 0x180061890\nmovaps  xmm2, xmm8; blue                                               ; +0x79, 0x180061899\nmovaps  xmm1, xmm7; green                                              ; +0x7d, 0x18006189d\nmovaps  xmm0, xmm6; red                                                ; +0x80, 0x1800618a0\ncall    cs:glClearColor                                                ; +0x83, 0x1800618a3\nmov     ebx, esi                                                       ; +0x89, 0x1800618a9\nand     ebx, 100h                                                      ; +0x8b, 0x1800618ab\njz      short loc_1800618D5                                            ; +0x91, 0x1800618b1\nlea     rdx, [rsp+98h+var_78]; params                                  ; +0x93, 0x1800618b3\nmov     ecx, 0B73h; pname                                              ; +0x98, 0x1800618b8\ncall    cs:glGetFloatv                                                 ; +0x9d, 0x1800618bd\nmovss   xmm0, [rsp+98h+arg_28]                                         ; +0xa3, 0x1800618c3\ncvtps2pd xmm0, xmm0; depth                                             ; +0xac, 0x1800618cc\ncall    cs:glClearDepth                                                ; +0xaf, 0x1800618cf\nmov     edi, esi                                                       ; +0xb5, 0x1800618d5\nand     edi, 400h                                                      ; +0xb7, 0x1800618d7\njz      short loc_1800618FC                                            ; +0xbd, 0x1800618dd\nlea     rdx, [rsp+98h+var_74]; params                                  ; +0xbf, 0x1800618df\nmov     ecx, 0B91h; pname                                              ; +0xc4, 0x1800618e4\ncall    cs:glGetIntegerv                                               ; +0xc9, 0x1800618e9\nmov     ecx, [rsp+98h+s]; s                                            ; +0xcf, 0x1800618ef\ncall    cs:glClearStencil                                              ; +0xd6, 0x1800618f6\nmov     ecx, esi; mask                                                 ; +0xdc, 0x1800618fc\ncall    cs:glClear                                                     ; +0xde, 0x1800618fe\ntest    ebp, ebp                                                       ; +0xe4, 0x180061904\njz      short loc_180061926                                            ; +0xe6, 0x180061906\nmovss   xmm3, [rsp+98h+params+0Ch]; alpha                              ; +0xe8, 0x180061908\nmovss   xmm2, [rsp+98h+params+8]; blue                                 ; +0xee, 0x18006190e\nmovss   xmm1, [rsp+98h+params+4]; green                                ; +0xf4, 0x180061914\nmovss   xmm0, [rsp+98h+params]; red                                    ; +0xfa, 0x18006191a\ncall    cs:glClearColor                                                ; +0x100, 0x180061920\ntest    ebx, ebx                                                       ; +0x106, 0x180061926\njz      short loc_180061939                                            ; +0x108, 0x180061928\nmovss   xmm0, [rsp+98h+var_78]                                         ; +0x10a, 0x18006192a\ncvtps2pd xmm0, xmm0; depth                                             ; +0x110, 0x180061930\ncall    cs:glClearDepth                                                ; +0x113, 0x180061933\ntest    edi, edi                                                       ; +0x119, 0x180061939\njz      short loc_180061947                                            ; +0x11b, 0x18006193b\nmov     ecx, [rsp+98h+var_74]; s                                       ; +0x11d, 0x18006193d\ncall    cs:glClearStencil                                              ; +0x121, 0x180061941\nmov     rcx, [rsp+98h+var_60]                                          ; +0x127, 0x180061947\nxor     rcx, rsp; StackCookie                                          ; +0x12c, 0x18006194c\ncall    __security_check_cookie                                        ; +0x12f, 0x18006194f\nmovaps  xmm6, [rsp+98h+var_38]                                         ; +0x134, 0x180061954\nmovaps  xmm7, [rsp+98h+var_48]                                         ; +0x139, 0x180061959\nmovaps  xmm8, [rsp+98h+var_58]                                         ; +0x13e, 0x18006195e\nadd     rsp, 78h                                                       ; +0x144, 0x180061964\npop     rdi                                                            ; +0x148, 0x180061968\npop     rsi                                                            ; +0x149, 0x180061969\npop     rbp                                                            ; +0x14a, 0x18006196a\npop     rbx                                                            ; +0x14b, 0x18006196b\nretn                                                                   ; +0x14c, 0x18006196c", "xrefs": ["cocos2d::CCRenderTexture::beginWithClear @ 0x180061999", "cocos2d::CCRenderTexture::beginWithClear @ 0x1800619dc", "cocos2d::CCRenderTexture::beginWithClear @ 0x180061a1f", "cocos2d::CCRenderTexture::clear @ 0x180061a62", "<???> @ 0x18014cf68", "<???> @ 0x1801bd648", "<???> @ 0x1801bd654"], "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"}