{"type": "func", "start": 6443001968, "end": 6443002178, "name": "cocos2d::CCGLProgram::compileShader", "pseudocode": "// \n// cocos2d::CCGLProgram::compileShader from 0x180086870 to 0x180086942 (210 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCGLProgram::initWithVertexShaderByteArray @ 0x180086a28\n// > cocos2d::CCGLProgram::initWithVertexShaderByteArray @ 0x180086a4d\n// > <???> @ 0x18013cd30\n// > <???> @ 0x18013cd40\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b56dc\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 __fastcall cocos2d::CCGLProgram::compileShader(\n        cocos2d::CCGLProgram *this,\n        unsigned int *a2,\n        unsigned int a3,\n        const char *a4)\n{\n  unsigned int Shader; // eax\n  void *v7; // rbx\n  int v8; // [rsp+20h] [rbp-28h] BYREF\n  _QWORD v9[4]; // [rsp+28h] [rbp-20h] BYREF\n  unsigned int v10; // [rsp+68h] [rbp+20h] BYREF\n\n  if ( !a4 )\n    return 0;\n  v9[1] = a4;\n  v9[0] = \"uniform mat4 CC_PMatrix;\\n\"\n          \"uniform mat4 CC_MVMatrix;\\n\"\n          \"uniform mat4 CC_MVPMatrix;\\n\"\n          \"uniform vec4 CC_Time;\\n\"\n          \"uniform vec4 CC_SinTime;\\n\"\n          \"uniform vec4 CC_CosTime;\\n\"\n          \"uniform vec4 CC_Random01;\\n\"\n          \"//CC INCLUDES END\\n\"\n          \"\\n\";\n  Shader = _glewCreateShader(a3);\n  *a2 = Shader;\n  _glewShaderSource(Shader, 2, v9);\n  _glewCompileShader(*a2);\n  _glewGetShaderiv(*a2, 0x8B81u, &v8);\n  if ( !v8 )\n  {\n    ((void (__fastcall *)(_QWORD, __int64, unsigned int *))_glewGetShaderiv)(*a2, 35720, &v10);\n    v7 = malloc((int)v10);\n    _glewGetShaderSource(*a2, v10, 0, v7);\n    free(v7);\n    abort();\n  }\n  return v8 == 1;\n}", "assembly": "; \n; cocos2d::CCGLProgram::compileShader from 0x180086870 to 0x180086942 (210 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCGLProgram::initWithVertexShaderByteArray @ 0x180086a28\n; > cocos2d::CCGLProgram::initWithVertexShaderByteArray @ 0x180086a4d\n; > <???> @ 0x18013cd30\n; > <???> @ 0x18013cd40\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b56dc\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    rdi                                                            ; +0x0, 0x180086870\nsub     rsp, 40h                                                       ; +0x2, 0x180086872\nmov     rdi, rdx                                                       ; +0x6, 0x180086876\ntest    r9, r9                                                         ; +0x9, 0x180086879\njnz     short loc_180086886                                            ; +0xc, 0x18008687c\nxor     al, al                                                         ; +0xe, 0x18008687e\nadd     rsp, 40h                                                       ; +0x10, 0x180086880\npop     rdi                                                            ; +0x14, 0x180086884\nretn                                                                   ; +0x15, 0x180086885\nlea     rax, aUniformMat4CcP; \"uniform mat4 CC_PMatrix;\\nuniform mat4 \"... ; +0x16, 0x180086886\nmov     [rsp+48h+var_18], r9                                           ; +0x1d, 0x18008688d\nmov     [rsp+48h+var_20], rax                                          ; +0x22, 0x180086892\nmov     ecx, r8d                                                       ; +0x27, 0x180086897\nmov     rax, cs:__glewCreateShader                                     ; +0x2a, 0x18008689a\ncall    qword ptr [rax]                                                ; +0x31, 0x1800868a1\nxor     r9d, r9d                                                       ; +0x33, 0x1800868a3\nmov     [rdi], eax                                                     ; +0x36, 0x1800868a6\nmov     ecx, eax                                                       ; +0x38, 0x1800868a8\nlea     r8, [rsp+48h+var_20]                                           ; +0x3a, 0x1800868aa\nmov     rax, cs:__glewShaderSource                                     ; +0x3f, 0x1800868af\nlea     edx, [r9+2]                                                    ; +0x46, 0x1800868b6\ncall    qword ptr [rax]                                                ; +0x4a, 0x1800868ba\nmov     rax, cs:__glewCompileShader                                    ; +0x4c, 0x1800868bc\nmov     ecx, [rdi]                                                     ; +0x53, 0x1800868c3\ncall    qword ptr [rax]                                                ; +0x55, 0x1800868c5\nmov     rax, cs:__glewGetShaderiv                                      ; +0x57, 0x1800868c7\nlea     r8, [rsp+48h+var_28]                                           ; +0x5e, 0x1800868ce\nmov     ecx, [rdi]                                                     ; +0x63, 0x1800868d3\nmov     edx, 8B81h                                                     ; +0x65, 0x1800868d5\ncall    qword ptr [rax]                                                ; +0x6a, 0x1800868da\nmov     eax, [rsp+48h+var_28]                                          ; +0x6c, 0x1800868dc\ntest    eax, eax                                                       ; +0x70, 0x1800868e0\njnz     short loc_180086936                                            ; +0x72, 0x1800868e2\nmov     rax, cs:__glewGetShaderiv                                      ; +0x74, 0x1800868e4\nlea     r8, [rsp+48h+arg_18]                                           ; +0x7b, 0x1800868eb\nmov     ecx, [rdi]                                                     ; +0x80, 0x1800868f0\nmov     edx, 8B88h                                                     ; +0x82, 0x1800868f2\nmov     [rsp+48h+arg_0], rbx                                           ; +0x87, 0x1800868f7\ncall    qword ptr [rax]                                                ; +0x8c, 0x1800868fc\nmovsxd  rcx, [rsp+48h+arg_18]; Size                                    ; +0x8e, 0x1800868fe\ncall    cs:__imp_malloc                                                ; +0x93, 0x180086903\nmov     r10, cs:__glewGetShaderSource                                  ; +0x99, 0x180086909\nxor     r8d, r8d                                                       ; +0xa0, 0x180086910\nmov     edx, [rsp+48h+arg_18]                                          ; +0xa3, 0x180086913\nmov     r9, rax                                                        ; +0xa7, 0x180086917\nmov     ecx, [rdi]                                                     ; +0xaa, 0x18008691a\nmov     rbx, rax                                                       ; +0xac, 0x18008691c\ncall    qword ptr [r10]                                                ; +0xaf, 0x18008691f\nmov     rcx, rbx; Block                                                ; +0xb2, 0x180086922\ncall    cs:__imp_free                                                  ; +0xb5, 0x180086925\ncall    cs:abort                                                       ; +0xbb, 0x18008692b\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xc1, 0x180086931\ncmp     eax, 1                                                         ; +0xc6, 0x180086936\nsetz    al                                                             ; +0xc9, 0x180086939\nadd     rsp, 40h                                                       ; +0xcc, 0x18008693c\npop     rdi                                                            ; +0xd0, 0x180086940\nretn                                                                   ; +0xd1, 0x180086941", "xrefs": ["cocos2d::CCGLProgram::initWithVertexShaderByteArray @ 0x180086a28", "cocos2d::CCGLProgram::initWithVertexShaderByteArray @ 0x180086a4d", "<???> @ 0x18013cd30", "<???> @ 0x18013cd40", "<???> @ 0x1801438a8", "<???> @ 0x1801b56dc"], "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"}