{"type": "func", "start": 6442501328, "end": 6442501736, "name": "sub_18000C4D0", "pseudocode": "// \n// sub_18000C4D0 from 0x18000c4d0 to 0x18000c668 (408 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x180026ee8\n// > <???> @ 0x180049d50\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\n__int64 __fastcall sub_18000C4D0(__int64 a1)\n{\n  cocos2d::CCGLProgram *v2; // rax\n  cocos2d::CCGLProgram *v3; // rax\n  unsigned int v4; // edx\n  unsigned int v5; // r8d\n  cocos2d::CCGLProgram *v6; // rax\n  __int64 v7; // rax\n  unsigned int v8; // eax\n  unsigned int v9; // r8d\n  unsigned int v10; // eax\n  unsigned int v11; // r8d\n\n  cocos2d::ccGLEnable(*(unsigned int *)(a1 + 248));\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 632LL))(a1);\n  v2 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 632LL))(a1);\n  cocos2d::CCGLProgram::use(v2);\n  v3 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 632LL))(a1);\n  cocos2d::CCGLProgram::setUniformsForBuiltins(v3);\n  cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v4);\n  cocos2d::ccGLBlendFunc((cocos2d *)0x302, 0x303u, v5);\n  v6 = (cocos2d::CCGLProgram *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 632LL))(a1);\n  cocos2d::CCGLProgram::setUniformsForBuiltins(v6);\n  _glewActiveTexture(33984);\n  v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a1 + 344) + 16LL))(a1 + 344);\n  v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 96LL))(v7);\n  cocos2d::ccGLBindTexture2DN(nullptr, v8, v9);\n  _glewUniform1i(*(unsigned int *)(a1 + 632), 0);\n  _glewActiveTexture(33985);\n  v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 624) + 96LL))(*(_QWORD *)(a1 + 624));\n  cocos2d::ccGLBindTexture2DN((cocos2d *)1, v10, v11);\n  _glewUniform1i(*(unsigned int *)(a1 + 636), 1);\n  _glewVertexAttribPointer(0, 3, 5126);\n  _glewVertexAttribPointer(2, 2, 5126);\n  _glewVertexAttribPointer(1, 4, 5121);\n  glDrawArrays(5u, 0, 4);\n  return _glewActiveTexture(33984);\n}", "assembly": "; \n; sub_18000C4D0 from 0x18000c4d0 to 0x18000c668 (408 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x180026ee8\n; > <???> @ 0x180049d50\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, 0x18000c4d0\nsub     rsp, 30h                                                       ; +0x2, 0x18000c4d2\nmov     rbx, rcx                                                       ; +0x6, 0x18000c4d6\nmov     ecx, [rcx+0F8h]                                                ; +0x9, 0x18000c4d9\ncall    cs:?ccGLEnable@cocos2d@@YAXW4ccGLServerState@1@@Z; cocos2d::ccGLEnable(cocos2d::ccGLServerState) ; +0xf, 0x18000c4df\nmov     rax, [rbx]                                                     ; +0x15, 0x18000c4e5\nmov     rcx, rbx                                                       ; +0x18, 0x18000c4e8\ncall    qword ptr [rax+278h]                                           ; +0x1b, 0x18000c4eb\nmov     rax, [rbx]                                                     ; +0x21, 0x18000c4f1\nmov     rcx, rbx                                                       ; +0x24, 0x18000c4f4\ncall    qword ptr [rax+278h]                                           ; +0x27, 0x18000c4f7\nmov     rcx, rax                                                       ; +0x2d, 0x18000c4fd\ncall    cs:?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x30, 0x18000c500\nmov     rax, [rbx]                                                     ; +0x36, 0x18000c506\nmov     rcx, rbx                                                       ; +0x39, 0x18000c509\ncall    qword ptr [rax+278h]                                           ; +0x3c, 0x18000c50c\nmov     rcx, rax                                                       ; +0x42, 0x18000c512\ncall    cs:?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x45, 0x18000c515\nmov     ecx, 7                                                         ; +0x4b, 0x18000c51b\ncall    cs:?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x50, 0x18000c520\nmov     edx, 303h                                                      ; +0x56, 0x18000c526\nlea     ecx, [rdx-1]                                                   ; +0x5b, 0x18000c52b\ncall    cs:?ccGLBlendFunc@cocos2d@@YAXII@Z; cocos2d::ccGLBlendFunc(uint,uint) ; +0x5e, 0x18000c52e\nmov     rax, [rbx]                                                     ; +0x64, 0x18000c534\nmov     rcx, rbx                                                       ; +0x67, 0x18000c537\ncall    qword ptr [rax+278h]                                           ; +0x6a, 0x18000c53a\nmov     rcx, rax                                                       ; +0x70, 0x18000c540\ncall    cs:?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x73, 0x18000c543\nmov     rax, cs:__glewActiveTexture                                    ; +0x79, 0x18000c549\nmov     ecx, 84C0h                                                     ; +0x80, 0x18000c550\ncall    qword ptr [rax]                                                ; +0x85, 0x18000c555\nlea     rcx, [rbx+158h]                                                ; +0x87, 0x18000c557\nmov     rax, [rcx]                                                     ; +0x8e, 0x18000c55e\ncall    qword ptr [rax+10h]                                            ; +0x91, 0x18000c561\nmov     rcx, rax                                                       ; +0x94, 0x18000c564\nmov     rdx, [rax]                                                     ; +0x97, 0x18000c567\ncall    qword ptr [rdx+60h]                                            ; +0x9a, 0x18000c56a\nmov     edx, eax                                                       ; +0x9d, 0x18000c56d\nxor     ecx, ecx                                                       ; +0x9f, 0x18000c56f\ncall    cs:?ccGLBindTexture2DN@cocos2d@@YAXII@Z; cocos2d::ccGLBindTexture2DN(uint,uint) ; +0xa1, 0x18000c571\nmov     rax, cs:__glewUniform1i                                        ; +0xa7, 0x18000c577\nxor     edx, edx                                                       ; +0xae, 0x18000c57e\nmov     ecx, [rbx+278h]                                                ; +0xb0, 0x18000c580\ncall    qword ptr [rax]                                                ; +0xb6, 0x18000c586\nmov     rax, cs:__glewActiveTexture                                    ; +0xb8, 0x18000c588\nmov     ecx, 84C1h                                                     ; +0xbf, 0x18000c58f\ncall    qword ptr [rax]                                                ; +0xc4, 0x18000c594\nmov     rcx, [rbx+270h]                                                ; +0xc6, 0x18000c596\nmov     rax, [rcx]                                                     ; +0xcd, 0x18000c59d\ncall    qword ptr [rax+60h]                                            ; +0xd0, 0x18000c5a0\nmov     edx, eax                                                       ; +0xd3, 0x18000c5a3\nmov     ecx, 1                                                         ; +0xd5, 0x18000c5a5\ncall    cs:?ccGLBindTexture2DN@cocos2d@@YAXII@Z; cocos2d::ccGLBindTexture2DN(uint,uint) ; +0xda, 0x18000c5aa\nmov     rax, cs:__glewUniform1i                                        ; +0xe0, 0x18000c5b0\nmov     edx, 1                                                         ; +0xe7, 0x18000c5b7\nmov     ecx, [rbx+27Ch]                                                ; +0xec, 0x18000c5bc\ncall    qword ptr [rax]                                                ; +0xf2, 0x18000c5c2\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xf4, 0x18000c5c4\nxor     r9d, r9d                                                       ; +0xfb, 0x18000c5cb\nadd     rbx, 1CCh                                                      ; +0xfe, 0x18000c5ce\nxor     ecx, ecx                                                       ; +0x105, 0x18000c5d5\nmov     [rsp+38h+var_10], rbx                                          ; +0x107, 0x18000c5d7\nmov     r8d, 1406h                                                     ; +0x10c, 0x18000c5dc\nmov     [rsp+38h+var_18], 18h                                          ; +0x112, 0x18000c5e2\nlea     edx, [r9+3]                                                    ; +0x11a, 0x18000c5ea\ncall    qword ptr [rax]                                                ; +0x11e, 0x18000c5ee\nlea     rax, [rbx+10h]                                                 ; +0x120, 0x18000c5f0\nmov     edx, 2                                                         ; +0x124, 0x18000c5f4\nmov     [rsp+38h+var_10], rax                                          ; +0x129, 0x18000c5f9\nxor     r9d, r9d                                                       ; +0x12e, 0x18000c5fe\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x131, 0x18000c601\nmov     ecx, edx                                                       ; +0x138, 0x18000c608\nmov     r8d, 1406h                                                     ; +0x13a, 0x18000c60a\nmov     [rsp+38h+var_18], 18h                                          ; +0x140, 0x18000c610\ncall    qword ptr [rax]                                                ; +0x148, 0x18000c618\nlea     rax, [rbx+0Ch]                                                 ; +0x14a, 0x18000c61a\nmov     edx, 4                                                         ; +0x14e, 0x18000c61e\nmov     [rsp+38h+var_10], rax                                          ; +0x153, 0x18000c623\nmov     r9b, 1                                                         ; +0x158, 0x18000c628\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x15b, 0x18000c62b\nmov     r8d, 1401h                                                     ; +0x162, 0x18000c632\nmov     [rsp+38h+var_18], 18h                                          ; +0x168, 0x18000c638\nlea     ecx, [rdx-3]                                                   ; +0x170, 0x18000c640\ncall    qword ptr [rax]                                                ; +0x173, 0x18000c643\nxor     edx, edx; first                                                ; +0x175, 0x18000c645\nlea     ecx, [rdx+5]; mode                                             ; +0x177, 0x18000c647\nlea     r8d, [rdx+4]; count                                            ; +0x17a, 0x18000c64a\ncall    cs:glDrawArrays                                                ; +0x17e, 0x18000c64e\nmov     rax, cs:__glewActiveTexture                                    ; +0x184, 0x18000c654\nmov     ecx, 84C0h                                                     ; +0x18b, 0x18000c65b\nadd     rsp, 30h                                                       ; +0x190, 0x18000c660\npop     rbx                                                            ; +0x194, 0x18000c664\njmp     qword ptr [rax]                                                ; +0x195, 0x18000c665", "xrefs": ["<???> @ 0x180026ee8", "<???> @ 0x180049d50"], "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"}