{"type": "func", "start": 6443002544, "end": 6443002901, "name": "cocos2d::CCGLProgram::initWithVertexShaderFilename", "pseudocode": "// \n// cocos2d::CCGLProgram::initWithVertexShaderFilename from 0x180086ab0 to 0x180086c15 (357 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b5718\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// 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  std::string *CString; // rdi\n  _BYTE *v10; // rcx\n  struct cocos2d::CCFileUtils *v11; // rax\n  __int64 v12; // rax\n  cocos2d::CCString *v13; // rax\n  std::string *v14; // rbx\n  _BYTE *v15; // rcx\n  void *Block; // [rsp+20h] [rbp-68h] BYREF\n  __m128i si128; // [rsp+30h] [rbp-58h]\n  void *v19; // [rsp+40h] [rbp-48h] BYREF\n  __m128i v20; // [rsp+50h] [rbp-38h]\n\n  v6 = cocos2d::CCFileUtils::sharedFileUtils();\n  v7 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))v6->createCCArrayWithContentsOfFile)(\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        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v10);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);\n  LOBYTE(Block) = 0;\n  v11 = cocos2d::CCFileUtils::sharedFileUtils();\n  v12 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, void **, const char *, _QWORD))v11->createCCArrayWithContentsOfFile)(\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        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v15);\n  }\n  v20 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);\n  LOBYTE(v19) = 0;\n  return cocos2d::CCGLProgram::initWithVertexShaderByteArray(\n           this,\n           CString->m_data.m_smallStorage._Elems,\n           v14->m_data.m_smallStorage._Elems);\n}", "assembly": "; \n; cocos2d::CCGLProgram::initWithVertexShaderFilename from 0x180086ab0 to 0x180086c15 (357 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b5718\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\nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x180086ab0\npush    rbp                                                            ; +0x5, 0x180086ab5\npush    rsi                                                            ; +0x6, 0x180086ab6\npush    rdi                                                            ; +0x7, 0x180086ab7\nsub     rsp, 70h                                                       ; +0x8, 0x180086ab8\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x180086abc\nxor     rax, rsp                                                       ; +0x13, 0x180086ac3\nmov     [rsp+88h+var_28], rax                                          ; +0x16, 0x180086ac6\nmov     rsi, r8                                                        ; +0x1b, 0x180086acb\nmov     rbx, rdx                                                       ; +0x1e, 0x180086ace\nmov     rbp, rcx                                                       ; +0x21, 0x180086ad1\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x24, 0x180086ad4\nmov     r10, [rax]                                                     ; +0x29, 0x180086ad9\nxor     r9d, r9d                                                       ; +0x2c, 0x180086adc\nmov     r8, rbx                                                        ; +0x2f, 0x180086adf\nlea     rdx, [rsp+88h+Block]                                           ; +0x32, 0x180086ae2\nmov     rcx, rax                                                       ; +0x37, 0x180086ae7\ncall    qword ptr [r10+28h]                                            ; +0x3a, 0x180086aea\nnop                                                                    ; +0x3e, 0x180086aee\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x3f, 0x180086aef\njbe     short loc_180086AF9                                            ; +0x44, 0x180086af4\nmov     rax, [rax]                                                     ; +0x46, 0x180086af6\nmov     rcx, rax; char *                                               ; +0x49, 0x180086af9\ncall    ?createWithContentsOfFile@CCString@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCString::createWithContentsOfFile(char const *) ; +0x4c, 0x180086afc\nmov     rcx, rax; this                                                 ; +0x51, 0x180086b01\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x54, 0x180086b04\nmov     rdi, rax                                                       ; +0x59, 0x180086b09\nmov     rdx, [rsp+88h+var_50]                                          ; +0x5c, 0x180086b0c\ncmp     rdx, 0Fh                                                       ; +0x61, 0x180086b11\njbe     short loc_180086B4C                                            ; +0x65, 0x180086b15\ninc     rdx                                                            ; +0x67, 0x180086b17\nmov     rcx, [rsp+88h+Block]; Block                                    ; +0x6a, 0x180086b1a\nmov     rax, rcx                                                       ; +0x6f, 0x180086b1f\ncmp     rdx, 1000h                                                     ; +0x72, 0x180086b22\njb      short loc_180086B47                                            ; +0x79, 0x180086b29\nadd     rdx, 27h ; '''                                                 ; +0x7b, 0x180086b2b\nmov     rcx, [rcx-8]                                                   ; +0x7f, 0x180086b2f\nsub     rax, rcx                                                       ; +0x83, 0x180086b33\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x86, 0x180086b36\ncmp     rax, 1Fh                                                       ; +0x8a, 0x180086b3a\njbe     short loc_180086B47                                            ; +0x8e, 0x180086b3e\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x90, 0x180086b40\ndb 0CCh                                                                ; +0x96, 0x180086b46\ncall    j_j_free_0                                                     ; +0x97, 0x180086b47\nmovdqa  xmm0, cs:xmmword_1800E7160                                     ; +0x9c, 0x180086b4c\nmovdqu  xmmword ptr [rsp+30h], xmm0                                    ; +0xa4, 0x180086b54\nmov     byte ptr [rsp+88h+Block], 0                                    ; +0xaa, 0x180086b5a\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0xaf, 0x180086b5f\nmov     r10, [rax]                                                     ; +0xb4, 0x180086b64\nxor     r9d, r9d                                                       ; +0xb7, 0x180086b67\nmov     r8, rsi                                                        ; +0xba, 0x180086b6a\nlea     rdx, [rsp+88h+var_48]                                          ; +0xbd, 0x180086b6d\nmov     rcx, rax                                                       ; +0xc2, 0x180086b72\ncall    qword ptr [r10+28h]                                            ; +0xc5, 0x180086b75\nnop                                                                    ; +0xc9, 0x180086b79\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0xca, 0x180086b7a\njbe     short loc_180086B84                                            ; +0xcf, 0x180086b7f\nmov     rax, [rax]                                                     ; +0xd1, 0x180086b81\nmov     rcx, rax; char *                                               ; +0xd4, 0x180086b84\ncall    ?createWithContentsOfFile@CCString@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCString::createWithContentsOfFile(char const *) ; +0xd7, 0x180086b87\nmov     rcx, rax; this                                                 ; +0xdc, 0x180086b8c\ncall    ?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xdf, 0x180086b8f\nmov     rbx, rax                                                       ; +0xe4, 0x180086b94\nmov     rdx, [rsp+88h+var_30]                                          ; +0xe7, 0x180086b97\ncmp     rdx, 0Fh                                                       ; +0xec, 0x180086b9c\njbe     short loc_180086BD7                                            ; +0xf0, 0x180086ba0\ninc     rdx                                                            ; +0xf2, 0x180086ba2\nmov     rcx, [rsp+88h+var_48]; Block                                   ; +0xf5, 0x180086ba5\nmov     rax, rcx                                                       ; +0xfa, 0x180086baa\ncmp     rdx, 1000h                                                     ; +0xfd, 0x180086bad\njb      short loc_180086BD2                                            ; +0x104, 0x180086bb4\nadd     rdx, 27h ; '''                                                 ; +0x106, 0x180086bb6\nmov     rcx, [rcx-8]                                                   ; +0x10a, 0x180086bba\nsub     rax, rcx                                                       ; +0x10e, 0x180086bbe\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x111, 0x180086bc1\ncmp     rax, 1Fh                                                       ; +0x115, 0x180086bc5\njbe     short loc_180086BD2                                            ; +0x119, 0x180086bc9\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x11b, 0x180086bcb\nalign 2                                                                ; +0x121, 0x180086bd1\ncall    j_j_free_0                                                     ; +0x122, 0x180086bd2\nmovdqa  xmm0, cs:xmmword_1800E7160                                     ; +0x127, 0x180086bd7\nmovdqu  xmmword ptr [rsp+50h], xmm0                                    ; +0x12f, 0x180086bdf\nmov     byte ptr [rsp+88h+var_48], 0                                   ; +0x135, 0x180086be5\nmov     r8, rbx; char *                                                ; +0x13a, 0x180086bea\nmov     rdx, rdi; char *                                               ; +0x13d, 0x180086bed\nmov     rcx, rbp; this                                                 ; +0x140, 0x180086bf0\ncall    ?initWithVertexShaderByteArray@CCGLProgram@cocos2d@@QEAA_NPEBD0@Z; cocos2d::CCGLProgram::initWithVertexShaderByteArray(char const *,char const *) ; +0x143, 0x180086bf3\nmov     rcx, [rsp+88h+var_28]                                          ; +0x148, 0x180086bf8\nxor     rcx, rsp; StackCookie                                          ; +0x14d, 0x180086bfd\ncall    __security_check_cookie                                        ; +0x150, 0x180086c00\nmov     rbx, [rsp+88h+arg_18]                                          ; +0x155, 0x180086c05\nadd     rsp, 70h                                                       ; +0x15d, 0x180086c0d\npop     rdi                                                            ; +0x161, 0x180086c11\npop     rsi                                                            ; +0x162, 0x180086c12\npop     rbp                                                            ; +0x163, 0x180086c13\nretn                                                                   ; +0x164, 0x180086c14", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b5718"], "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"}