{"type": "func", "start": 6442597184, "end": 6442597416, "name": "cocos2d::CCGridBase::initWithSize", "pseudocode": "// \n// cocos2d::CCGridBase::initWithSize from 0x180023b40 to 0x180023c28 (232 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCGrid3D::create @ 0x180023743\n// > cocos2d::CCGridBase::create @ 0x1800238d5\n// > cocos2d::CCTiledGrid3D::create @ 0x1800239e3\n// > cocos2d::CCGridBase::initWithSize @ 0x180023b1e\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b913c\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:29 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall cocos2d::CCGridBase::initWithSize(\n        cocos2d::CCGridBase *this,\n        const struct cocos2d::CCSize *a2,\n        struct cocos2d::CCTexture2D *a3,\n        char a4)\n{\n  unsigned __int8 v7; // si\n  __int64 v8; // rdi\n  __int64 v9; // rax\n  cocos2d::CCShaderCache *v10; // rax\n  float v12; // [rsp+50h] [rbp+8h] BYREF\n  float v13; // [rsp+54h] [rbp+Ch]\n  __int64 v14; // [rsp+60h] [rbp+18h]\n\n  v7 = 1;\n  *((_BYTE *)this + 56) = 0;\n  v8 = 0;\n  *((_DWORD *)this + 15) = 0;\n  cocos2d::CCSize::operator=((_DWORD *)this + 16, a2);\n  *((_QWORD *)this + 9) = a3;\n  if ( a3 )\n    cocos2d::CCObject::retain(a3);\n  *((_BYTE *)this + 96) = a4;\n  (*(void (__fastcall **)(_QWORD, float *))(**((_QWORD **)this + 9) + 136LL))(*((_QWORD *)this + 9), &v12);\n  *((float *)this + 20) = v12 / *((float *)this + 16);\n  *((float *)this + 21) = v13 / *((float *)this + 17);\n  v9 = sub_1800E4AC0(0x50u);\n  v14 = v9;\n  if ( v9 )\n    v8 = cocos2d::CCGrabber::CCGrabber(v9);\n  *((_QWORD *)this + 11) = v8;\n  if ( v8 )\n    cocos2d::CCGrabber::grab(v8, *((_QWORD *)this + 9));\n  else\n    v7 = 0;\n  v10 = cocos2d::CCShaderCache::sharedShaderCache();\n  *((_QWORD *)this + 13) = cocos2d::CCShaderCache::programForKey(v10, \"ShaderPositionTexture\");\n  (*(void (__fastcall **)(cocos2d::CCGridBase *))(*(_QWORD *)this + 88LL))(this);\n  return v7;\n}", "assembly": "; \n; cocos2d::CCGridBase::initWithSize from 0x180023b40 to 0x180023c28 (232 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCGrid3D::create @ 0x180023743\n; > cocos2d::CCGridBase::create @ 0x1800238d5\n; > cocos2d::CCTiledGrid3D::create @ 0x1800239e3\n; > cocos2d::CCGridBase::initWithSize @ 0x180023b1e\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b913c\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:29 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180023b40\npush    rbp                                                            ; +0x5, 0x180023b45\npush    rsi                                                            ; +0x6, 0x180023b46\npush    rdi                                                            ; +0x7, 0x180023b47\npush    r14                                                            ; +0x8, 0x180023b48\npush    r15                                                            ; +0xa, 0x180023b4a\nsub     rsp, 20h                                                       ; +0xc, 0x180023b4c\nmovzx   r15d, r9b                                                      ; +0x10, 0x180023b50\nmov     rbp, r8                                                        ; +0x14, 0x180023b54\nmov     rbx, rcx                                                       ; +0x17, 0x180023b57\nmov     sil, 1                                                         ; +0x1a, 0x180023b5a\nmov     byte ptr [rcx+38h], 0                                          ; +0x1d, 0x180023b5d\nxor     edi, edi                                                       ; +0x21, 0x180023b61\nmov     [rcx+3Ch], edi                                                 ; +0x23, 0x180023b63\nadd     rcx, 40h ; '@'                                                 ; +0x26, 0x180023b66\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x2a, 0x180023b6a\nmov     [rbx+48h], rbp                                                 ; +0x2f, 0x180023b6f\ntest    rbp, rbp                                                       ; +0x33, 0x180023b73\njz      short loc_180023B80                                            ; +0x36, 0x180023b76\nmov     rcx, rbp; this                                                 ; +0x38, 0x180023b78\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x3b, 0x180023b7b\nmov     [rbx+60h], r15b                                                ; +0x40, 0x180023b80\nmov     rcx, [rbx+48h]                                                 ; +0x44, 0x180023b84\nmov     rax, [rcx]                                                     ; +0x48, 0x180023b88\nlea     rdx, [rsp+48h+arg_0]                                           ; +0x4b, 0x180023b8b\ncall    qword ptr [rax+88h]                                            ; +0x50, 0x180023b90\nmovss   xmm0, [rsp+48h+arg_0]                                          ; +0x56, 0x180023b96\ndivss   xmm0, dword ptr [rbx+40h]                                      ; +0x5c, 0x180023b9c\nmovss   dword ptr [rbx+50h], xmm0                                      ; +0x61, 0x180023ba1\nmovss   xmm1, [rsp+48h+arg_4]                                          ; +0x66, 0x180023ba6\ndivss   xmm1, dword ptr [rbx+44h]                                      ; +0x6c, 0x180023bac\nmovss   dword ptr [rbx+54h], xmm1                                      ; +0x71, 0x180023bb1\nmov     ecx, 50h ; 'P'; Size                                           ; +0x76, 0x180023bb6\ncall    sub_1800E4AC0                                                  ; +0x7b, 0x180023bbb\nmov     [rsp+48h+arg_10], rax                                          ; +0x80, 0x180023bc0\ntest    rax, rax                                                       ; +0x85, 0x180023bc5\njz      short loc_180023BD5                                            ; +0x88, 0x180023bc8\nmov     rcx, rax                                                       ; +0x8a, 0x180023bca\ncall    cocos2d__CCGrabber__CCGrabber                                  ; +0x8d, 0x180023bcd\nmov     rdi, rax                                                       ; +0x92, 0x180023bd2\nmov     [rbx+58h], rdi                                                 ; +0x95, 0x180023bd5\ntest    rdi, rdi                                                       ; +0x99, 0x180023bd9\njz      short loc_180023BEC                                            ; +0x9c, 0x180023bdc\nmov     rdx, [rbx+48h]                                                 ; +0x9e, 0x180023bde\nmov     rcx, rdi                                                       ; +0xa2, 0x180023be2\ncall    cocos2d__CCGrabber__grab                                       ; +0xa5, 0x180023be5\njmp     short loc_180023BEF                                            ; +0xaa, 0x180023bea\nxor     sil, sil                                                       ; +0xac, 0x180023bec\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0xaf, 0x180023bef\nmov     rcx, rax; this                                                 ; +0xb4, 0x180023bf4\nlea     rdx, aShaderposition_2; \"ShaderPositionTexture\"                ; +0xb7, 0x180023bf7\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0xbe, 0x180023bfe\nmov     [rbx+68h], rax                                                 ; +0xc3, 0x180023c03\nmov     rcx, [rbx]                                                     ; +0xc7, 0x180023c07\nmov     rdx, [rcx+58h]                                                 ; +0xca, 0x180023c0a\nmov     rcx, rbx                                                       ; +0xce, 0x180023c0e\ncall    rdx                                                            ; +0xd1, 0x180023c11\nmovzx   eax, sil                                                       ; +0xd3, 0x180023c13\nmov     rbx, [rsp+48h+arg_8]                                           ; +0xd7, 0x180023c17\nadd     rsp, 20h                                                       ; +0xdc, 0x180023c1c\npop     r15                                                            ; +0xe0, 0x180023c20\npop     r14                                                            ; +0xe2, 0x180023c22\npop     rdi                                                            ; +0xe4, 0x180023c24\npop     rsi                                                            ; +0xe5, 0x180023c25\npop     rbp                                                            ; +0xe6, 0x180023c26\nretn                                                                   ; +0xe7, 0x180023c27", "xrefs": ["cocos2d::CCGrid3D::create @ 0x180023743", "cocos2d::CCGridBase::create @ 0x1800238d5", "cocos2d::CCTiledGrid3D::create @ 0x1800239e3", "cocos2d::CCGridBase::initWithSize @ 0x180023b1e", "<???> @ 0x18014cf68", "<???> @ 0x1801b913c"], "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"}