{"type": "func", "start": 6442851696, "end": 6442852219, "name": "cocos2d::CCRenderTexture::draw", "pseudocode": "// \n// cocos2d::CCRenderTexture::draw from 0x180061d70 to 0x180061f7b (523 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x180100448\n// > <???> @ 0x1801427e4\n// > <???> @ 0x180142818\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bd6cc\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::draw(cocos2d::CCRenderTexture *this)\n{\n  int v2; // eax\n  __int64 v3; // rax\n  unsigned int *v4; // rbx\n  __int64 v5; // rax\n  __int64 *v6; // rbx\n  __int64 *i; // rsi\n  __int64 v8; // rcx\n  cocos2d::CCDirector *v9; // rbx\n  GLfloat v10; // [rsp+20h] [rbp-28h] BYREF\n  GLint s; // [rsp+24h] [rbp-24h] BYREF\n  GLfloat params[4]; // [rsp+28h] [rbp-20h] BYREF\n\n  if ( *((_BYTE *)this + 400) )\n  {\n    cocos2d::CCRenderTexture::begin(this);\n    v2 = *((_DWORD *)this + 93);\n    if ( v2 )\n    {\n      v10 = 0.0;\n      s = 0;\n      *(_OWORD *)params = 0;\n      if ( (v2 & 0x4000) != 0 )\n      {\n        glGetFloatv(0xC22u, params);\n        glClearColor(\n          *((GLclampf *)this + 94),\n          *((GLclampf *)this + 95),\n          *((GLclampf *)this + 96),\n          *((GLclampf *)this + 97));\n      }\n      if ( (*((_DWORD *)this + 93) & 0x100) != 0 )\n      {\n        glGetFloatv(0xB73u, &v10);\n        glClearDepth(*((float *)this + 98));\n      }\n      if ( (*((_DWORD *)this + 93) & 0x400) != 0 )\n      {\n        glGetIntegerv(0xB91u, &s);\n        glClearStencil(*((_DWORD *)this + 99));\n      }\n      glClear(*((_DWORD *)this + 93));\n      if ( (*((_DWORD *)this + 93) & 0x4000) != 0 )\n        glClearColor(params[0], params[1], params[2], params[3]);\n      if ( (*((_DWORD *)this + 93) & 0x100) != 0 )\n        glClearDepth(v10);\n      if ( (*((_DWORD *)this + 93) & 0x400) != 0 )\n        glClearStencil(s);\n    }\n    (*(void (__fastcall **)(cocos2d::CCRenderTexture *))(*(_QWORD *)this + 592LL))(this);\n    v3 = *((_QWORD *)this + 26);\n    if ( v3 )\n    {\n      v4 = *(unsigned int **)(v3 + 56);\n      v5 = *v4;\n      if ( (_DWORD)v5 )\n      {\n        v6 = *((__int64 **)v4 + 2);\n        for ( i = &v6[v5 - 1]; v6 <= i; ++v6 )\n        {\n          v8 = *v6;\n          if ( !*v6 )\n            break;\n          if ( v8 != *((_QWORD *)this + 40) )\n            (*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 744LL))(v8);\n        }\n      }\n    }\n    v9 = cocos2d::CCDirector::sharedDirector();\n    _glewBindFramebuffer(36160, *((unsigned int *)this + 84));\n    cocos2d::CCDirector::setViewport(v9);\n    kmGLMatrixMode(5889);\n    kmGLPopMatrix();\n    kmGLMatrixMode(5888);\n    kmGLPopMatrix();\n  }\n}", "assembly": "; \n; cocos2d::CCRenderTexture::draw from 0x180061d70 to 0x180061f7b (523 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x180100448\n; > <???> @ 0x1801427e4\n; > <???> @ 0x180142818\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bd6cc\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    rdi                                                            ; +0x0, 0x180061d70\nsub     rsp, 40h                                                       ; +0x2, 0x180061d72\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x180061d76\nxor     rax, rsp                                                       ; +0xd, 0x180061d7d\nmov     [rsp+48h+var_10], rax                                          ; +0x10, 0x180061d80\ncmp     byte ptr [rcx+190h], 0                                         ; +0x15, 0x180061d85\nmov     rdi, rcx                                                       ; +0x1c, 0x180061d8c\njz      loc_180061F68                                                  ; +0x1f, 0x180061d8f\nmov     [rsp+48h+arg_8], rbx                                           ; +0x25, 0x180061d95\ncall    ?begin@CCRenderTexture@cocos2d@@QEAAXXZ; cocos2d::CCRenderTexture::begin(void) ; +0x2a, 0x180061d9a\nmov     eax, [rdi+174h]                                                ; +0x2f, 0x180061d9f\ntest    eax, eax                                                       ; +0x35, 0x180061da5\njz      loc_180061EBD                                                  ; +0x37, 0x180061da7\nmov     [rsp+48h+var_28], 0                                            ; +0x3d, 0x180061dad\nxorps   xmm0, xmm0                                                     ; +0x45, 0x180061db5\nmov     [rsp+48h+s], 0                                                 ; +0x48, 0x180061db8\nmovups  xmmword ptr [rsp+48h+params], xmm0                             ; +0x50, 0x180061dc0\nbt      eax, 0Eh                                                       ; +0x55, 0x180061dc5\njnb     short loc_180061E01                                            ; +0x59, 0x180061dc9\nlea     rdx, [rsp+48h+params]; params                                  ; +0x5b, 0x180061dcb\nmov     ecx, 0C22h; pname                                              ; +0x60, 0x180061dd0\ncall    cs:glGetFloatv                                                 ; +0x65, 0x180061dd5\nmovss   xmm3, dword ptr [rdi+184h]; alpha                              ; +0x6b, 0x180061ddb\nmovss   xmm2, dword ptr [rdi+180h]; blue                               ; +0x73, 0x180061de3\nmovss   xmm1, dword ptr [rdi+17Ch]; green                              ; +0x7b, 0x180061deb\nmovss   xmm0, dword ptr [rdi+178h]; red                                ; +0x83, 0x180061df3\ncall    cs:glClearColor                                                ; +0x8b, 0x180061dfb\ntest    dword ptr [rdi+174h], 100h                                     ; +0x91, 0x180061e01\njz      short loc_180061E2E                                            ; +0x9b, 0x180061e0b\nlea     rdx, [rsp+48h+var_28]; params                                  ; +0x9d, 0x180061e0d\nmov     ecx, 0B73h; pname                                              ; +0xa2, 0x180061e12\ncall    cs:glGetFloatv                                                 ; +0xa7, 0x180061e17\nmovss   xmm0, dword ptr [rdi+188h]                                     ; +0xad, 0x180061e1d\ncvtps2pd xmm0, xmm0; depth                                             ; +0xb5, 0x180061e25\ncall    cs:glClearDepth                                                ; +0xb8, 0x180061e28\ntest    dword ptr [rdi+174h], 400h                                     ; +0xbe, 0x180061e2e\njz      short loc_180061E56                                            ; +0xc8, 0x180061e38\nlea     rdx, [rsp+48h+s]; params                                       ; +0xca, 0x180061e3a\nmov     ecx, 0B91h; pname                                              ; +0xcf, 0x180061e3f\ncall    cs:glGetIntegerv                                               ; +0xd4, 0x180061e44\nmov     ecx, [rdi+18Ch]; s                                             ; +0xda, 0x180061e4a\ncall    cs:glClearStencil                                              ; +0xe0, 0x180061e50\nmov     ecx, [rdi+174h]; mask                                          ; +0xe6, 0x180061e56\ncall    cs:glClear                                                     ; +0xec, 0x180061e5c\ntest    dword ptr [rdi+174h], 4000h                                    ; +0xf2, 0x180061e62\njz      short loc_180061E8C                                            ; +0xfc, 0x180061e6c\nmovss   xmm3, [rsp+48h+params+0Ch]; alpha                              ; +0xfe, 0x180061e6e\nmovss   xmm2, [rsp+48h+params+8]; blue                                 ; +0x104, 0x180061e74\nmovss   xmm1, [rsp+48h+params+4]; green                                ; +0x10a, 0x180061e7a\nmovss   xmm0, [rsp+48h+params]; red                                    ; +0x110, 0x180061e80\ncall    cs:glClearColor                                                ; +0x116, 0x180061e86\ntest    dword ptr [rdi+174h], 100h                                     ; +0x11c, 0x180061e8c\njz      short loc_180061EA7                                            ; +0x126, 0x180061e96\nmovss   xmm0, [rsp+48h+var_28]                                         ; +0x128, 0x180061e98\ncvtps2pd xmm0, xmm0; depth                                             ; +0x12e, 0x180061e9e\ncall    cs:glClearDepth                                                ; +0x131, 0x180061ea1\ntest    dword ptr [rdi+174h], 400h                                     ; +0x137, 0x180061ea7\njz      short loc_180061EBD                                            ; +0x141, 0x180061eb1\nmov     ecx, [rsp+48h+s]; s                                            ; +0x143, 0x180061eb3\ncall    cs:glClearStencil                                              ; +0x147, 0x180061eb7\nmov     rax, [rdi]                                                     ; +0x14d, 0x180061ebd\nmov     rcx, rdi                                                       ; +0x150, 0x180061ec0\ncall    qword ptr [rax+250h]                                           ; +0x153, 0x180061ec3\nmov     rax, [rdi+0D0h]                                                ; +0x159, 0x180061ec9\ntest    rax, rax                                                       ; +0x160, 0x180061ed0\njz      short loc_180061F1D                                            ; +0x163, 0x180061ed3\nmov     rbx, [rax+38h]                                                 ; +0x165, 0x180061ed5\nmov     eax, [rbx]                                                     ; +0x169, 0x180061ed9\ntest    eax, eax                                                       ; +0x16b, 0x180061edb\njz      short loc_180061F1D                                            ; +0x16d, 0x180061edd\nmov     rbx, [rbx+10h]                                                 ; +0x16f, 0x180061edf\nmov     [rsp+48h+arg_10], rsi                                          ; +0x173, 0x180061ee3\nlea     rsi, [rax-1]                                                   ; +0x178, 0x180061ee8\nlea     rsi, [rbx+rsi*8]                                               ; +0x17c, 0x180061eec\ncmp     rbx, rsi                                                       ; +0x180, 0x180061ef0\nja      short loc_180061F18                                            ; +0x183, 0x180061ef3\nmov     rcx, [rbx]                                                     ; +0x185, 0x180061ef5\ntest    rcx, rcx                                                       ; +0x188, 0x180061ef8\njz      short loc_180061F18                                            ; +0x18b, 0x180061efb\ncmp     rcx, [rdi+140h]                                                ; +0x18d, 0x180061efd\njz      short loc_180061F0F                                            ; +0x194, 0x180061f04\nmov     rax, [rcx]                                                     ; +0x196, 0x180061f06\ncall    qword ptr [rax+2E8h]                                           ; +0x199, 0x180061f09\nadd     rbx, 8                                                         ; +0x19f, 0x180061f0f\ncmp     rbx, rsi                                                       ; +0x1a3, 0x180061f13\njbe     short loc_180061EF5                                            ; +0x1a6, 0x180061f16\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x1a8, 0x180061f18\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1ad, 0x180061f1d\nmov     rcx, cs:__glewBindFramebuffer                                  ; +0x1b2, 0x180061f22\nmov     rbx, rax                                                       ; +0x1b9, 0x180061f29\nmov     edx, [rdi+150h]                                                ; +0x1bc, 0x180061f2c\nmov     r8, [rcx]                                                      ; +0x1c2, 0x180061f32\nmov     ecx, 8D40h                                                     ; +0x1c5, 0x180061f35\ncall    r8                                                             ; +0x1ca, 0x180061f3a\nmov     rcx, rbx; this                                                 ; +0x1cd, 0x180061f3d\ncall    ?setViewport@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::setViewport(void) ; +0x1d0, 0x180061f40\nmov     ecx, 1701h                                                     ; +0x1d5, 0x180061f45\ncall    kmGLMatrixMode                                                 ; +0x1da, 0x180061f4a\ncall    kmGLPopMatrix                                                  ; +0x1df, 0x180061f4f\nmov     ecx, 1700h                                                     ; +0x1e4, 0x180061f54\ncall    kmGLMatrixMode                                                 ; +0x1e9, 0x180061f59\ncall    kmGLPopMatrix                                                  ; +0x1ee, 0x180061f5e\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x1f3, 0x180061f63\nmov     rcx, [rsp+48h+var_10]                                          ; +0x1f8, 0x180061f68\nxor     rcx, rsp; StackCookie                                          ; +0x1fd, 0x180061f6d\ncall    __security_check_cookie                                        ; +0x200, 0x180061f70\nadd     rsp, 40h                                                       ; +0x205, 0x180061f75\npop     rdi                                                            ; +0x209, 0x180061f79\nretn                                                                   ; +0x20a, 0x180061f7a", "xrefs": ["<???> @ 0x180100448", "<???> @ 0x1801427e4", "<???> @ 0x180142818", "<???> @ 0x18014cf68", "<???> @ 0x1801bd6cc"], "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"}