{"type": "func", "start": 6443015248, "end": 6443015661, "name": "cocos2d::CCGLProgram::initWithVertexShaderFilename", "pseudocode": "// \n// cocos2d::CCGLProgram::initWithVertexShaderFilename from 0x180089c50 to 0x180089ded (413 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bf9dc\n// > <???> @ 0x1801bf9e8\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:22:05 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nchar __fastcall cocos2d::CCGLProgram::initWithVertexShaderFilename(\n        cocos2d::CCGLProgram *this,\n        const char *a2,\n        const char *a3)\n{\n  struct cocos2d::CCFileUtils *v6; // rax\n  __int64 v7; // rax\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rdi\n  _BYTE *v10; // r8\n  struct cocos2d::CCFileUtils *v11; // rax\n  __int64 v12; // rax\n  cocos2d::CCString *v13; // rax\n  const char *v14; // rbx\n  _BYTE *v15; // r8\n  void *Block; // [rsp+30h] [rbp-68h] BYREF\n  __m128i si128; // [rsp+40h] [rbp-58h]\n  void *v19; // [rsp+50h] [rbp-48h] BYREF\n  __m128i v20; // [rsp+60h] [rbp-38h]\n\n  v6 = cocos2d::CCFileUtils::sharedFileUtils();\n  v7 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))(*(_QWORD *)v6 + 40LL))(\n         v6,\n         &Block,\n         a2,\n         0);\n  if ( *(_QWORD *)(v7 + 24) > 0xFu )\n    v7 = *(_QWORD *)v7;\n  v8 = cocos2d::CCString::createWithContentsOfFile((const char *)v7);\n  CString = cocos2d::CCString::getCString(v8);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v10 = Block;\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v10 = *((_BYTE **)Block - 1);\n      if ( (unsigned __int64)((_BYTE *)Block - v10 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v10);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n  LOBYTE(Block) = 0;\n  v11 = cocos2d::CCFileUtils::sharedFileUtils();\n  v12 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))(*(_QWORD *)v11 + 40LL))(\n          v11,\n          &v19,\n          a3,\n          0);\n  if ( *(_QWORD *)(v12 + 24) > 0xFu )\n    v12 = *(_QWORD *)v12;\n  v13 = cocos2d::CCString::createWithContentsOfFile((const char *)v12);\n  v14 = cocos2d::CCString::getCString(v13);\n  if ( v20.m128i_i64[1] > 0xFuLL )\n  {\n    v15 = v19;\n    if ( (unsigned __int64)(v20.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v15 = *((_BYTE **)v19 - 1);\n      if ( (unsigned __int64)((_BYTE *)v19 - v15 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v15);\n  }\n  v20 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n  LOBYTE(v19) = 0;\n  return cocos2d::CCGLProgram::initWithVertexShaderByteArray(this, CString, v14);\n}", "assembly": "; \n; cocos2d::CCGLProgram::initWithVertexShaderFilename from 0x180089c50 to 0x180089ded (413 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bf9dc\n; > <???> @ 0x1801bf9e8\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:22:05 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x180089c50\npush    rbp                                                            ; +0x5, 0x180089c55\npush    rsi                                                            ; +0x6, 0x180089c56\npush    rdi                                                            ; +0x7, 0x180089c57\nsub     rsp, 80h                                                       ; +0x8, 0x180089c58\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x180089c5f\nxor     rax, rsp                                                       ; +0x16, 0x180089c66\nmov     [rsp+98h+var_28], rax                                          ; +0x19, 0x180089c69\nmov     rsi, r8                                                        ; +0x1e, 0x180089c6e\nmov     rbx, rdx                                                       ; +0x21, 0x180089c71\nmov     rbp, rcx                                                       ; +0x24, 0x180089c74\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x27, 0x180089c77\nmov     rcx, [rax]                                                     ; +0x2c, 0x180089c7c\nmov     r10, [rcx+28h]                                                 ; +0x2f, 0x180089c7f\nxor     r9d, r9d                                                       ; +0x33, 0x180089c83\nmov     r8, rbx                                                        ; +0x36, 0x180089c86\nlea     rdx, [rsp+98h+Block]                                           ; +0x39, 0x180089c89\nmov     rcx, rax                                                       ; +0x3e, 0x180089c8e\ncall    r10                                                            ; +0x41, 0x180089c91\nnop                                                                    ; +0x44, 0x180089c94\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x45, 0x180089c95\njbe     short loc_180089C9F                                            ; +0x4a, 0x180089c9a\nmov     rax, [rax]                                                     ; +0x4c, 0x180089c9c\nmov     rcx, rax; char *                                               ; +0x4f, 0x180089c9f\ncall    ?createWithContentsOfFile@CCString@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCString::createWithContentsOfFile(char const *) ; +0x52, 0x180089ca2\nmov     rcx, rax; this                                                 ; +0x57, 0x180089ca7\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x5a, 0x180089caa\nmov     rdi, rax                                                       ; +0x5f, 0x180089caf\nmov     rdx, [rsp+98h+var_50]                                          ; +0x62, 0x180089cb2\ncmp     rdx, 0Fh                                                       ; +0x67, 0x180089cb7\njbe     short loc_180089D08                                            ; +0x6b, 0x180089cbb\ninc     rdx                                                            ; +0x6d, 0x180089cbd\nmov     r8, [rsp+98h+Block]                                            ; +0x70, 0x180089cc0\nmov     rcx, r8                                                        ; +0x75, 0x180089cc5\ncmp     rdx, 1000h                                                     ; +0x78, 0x180089cc8\njb      short loc_180089D00                                            ; +0x7f, 0x180089ccf\nadd     rdx, 27h ; '''                                                 ; +0x81, 0x180089cd1\nmov     r8, [r8-8]                                                     ; +0x85, 0x180089cd5\nsub     rcx, r8                                                        ; +0x89, 0x180089cd9\nsub     rcx, 8                                                         ; +0x8c, 0x180089cdc\ncmp     rcx, 1Fh                                                       ; +0x90, 0x180089ce0\njbe     short loc_180089D00                                            ; +0x94, 0x180089ce4\nmov     [rsp+98h+Reserved], 0; Reserved                                ; +0x96, 0x180089ce6\nxor     r9d, r9d; LineNo                                               ; +0x9f, 0x180089cef\nxor     r8d, r8d; FileName                                             ; +0xa2, 0x180089cf2\nxor     edx, edx; FunctionName                                         ; +0xa5, 0x180089cf5\nxor     ecx, ecx; Expression                                           ; +0xa7, 0x180089cf7\ncall    cs:_invoke_watson                                              ; +0xa9, 0x180089cf9\nalign 20h                                                              ; +0xaf, 0x180089cff\nmov     rcx, r8; Block                                                 ; +0xb0, 0x180089d00\ncall    j_j_free_0                                                     ; +0xb3, 0x180089d03\nmovdqa  xmm0, cs:xmmword_1800EC500                                     ; +0xb8, 0x180089d08\nmovdqu  xmmword ptr [rsp+40h], xmm0                                    ; +0xc0, 0x180089d10\nmov     byte ptr [rsp+98h+Block], 0                                    ; +0xc6, 0x180089d16\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xcb, 0x180089d1b\nmov     rcx, [rax]                                                     ; +0xd0, 0x180089d20\nmov     r10, [rcx+28h]                                                 ; +0xd3, 0x180089d23\nxor     r9d, r9d                                                       ; +0xd7, 0x180089d27\nmov     r8, rsi                                                        ; +0xda, 0x180089d2a\nlea     rdx, [rsp+98h+var_48]                                          ; +0xdd, 0x180089d2d\nmov     rcx, rax                                                       ; +0xe2, 0x180089d32\ncall    r10                                                            ; +0xe5, 0x180089d35\nnop                                                                    ; +0xe8, 0x180089d38\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xe9, 0x180089d39\njbe     short loc_180089D43                                            ; +0xee, 0x180089d3e\nmov     rax, [rax]                                                     ; +0xf0, 0x180089d40\nmov     rcx, rax; char *                                               ; +0xf3, 0x180089d43\ncall    ?createWithContentsOfFile@CCString@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCString::createWithContentsOfFile(char const *) ; +0xf6, 0x180089d46\nmov     rcx, rax; this                                                 ; +0xfb, 0x180089d4b\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xfe, 0x180089d4e\nmov     rbx, rax                                                       ; +0x103, 0x180089d53\nmov     rdx, [rsp+98h+var_30]                                          ; +0x106, 0x180089d56\ncmp     rdx, 0Fh                                                       ; +0x10b, 0x180089d5b\njbe     short loc_180089DAC                                            ; +0x10f, 0x180089d5f\ninc     rdx                                                            ; +0x111, 0x180089d61\nmov     r8, [rsp+98h+var_48]                                           ; +0x114, 0x180089d64\nmov     rcx, r8                                                        ; +0x119, 0x180089d69\ncmp     rdx, 1000h                                                     ; +0x11c, 0x180089d6c\njb      short loc_180089DA4                                            ; +0x123, 0x180089d73\nadd     rdx, 27h ; '''                                                 ; +0x125, 0x180089d75\nmov     r8, [r8-8]                                                     ; +0x129, 0x180089d79\nsub     rcx, r8                                                        ; +0x12d, 0x180089d7d\nsub     rcx, 8                                                         ; +0x130, 0x180089d80\ncmp     rcx, 1Fh                                                       ; +0x134, 0x180089d84\njbe     short loc_180089DA4                                            ; +0x138, 0x180089d88\nmov     [rsp+98h+Reserved], 0; Reserved                                ; +0x13a, 0x180089d8a\nxor     r9d, r9d; LineNo                                               ; +0x143, 0x180089d93\nxor     r8d, r8d; FileName                                             ; +0x146, 0x180089d96\nxor     edx, edx; FunctionName                                         ; +0x149, 0x180089d99\nxor     ecx, ecx; Expression                                           ; +0x14b, 0x180089d9b\ncall    cs:_invoke_watson                                              ; +0x14d, 0x180089d9d\nalign 4                                                                ; +0x153, 0x180089da3\nmov     rcx, r8; Block                                                 ; +0x154, 0x180089da4\ncall    j_j_free_0                                                     ; +0x157, 0x180089da7\nmovdqa  xmm0, cs:xmmword_1800EC500                                     ; +0x15c, 0x180089dac\nmovdqu  xmmword ptr [rsp+60h], xmm0                                    ; +0x164, 0x180089db4\nmov     byte ptr [rsp+98h+var_48], 0                                   ; +0x16a, 0x180089dba\nmov     r8, rbx; char *                                                ; +0x16f, 0x180089dbf\nmov     rdx, rdi; char *                                               ; +0x172, 0x180089dc2\nmov     rcx, rbp; this                                                 ; +0x175, 0x180089dc5\ncall    ?initWithVertexShaderByteArray@CCGLProgram@cocos2d@@QEAA_NPEBD0@Z; cocos2d::CCGLProgram::initWithVertexShaderByteArray(char const *,char const *) ; +0x178, 0x180089dc8\nmov     rcx, [rsp+98h+var_28]                                          ; +0x17d, 0x180089dcd\nxor     rcx, rsp; StackCookie                                          ; +0x182, 0x180089dd2\ncall    __security_check_cookie                                        ; +0x185, 0x180089dd5\nmov     rbx, [rsp+98h+arg_18]                                          ; +0x18a, 0x180089dda\nadd     rsp, 80h                                                       ; +0x192, 0x180089de2\npop     rdi                                                            ; +0x199, 0x180089de9\npop     rsi                                                            ; +0x19a, 0x180089dea\npop     rbp                                                            ; +0x19b, 0x180089deb\nretn                                                                   ; +0x19c, 0x180089dec", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801bf9dc", "<???> @ 0x1801bf9e8"], "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"}